yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #64442
[Bug 1694844] [NEW] Boot from volume fails when cross_az_attach=False and volume is provided to nova without an AZ for the instance
Public bug reported:
This was recreated with a devstack change:
http://logs.openstack.org/74/467674/4/check/gate-tempest-dsvm-neutron-
full-ubuntu-
xenial/3dbd6e9/logs/screen-n-api.txt.gz#_May_26_02_41_54_584798
In this failing test, Tempest creates a volume:
{"volume": {"status": "creating", "user_id":
"2256bb66db8741aab58a20367b00bfa2", "attachments": [], "links":
[{"href":
"https://10.39.38.35:8776/v2/272882ba896341d483982dbcb1fde0f4/volumes
/55a7c64a-f7b2-4b77-8f60-c1ccda8e0c30", "rel": "self"}, {"href":
"https://10.39.38.35:8776/272882ba896341d483982dbcb1fde0f4/volumes
/55a7c64a-f7b2-4b77-8f60-c1ccda8e0c30", "rel": "bookmark"}],
"availability_zone": "nova", "bootable": "false", "encrypted": false,
"created_at": "2017-05-26T02:41:45.617286", "description": null,
"updated_at": null, "volume_type": "lvmdriver-1", "name": "tempest-
TestVolumeBootPattern-volume-origin-1984626538", "replication_status":
null, "consistencygroup_id": null, "source_volid": null, "snapshot_id":
null, "multiattach": false, "metadata": {}, "id": "55a7c64a-
f7b2-4b77-8f60-c1ccda8e0c30", "size": 1}}
And the AZ on the volume defaults to 'nova' because that's the default
AZ in cinder.conf.
That volume ID is then passed to create the server:
{"server": {"block_device_mapping_v2": [{"source_type": "volume",
"boot_index": 0, "destination_type": "volume", "uuid": "55a7c64a-
f7b2-4b77-8f60-c1ccda8e0c30", "delete_on_termination": true}],
"networks": [{"uuid": "da48954d-1f66-427b-892c-a7f2eb1b54a3"}],
"imageRef": "", "name": "tempest-TestVolumeBootPattern-
server-1371698056", "flavorRef": "42"}}
Which fails with the 400 InvalidVolume error because of this check in
the API:
https://github.com/openstack/nova/blob/f112dc686dadd643410575cc3487cf1632e4f689/nova/volume/cinder.py#L286
The instance is not associated with a host yet so it's not in an
aggregate, and since an AZ wasn't specified when creating an instance
(and I don't think we want people passing 'nova' as the AZ), it fails
when comparing None to 'nova'.
This is separate from bug 1497253 and change
https://review.openstack.org/#/c/366724/ because in that case Nova is
creating the volume during boot from volume and can specify the AZ for
the volume. In this bug, the volume already exists and is provided to
Nova.
We might need to be able to distinguish if the API or compute service is
calling check_availability_zone and if so, pass a default AZ in the case
of the API if one isn't defined.
** Affects: nova
Importance: Undecided
Status: New
** Tags: volumes
--
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/1694844
Title:
Boot from volume fails when cross_az_attach=False and volume is
provided to nova without an AZ for the instance
Status in OpenStack Compute (nova):
New
Bug description:
This was recreated with a devstack change:
http://logs.openstack.org/74/467674/4/check/gate-tempest-dsvm-neutron-
full-ubuntu-
xenial/3dbd6e9/logs/screen-n-api.txt.gz#_May_26_02_41_54_584798
In this failing test, Tempest creates a volume:
{"volume": {"status": "creating", "user_id":
"2256bb66db8741aab58a20367b00bfa2", "attachments": [], "links":
[{"href":
"https://10.39.38.35:8776/v2/272882ba896341d483982dbcb1fde0f4/volumes
/55a7c64a-f7b2-4b77-8f60-c1ccda8e0c30", "rel": "self"}, {"href":
"https://10.39.38.35:8776/272882ba896341d483982dbcb1fde0f4/volumes
/55a7c64a-f7b2-4b77-8f60-c1ccda8e0c30", "rel": "bookmark"}],
"availability_zone": "nova", "bootable": "false", "encrypted": false,
"created_at": "2017-05-26T02:41:45.617286", "description": null,
"updated_at": null, "volume_type": "lvmdriver-1", "name": "tempest-
TestVolumeBootPattern-volume-origin-1984626538", "replication_status":
null, "consistencygroup_id": null, "source_volid": null,
"snapshot_id": null, "multiattach": false, "metadata": {}, "id":
"55a7c64a-f7b2-4b77-8f60-c1ccda8e0c30", "size": 1}}
And the AZ on the volume defaults to 'nova' because that's the default
AZ in cinder.conf.
That volume ID is then passed to create the server:
{"server": {"block_device_mapping_v2": [{"source_type": "volume",
"boot_index": 0, "destination_type": "volume", "uuid": "55a7c64a-
f7b2-4b77-8f60-c1ccda8e0c30", "delete_on_termination": true}],
"networks": [{"uuid": "da48954d-1f66-427b-892c-a7f2eb1b54a3"}],
"imageRef": "", "name": "tempest-TestVolumeBootPattern-
server-1371698056", "flavorRef": "42"}}
Which fails with the 400 InvalidVolume error because of this check in
the API:
https://github.com/openstack/nova/blob/f112dc686dadd643410575cc3487cf1632e4f689/nova/volume/cinder.py#L286
The instance is not associated with a host yet so it's not in an
aggregate, and since an AZ wasn't specified when creating an instance
(and I don't think we want people passing 'nova' as the AZ), it fails
when comparing None to 'nova'.
This is separate from bug 1497253 and change
https://review.openstack.org/#/c/366724/ because in that case Nova is
creating the volume during boot from volume and can specify the AZ for
the volume. In this bug, the volume already exists and is provided to
Nova.
We might need to be able to distinguish if the API or compute service
is calling check_availability_zone and if so, pass a default AZ in the
case of the API if one isn't defined.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1694844/+subscriptions
Follow ups