Public bug reported:

Reproduce steps:
1.Create an instance with an invalid availability_zone but the right hostname;
 nova boot --availability_zone invalid_az:right_host 
2.Migrate the instance
  nova --debug migrate instance_uuid 

This qeustion has been discussed in 
https://bugs.launchpad.net/nova/+bug/1431194 and 
https://bugs.launchpad.net/nova/+bug/1444841, while it also occurs in recently 
version.
I'll begin by stating the problems again:
We create an instance with ”--availability_zone“ to specify which host to build 
VM. 
In compute/api.py, it would not check whether specified an invalid AZ value, it 
focuses on the force-host and VM can be created successfully.
The problem is when migrating or resizeing VM nova-schedule would report no 
valid host like this:

DEBUG (session:640) POST call to compute for 
http://10.2.1.244:8774/v2.1/servers/0552ff93-bab1-4d08-b357-6190563ce0d8/action 
used request id req-c1a7f1d6-ea00-4304-9d30-c711047d9c74
DEBUG (shell:959) No valid host was found. No valid host found for cold migrate 
(HTTP 400) (Request-ID: req-c1a7f1d6-ea00-4304-9d30-c711047d9c74)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 957, 
in main
    OpenStackComputeShell().main(argv)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 879, 
in main
    args.func(self.cs, args)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/shell.py", line 
2028, in do_migrate
    server.migrate()
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", line 
330, in migrate
    return self.manager.migrate(self)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", line 
1558, in migrate
    return self._action('migrate', server)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", line 
1908, in _action
    info=info, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", line 
1919, in _action_return_resp_and_body
    return self.api.client.post(url, body=body)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 
223, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 80, 
in request
    raise exceptions.from_response(resp, body, url, method)
BadRequest: No valid host was found. No valid host found for cold migrate (HTTP 
400) (Request-ID: req-c1a7f1d6-ea00-4304-9d30-c711047d9c74)
ERROR (BadRequest): No valid host was found. No valid host found for cold 
migrate (HTTP 400) (Request-ID: req-c1a7f1d6-ea00-4304-9d30-c711047d9c74)

The root cause scheduler use the availability_zone which was from instance 
property by createing,
actually, it would be different from OS-EXT-AZ:availability_zone which can be 
saw by nova show.

So,the way to make it more appropriate:
Providing availability_zone where the instance is actually in for scheduler to 
migrate.

** Affects: nova
     Importance: Undecided
     Assignee: Henry (guanzy)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Henry (guanzy)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1735406

Title:
  nova migrate instance failed due to availability zone

Status in OpenStack Compute (nova):
  New

Bug description:
  Reproduce steps:
  1.Create an instance with an invalid availability_zone but the right hostname;
   nova boot --availability_zone invalid_az:right_host 
  2.Migrate the instance
    nova --debug migrate instance_uuid 

  This qeustion has been discussed in 
https://bugs.launchpad.net/nova/+bug/1431194 and 
https://bugs.launchpad.net/nova/+bug/1444841, while it also occurs in recently 
version.
  I'll begin by stating the problems again:
  We create an instance with ”--availability_zone“ to specify which host to 
build VM. 
  In compute/api.py, it would not check whether specified an invalid AZ value, 
it focuses on the force-host and VM can be created successfully.
  The problem is when migrating or resizeing VM nova-schedule would report no 
valid host like this:

  DEBUG (session:640) POST call to compute for 
http://10.2.1.244:8774/v2.1/servers/0552ff93-bab1-4d08-b357-6190563ce0d8/action 
used request id req-c1a7f1d6-ea00-4304-9d30-c711047d9c74
  DEBUG (shell:959) No valid host was found. No valid host found for cold 
migrate (HTTP 400) (Request-ID: req-c1a7f1d6-ea00-4304-9d30-c711047d9c74)
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 
957, in main
      OpenStackComputeShell().main(argv)
    File "/usr/local/lib/python2.7/dist-packages/novaclient/shell.py", line 
879, in main
      args.func(self.cs, args)
    File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/shell.py", line 
2028, in do_migrate
      server.migrate()
    File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", 
line 330, in migrate
      return self.manager.migrate(self)
    File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", 
line 1558, in migrate
      return self._action('migrate', server)
    File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", 
line 1908, in _action
      info=info, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/servers.py", 
line 1919, in _action_return_resp_and_body
      return self.api.client.post(url, body=body)
    File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", 
line 223, in post
      return self.request(url, 'POST', **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 
80, in request
      raise exceptions.from_response(resp, body, url, method)
  BadRequest: No valid host was found. No valid host found for cold migrate 
(HTTP 400) (Request-ID: req-c1a7f1d6-ea00-4304-9d30-c711047d9c74)
  ERROR (BadRequest): No valid host was found. No valid host found for cold 
migrate (HTTP 400) (Request-ID: req-c1a7f1d6-ea00-4304-9d30-c711047d9c74)

  The root cause scheduler use the availability_zone which was from instance 
property by createing,
  actually, it would be different from OS-EXT-AZ:availability_zone which can be 
saw by nova show.

  So,the way to make it more appropriate:
  Providing availability_zone where the instance is actually in for scheduler 
to migrate.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1735406/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to