availability-zone option needs to validate arguments between zone and host

Bug #1770658 reported by Yang Youseok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Yang Youseok

Bug Description

Description
===========
If I tried to create VM instance with specified availability-zone option with invalid forced-host, I succeed to make VM at invalid compute host.

I do not know if this is intentional, but it's different from intuition since host-aggregate does not have compute host at all. I think if admin has any other meaningful properties for the availability-zone (e.g. Network binding for the zone), it do make more severe problem.

Steps to reproduce
==================
server create --availability-zone Dev:compute01 ....'
(host-aggregate called 'Dev' do not have host 'compute01')

Expected result
===============
Could not make instance

Actual result
=============
Could make instance on host which to be forced.

Environment
===========
mitaka-eol on upstream. But, seems to be same for master.
filter-scheduler (+ availability_zone_filter)

2. Which hypervisor did you use?
libvirt + kvm

2. Which storage type did you use?
Ceph

3. Which networking type did you use?
Neutron with linux-bridge

Tags: scheduler
Revision history for this message
daixianmeng (daixianmeng) wrote :

This may be a bug. You can modify this logic check.(add aggregat and host check)

Revision history for this message
Yang Youseok (ileixe) wrote :

@daixianmeng Thanks for the check, I will fix it up.

Changed in nova:
assignee: nobody → Yang Youseok (ileixe)
tags: added: scheduler
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

I can reproduce the problem with in a single node devstack on master with the following command:

openstack server create --flavor c1 --image cirros-0.4.0-x86_64-disk --availability-zone non-existent-az:ubuntu vm

VM boots up on the compute host 'ubuntu' even if 'non-existent-az' AZ does not exist.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Nova API microversion 2.74 introduced a new way [1] to specify az and host. That API does the validation.

[1]https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id66

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.