Reviewed: https://review.openstack.org/314076 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8b199c6dff4c61169a9eb916511b716d8f20c015 Submitter: Jenkins Branch: master
commit 8b199c6dff4c61169a9eb916511b716d8f20c015 Author: Davanum Srinivas <[email protected]> Date: Mon May 9 08:23:25 2016 -0400 Fix exception when vcpu_pin_set is set to "" We should treat vcpu_pin_set="", same as vcpu_pin_set=None and avoid the problem mentioned in the bug report. Closes-Bug: #1579664 Change-Id: Ifa2b960aa74072ba668c9d028df108af6156fe40 ** Changed in: nova Status: In Progress => Fix Released -- 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/1579664 Title: Nova-compute raise exception when vcpu_pin_set is set to None or"". Status in OpenStack Compute (nova): Fix Released Bug description: Description =========== In Mitaka, Nova-compute raise exception when vcpu_pin_set is set to None or"".And nova-compute fails to start. Steps to reproduce ================== Edit vcpu_pin_set=None or vcpu_pin_set="" then restart nova-compute service Expected result =============== Get_vcpu_total returns total_pcpus, and nova-compute service starts successfully. Actual result ============= When set vcpu_pin_set to None, raise following exception and nova-compute service fails to start: 2016-05-10 09:00:02.835 TRACE nova.compute.manager Traceback (most recent call last): 2016-05-10 09:00:02.835 TRACE nova.compute.manager File "/opt/stack/nova/nova/compute/manager.py", line 6460, in update_available_resource 2016-05-10 09:00:02.835 TRACE nova.compute.manager rt.update_available_resource(context) 2016-05-10 09:00:02.835 TRACE nova.compute.manager File "/opt/stack/nova/nova/compute/resource_tracker.py", line 500, in update_available_resource 2016-05-10 09:00:02.835 TRACE nova.compute.manager resources = self.driver.get_available_resource(self.nodename) 2016-05-10 09:00:02.835 TRACE nova.compute.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5363, in get_available_resource 2016-05-10 09:00:02.835 TRACE nova.compute.manager data["vcpus"] = self._get_vcpu_total() 2016-05-10 09:00:02.835 TRACE nova.compute.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 4958, in _get_vcpu_total 2016-05-10 09:00:02.835 TRACE nova.compute.manager available_ids = hardware.get_vcpu_pin_set() 2016-05-10 09:00:02.835 TRACE nova.compute.manager File "/opt/stack/nova/nova/virt/hardware.py", line 50, in get_vcpu_pin_set 2016-05-10 09:00:02.835 TRACE nova.compute.manager cpuset_ids = parse_cpu_spec(CONF.vcpu_pin_set) 2016-05-10 09:00:02.835 TRACE nova.compute.manager File "/opt/stack/nova/nova/virt/hardware.py", line 113, in parse_cpu_spec 2016-05-10 09:00:02.835 TRACE nova.compute.manager "expression %r") % rule) 2016-05-10 09:00:02.835 TRACE nova.compute.manager Invalid: Invalid inclusion expression 'None' When set vcpu_pin_set to "", raise following exception and nova-compute service fails to start: 2016-05-10 08:55:18.558 TRACE nova.compute.manager Traceback (most recent call last): 2016-05-10 08:55:18.558 TRACE nova.compute.manager File "/opt/stack/nova/nova/compute/manager.py", line 6460, in update_available_resource 2016-05-10 08:55:18.558 TRACE nova.compute.manager rt.update_available_resource(context) 2016-05-10 08:55:18.558 TRACE nova.compute.manager File "/opt/stack/nova/nova/compute/resource_tracker.py", line 500, in update_available_resource 2016-05-10 08:55:18.558 TRACE nova.compute.manager resources = self.driver.get_available_resource(self.nodename) 2016-05-10 08:55:18.558 TRACE nova.compute.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 5363, in get_available_resource 2016-05-10 08:55:18.558 TRACE nova.compute.manager data["vcpus"] = self._get_vcpu_total() 2016-05-10 08:55:18.558 TRACE nova.compute.manager File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 4971, in _get_vcpu_total 2016-05-10 08:55:18.558 TRACE nova.compute.manager if not (available_ids <= online_pcpus): 2016-05-10 08:55:18.558 TRACE nova.compute.manager TypeError: can only compare to a set Environment =========== Mitaka version and KVM driver To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1579664/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

