yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07534
[Bug 1261636] [NEW] Need set compute driver's flag capabilities correctly
Public bug reported:
1.Back ground:
Class ComputeDriver, base of all compute drivers, has dictionary capabilities
to indicate if the compute driver implements some functions. The 'supports_recreate'
flag needs the driver to support the evacuate operation. The 'has_imagecache' flag
needs the driver to implement the 'manage_image_cache' method.[1] Compute manger will
check this with capabilities['has_imagecache'] [2]or capabilities['supports_recreate']
[3]directly.
2. Problems:
1)Docker does not currently support these two functions, so the capabilities flags
should not be set.[4]
2)Baremetal only set 'has_imagecache', there is code path leading KeyError.
Need set capabilities explicitly to avoid this.[5]
3.Solution:
Set or unset compute driver's capabilities explicitly.
[1] https://github.com/openstack/nova/blob/master/nova/virt/driver.py#L128
[2] https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L5168
[3] https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L2142
[4] https://github.com/openstack/nova/blob/master/nova/virt/docker/driver.py#L62
[5] https://github.com/openstack/nova/blob/master/nova/virt/baremetal/driver.py#L114
** 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/1261636
Title:
Need set compute driver's flag capabilities correctly
Status in OpenStack Compute (Nova):
New
Bug description:
1.Back ground:
Class ComputeDriver, base of all compute drivers, has dictionary capabilities
to indicate if the compute driver implements some functions. The 'supports_recreate'
flag needs the driver to support the evacuate operation. The 'has_imagecache' flag
needs the driver to implement the 'manage_image_cache' method.[1] Compute manger will
check this with capabilities['has_imagecache'] [2]or capabilities['supports_recreate']
[3]directly.
2. Problems:
1)Docker does not currently support these two functions, so the capabilities flags
should not be set.[4]
2)Baremetal only set 'has_imagecache', there is code path leading KeyError.
Need set capabilities explicitly to avoid this.[5]
3.Solution:
Set or unset compute driver's capabilities explicitly.
[1] https://github.com/openstack/nova/blob/master/nova/virt/driver.py#L128
[2] https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L5168
[3] https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L2142
[4] https://github.com/openstack/nova/blob/master/nova/virt/docker/driver.py#L62
[5] https://github.com/openstack/nova/blob/master/nova/virt/baremetal/driver.py#L114
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1261636/+subscriptions
Follow ups
References