Public bug reported:

Hello,

DESCRIPTION
-----------

I want Nova to behave like that when Availability Zone is not specified
(`Any Availability Zone` is set in Horizon), it will create VM in random
AZ.

STEPS TO REPRODUCE
------------------

Steps I do to configure that:

1. In `nova.conf` I set `default_schedule_zone = None` and restarted all nova 
services. I found this attribute in documentation [1] and also in Mirantis blog 
post [2]
2. I create 2 availability zones (2 host aggregates each with 1 hypervisor 
added). 
3. I try to create VM In Horizon with `Any Availability Zone` and it results in 
following error:

    The requested availability zone is not available (HTTP 400).

The commands I executed to create AZs:

    ```
    openstack aggregate create HA-Test1 --zone AZ-Test1 --property 
availability_zone=AZ-Test1
    openstack aggregate create HA-Test2 --zone AZ-Test2 --property 
availability_zone=AZ-Test2
    openstack aggregate add host HA-Test1 os-compute-01
    openstack aggregate add host HA-Test2 os-compute-02
    ```

POINT
-----

Now this doesn't work as expected, but(!) when I remove `nova.conf`
attribute `default_schedule_zone = None`, or I will configure it empty
`default_schedule_zone = `, spawning of VMs works as expected and they
are scheduled in random AZ.

Therefore I think that Nova doesn't handle `None` as python `None`, but
as string (As if you set default schedule zone to zone `None`).

ENVIRONMENT
-----------

I am using stable Pike release with KVM + Libvirt installed via
Openstack-Ansible on Ubuntu 16.04.

[1] 
https://docs.openstack.org/ocata/config-reference/compute/config-options.html
[2] 
https://www.mirantis.com/blog/the-first-and-final-word-on-openstack-availability-zones/

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1730918

Title:
  Nova does not respect default_schedule_zone `None`

Status in OpenStack Compute (nova):
  New

Bug description:
  Hello,

  DESCRIPTION
  -----------

  I want Nova to behave like that when Availability Zone is not
  specified (`Any Availability Zone` is set in Horizon), it will create
  VM in random AZ.

  STEPS TO REPRODUCE
  ------------------

  Steps I do to configure that:

  1. In `nova.conf` I set `default_schedule_zone = None` and restarted all nova 
services. I found this attribute in documentation [1] and also in Mirantis blog 
post [2]
  2. I create 2 availability zones (2 host aggregates each with 1 hypervisor 
added). 
  3. I try to create VM In Horizon with `Any Availability Zone` and it results 
in following error:

      The requested availability zone is not available (HTTP 400).

  The commands I executed to create AZs:

      ```
      openstack aggregate create HA-Test1 --zone AZ-Test1 --property 
availability_zone=AZ-Test1
      openstack aggregate create HA-Test2 --zone AZ-Test2 --property 
availability_zone=AZ-Test2
      openstack aggregate add host HA-Test1 os-compute-01
      openstack aggregate add host HA-Test2 os-compute-02
      ```

  POINT
  -----

  Now this doesn't work as expected, but(!) when I remove `nova.conf`
  attribute `default_schedule_zone = None`, or I will configure it empty
  `default_schedule_zone = `, spawning of VMs works as expected and they
  are scheduled in random AZ.

  Therefore I think that Nova doesn't handle `None` as python `None`,
  but as string (As if you set default schedule zone to zone `None`).

  ENVIRONMENT
  -----------

  I am using stable Pike release with KVM + Libvirt installed via
  Openstack-Ansible on Ubuntu 16.04.

  [1] 
https://docs.openstack.org/ocata/config-reference/compute/config-options.html
  [2] 
https://www.mirantis.com/blog/the-first-and-final-word-on-openstack-availability-zones/

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to