Nova boot does not respect zone name if node is specified

Bug #1495946 reported by Ilya Shakhat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Raga lahari

Bug Description

Version DevStack / Liberty (commit-id 9f61d1eb)

Steps to reproduce:
1. Boot new instance specifying non-existing zone name but valid host name:
nova boot --image <image-id> --nic net-id=<net-id> --flavor m1.nano --availability-zone foo:devstack my_vm
2. nova show my_vm shows that the instance was started in availability zone "nova".

It's expected that Nova rejects to boot instance within wrong zone, but it uses only hostname part of it.

Tags: api scheduler
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

I'm tagging it with "api" because I assume that this should be checked on that level with an appropriate return code.

tags: added: api availability-zones spawn
Changed in nova:
assignee: nobody → Raga lahari (raga-lahari)
tags: added: scheduler
removed: availability-zones spawn
Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

FWIW, I'm changing the tags to match the implementation.

So, that's an expected behaviour, see https://github.com/openstack/nova/blob/875594ad26da46c773892a901511547b86a9568c/nova/scheduler/host_manager.py#L515-L518

When providing a request using the --az hint, it goes into the Compute API where it sets the force_hosts and force_nodes attributes that are passed over the wire to the scheduler and run above
https://github.com/openstack/nova/blob/bc6f30de953303604625e84ad2345cfb595170d2/nova/compute/api.py#L580-L607

I assume the current behaviour is debatable and should be discussed in a spec, that's something I'd love to implement like the same as I provided with http://specs.openstack.org/openstack/nova-specs/specs/liberty/approved/check-destination-on-migrations.html

Changed in nova:
status: New → Opinion
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.