Not able to boot from Volume / Volume snapshot when using isolated_images
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Ocata |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Pike |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Queens |
Fix Committed
|
Medium
|
Matt Riedemann |
Bug Description
Description
===========
When using isolated_images, isolated_hosts and restrict_
I'm not able to create running instance with volume/volume snapshot as a source.
Instance goes to ERROR state with reason:
Failed to compute_
Steps to reproduce
==================
1. Set below options in nova.conf:
isolated_images = <id_of_
isolated_hosts = <one_dedicated_
restrict_
and append filter 'IsolatedHostsF
2. Apply configs & restart nova services
Now tests:
1. Create empty volume
2. Set bootable flag
3. Launch as instance
4. Created instance is in ERROR state.
Second test:
1. Create instance from image
2. create instance snapshot
3. Go to volume snapshots
4. Create as instance
5. Created instance is in ERROR state.
Actual results
================
Not working
Expected results
==================
Working as usual
Environment
==============
Ocata @ ubuntu xenial, Ceph-backed storage
Packages & versions:
ii nova-api 2:15.0.
ii nova-common 2:15.0.
ii nova-conductor 2:15.0.
ii nova-consoleauth 2:15.0.
ii nova-novncproxy 2:15.0.
ii nova-placement-api 2:15.0.
ii nova-scheduler 2:15.0.
ii python-nova 2:15.0.
ii python-novaclient 2:7.1.0-
Logs
===========
Traceback (most recent call last):#012#012 File "/usr/lib/
Hmm, it appears that the IsolatedHostsFilter doesn't take into account that when you boot from volume, there doesn't need to be an image provided to the server create request, and therefore the RequestSpec likely won't have an image, or at least an image with an id, since the root disk is going to have the volume which has the OS image in it.
File "/usr/lib/ python2. 7/dist- packages/ nova/scheduler/ filters/ isolated_ hosts_filter. py", line 60, in host_passes#012 image_ref = spec_obj.image.id if spec_obj.image else None