Ask Your Question
0

How do I assign an instance to a specific compute node?

asked 2019-04-02 09:37:15 -0500

shmitch gravatar image

I'm running a Rocky Packstack with three nodes: Controller node (with no compute function) and two dedicated Compute nodes. I need to create several instances and direct them to specific compute nodes to facilitate the analysis of their East West traffic. (i.e., These specific instances need to go to Compute node 1, and the other instances need to go to Compute node 2.) How do I do that?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-04-02 10:05:13 -0500

updated 2019-04-02 10:10:05 -0500

Although the purpose of availability zones is ensuring better availability of applications, you can also use them to solve your problem.

As admin, create two host aggregates and expose them to users as availability zones:

openstack aggregate create --zone zone1 aggr1
openstack aggregate create --zone zone2 aggr2

Add each host to a zone:

openstack aggregate add host aggr1 computenode1
openstack aggregate add host aggr2 computenode2

As any user, launch instances in the availability zones:

openstack server create --availability-zone zone1 ...other parameters... instance 1
openstack server create --availability-zone zone2 ...other parameters... instance 2

You can also expose aggregates to users by giving them metadata items, then map flavors to the aggregates using those metadata items. Instances created with those flavors run in the corresponding aggregates. This is more complex than the availability zone method, and it probably requires adding the aggregate scheduler filter to nova.conf.

Alternatively, you can disable nova-compute on a host, so that instances are automatically launched on the other host. After that, re-enable it and disable the other compute node.

edit flag offensive delete link more

Comments

Here is my interpretation of your answer in three parts after this comment. Do I understand your answer correctly?

shmitch gravatar imageshmitch ( 2019-04-02 10:59:36 -0500 )edit

openstack aggregate create --zone <zone> aggr1

openstack aggregate create --zone <zone> aggr2

Example: openstack aggregate create --zone e-cmpt-1 aggr1

Example: openstack aggregate create --zone k-cmpt-2 aggr2
shmitch gravatar imageshmitch ( 2019-04-02 10:59:44 -0500 )edit

openstack aggregate add host aggr1 <host fqdn="">

openstack aggregate add host aggr2 <host fqdn="">

Example: openstack aggregate add host aggr1 e-cmpt-1.netscout.com

Example: openstack aggregate add host aggr2 k-cmpt-2.netscout.com
shmitch gravatar imageshmitch ( 2019-04-02 10:59:51 -0500 )edit

openstack server create --availability-zone zone1 ...

openstack server create --availability-zone zone2 ...

Example:openstack server create --availability-zone e-cmpt-1 ...

Example:openstack server create --availability-zone k-cmpt-2 ...
shmitch gravatar imageshmitch ( 2019-04-02 11:00:16 -0500 )edit

yes with one exception. It's unlikely the compute node names are FQDN's. In any case, you can list them with openstack compute service list.

Important: Don't accept what I write. Double-check with openstack help COMMAND and with official documentation.

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-02 21:38:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-04-02 09:37:15 -0500

Seen: 47 times

Last updated: Apr 02