How to find bootable compute node before boot instance?

asked 2015-04-07 20:03:20 -0600

Takayuki Hirano gravatar image

I'm considering to rescue instances on failed compute node.
I found how I can do it as follows.

# nova evacuate evacuated_server_name host_b

http://docs.openstack.org/user-guide-admin/content/nova_cli_evacuate.html

Its command has to specify destination compute node.
But the destination compute node needs appropriate resource capacity to boot instance with its flavor.

For instance, I tried to specify 4GB memory compute node for evacuating 8G memory instance , then got error.

[Error: internal error: early end of file from monitor: possible problem: Cannot set up guest memory 'pc.ram': Cannot allocate memory ]

Unfortunately I have to find appropriate node before evacuating.
Please let me know if you have any knowlede.

Many thanks.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2015-04-08 08:56:58 -0600

jdexter gravatar image

A couple things here:

nova help evacuate

usage: nova evacuate [--password <password>] [--on-shared-storage]
                     <server> [<host>]

Evacuate server from failed host.

Positional arguments:
  <server>               Name or ID of server.
  <host>                 Name or ID of the target host. If no host is
                         specified, the scheduler will choose one.

Optional arguments:
  --password <password>  Set the provided password on the evacuated server.
                         Not applicable with on-shared-storage flag
  --on-shared-storage    Specifies whether server files are located on shared
                         storage

Nova evacuate, does not require the new host to be given, if left out it will use the scheduler to find a new host for each instance, There is another command nova host-evacuate, that does require the new host to be specified.

nova host-evacuate [--target_host <target_host>] [--on-shared-storage]
                          <host>

Evacuate all instances from failed host.

Positional arguments:
  <host>                       Name of host.

Optional arguments:
  --target_host <target_host>  Name of target host. If no host is specified
                               the scheduler will select a target.
  --on-shared-storage          Specifies whether all instances files are on
                               shared storage

It is also good to point out here there is a design and capacity planning aspect to your question as well. If you are expecting to be able to recover from an entire compute host needing to evacuated, you should plan for n+1 compute nodes to your actual needs.

edit flag offensive delete link more
0

answered 2015-04-08 22:03:39 -0600

Takayuki Hirano gravatar image

Great answer, thank you!

Also my problem is I use icehouse and the auto selection host is implemented since juno.
Following is icehouse nova-client.

usage: nova evacuate [--password <password>] [--on-shared-storage]
                     <server> <host>

Evacuate server from failed host to specified one.

Positional arguments:
  <server>              Name or ID of server.
  <host>                Name or ID of target host.

Optional arguments:
  --password <password>
                        Set the provided password on the evacuated server. Not
                        applicable with on-shared-storage flag
  --on-shared-storage   Specifies whether server files are located on shared
                        storage

Icehouse

https://github.com/openstack/nova/blob/stable/icehouse/nova/api/openstack/compute/contrib/evacuate.py (https://github.com/openstack/nova/blo...)

Juno

https://github.com/openstack/nova/blob/stable/juno/nova/api/openstack/compute/contrib/evacuate.py (https://github.com/openstack/nova/blo...)

Your suggestion is a good plan, I'll review how to save compute resources that are quota, scheduler, or etc. Thanks again.

edit flag offensive delete link more

Comments

Is there any solution for icehouse? thx

keky gravatar imagekeky ( 2015-06-29 22:05:21 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-04-07 20:03:20 -0600

Seen: 257 times

Last updated: Apr 08 '15