How can I force an instance to run on a specific Node Controller?

Follow

 

Scenario

You have a requirement to test or troubleshoot a specific scenario which requires that for your installed base of N Node Controllers (where N > 1) you restrict access to at least 1 and at most N - 1 Node Controllers, ideally without interrupting any running instances.

This requirement is only a temporary one, as you will revert any/all changes once the testing has been completed.

Answer

Since Eucalyptus does not at this time expressly facilitate a means to specify which Node Controller an instance must run on, the workaround described below will prevent new instances from running on Node Controllers which you do not want new instances to run on.

For each Node Controller where you do not want new instances to run:

  • edit /etc/eucalyptus/eucalyptus.conf
  • locate the setting MAX_MEM (this might be commented out; if uncommented with a non-zero value, make note of the value so that you may revert to it once testing has been completed)
  • uncomment and set MAX_MEM to the value 1:  MAX_MEM="1"
  • save and exit the editor
  • restart the Node Controller:  service eucalyptus-nc restart

Repeat the above for each Node Controller.

The reconfiguration above will effectively disallow any new instances from being started on the Node Controller, without interrupting any instances which are presently running.

Once you have completed the above for all Node Controllers which you wish to exclude from receiving newly started instances, proceed with your testing/troubleshooting.

At the conclusion of your testing, simply undo the changes you made to this file on each Node Controller you made the changes on, and restart with "service eucalyptus-nc restart".

 

As of Eucalyptus 3.4.x and later, you also have the euca-modify-service command-line option, as described below:

1) To instruct a Node Controller to stop servicing VM requests:

- command: "euca-modify-service -s STOP <IP of Node Controller>"

- e.g.,

[root@odc-d-36 ~]# euca-describe-nodes
NODE cluster 10.104.1.186 ENABLED
INSTANCE i-F30244F0
[root@odc-d-36 ~]# euca-modify-service -s STOP 10.104.1.186
RESPONSE true
[root@odc-d-36 ~]# euca-describe-nodes
NODE cluster 10.104.1.186 STOPPED
INSTANCE i-F30244F0

2) To instruct a Node Controller to resume servicing VM requests:

- command: "euca-modify-service -s START <IP of Node Controller>"

- e.g.,

[root@odc-d-36 ~]# euca-modify-service -s START 10.104.1.186
RESPONSE true
[root@odc-d-36 ~]# euca-describe-nodes
NODE cluster 10.104.1.186 DISABLED
INSTANCE i-F30244F0
[root@odc-d-36 ~]# euca-describe-nodes
NODE cluster 10.104.1.186 ENABLED
INSTANCE i-F30244F0

Note: In the last example above, we needed to run euca-describe-nodes more than once, as we were waiting for the status to change from DISABLED to ENABLED. There can be a brief delay for the Node Controller to become ENABLED. This is normal and expected.

Have more questions? Submit a request

Comments

Powered by Zendesk