[Yahoo-eng-team] [Bug 1815793] [NEW] 'nova hypervisor-servers' returns unexpected results when working with Ironic

2019-02-13 Thread Tzu-Mainn Chen
Public bug reported:

Description
===
I have a baremetal environment using Nova to schedule on top of four Ironic 
baremetal nodes. I successfully deployed an instance to one of those nodes. 
Then I ran 'nova hypervisor-servers' against each of the nodes, and the 
instance showed up against every node.

Steps to reproduce
==
After registering the nodes in Ironic and creating the server, I can see that 
the server is deployed on a single Ironic node:

[stack@localhost compute(keystone_admin)]$ openstack hypervisor list
++--+-+-+---+
| ID | Hypervisor Hostname  | Hypervisor Type | Host IP | 
State |
++--+-+-+---+
|  1 | a00696d5-32ba-475e-9528-59bf11cffea6 | ironic  | 192.168.1.2 | 
up|
|  2 | 534653c9-890d-4b25-9d6d-f4f260945384 | ironic  | 192.168.1.2 | 
up|
|  5 | dba7d2e5-0013-48c7-8dc3-2ccc949f4715 | ironic  | 192.168.1.2 | 
up|
|  7 | 015954fa-c900-4798-8c04-808a1504fe35 | ironic  | 192.168.1.2 | 
up|
++--+-+-+---+
[stack@localhost compute(keystone_admin)]$ openstack server list
+--++++-++
| ID   | Name   | Status | Networks 
  | Image   | Flavor |
+--++++-++
| 8b09bb55-c288-4d95-8caf-60550a661350 | instance-0 | ACTIVE | 
provisioning=192.168.1.221 | centos7 | trait-test |
+--++++-++
[stack@localhost compute(keystone_admin)]$ openstack baremetal node list
+--+-+--+-++-+
| UUID | Name| Instance UUID
| Power State | Provisioning State | Maintenance |
+--+-+--+-++-+
| a00696d5-32ba-475e-9528-59bf11cffea6 | dell-14 | None 
| power off   | available  | False   |
| 534653c9-890d-4b25-9d6d-f4f260945384 | dell-15 | None 
| power off   | available  | False   |
| dba7d2e5-0013-48c7-8dc3-2ccc949f4715 | dell-12 | None 
| power off   | available  | False   |
| 015954fa-c900-4798-8c04-808a1504fe35 | dell-13 | 
8b09bb55-c288-4d95-8caf-60550a661350 | power on| active | False 
  |
+--+-+--+-++-+

Then, if I run 'nova hypervisor-servers', the one instance shows up for
multiple nodes:

[stack@localhost compute(keystone_admin)]$ nova hypervisor-servers 
015954fa-c900-4798-8c04-808a1504fe35 
+--+---+--+--+
| ID   | Name  | Hypervisor ID  
  | Hypervisor Hostname  |
+--+---+--+--+
| 8b09bb55-c288-4d95-8caf-60550a661350 | instance-0012 | 
015954fa-c900-4798-8c04-808a1504fe35 | 015954fa-c900-4798-8c04-808a1504fe35 |
+--+---+--+--+
[stack@localhost compute(keystone_admin)]$ nova hypervisor-servers 
a00696d5-32ba-475e-9528-59bf11cffea6 
+--+---+--+--+
| ID   | Name  | Hypervisor ID  
  | Hypervisor Hostname  |
+--+---+--+--+
| 8b09bb55-c288-4d95-8caf-60550a661350 | instance-0012 | 
a00696d5-32ba-475e-9528-59bf11cffea6 | a00696d5-32ba-475e-9528-59bf11cffea6 |
+--+---+--+--+
[stack@localhost compute(keystone_admin)]$ nova hypervisor-servers 
534653c9-890d-4b25-9d6d-f4f260945384 

[Yahoo-eng-team] [Bug 1789991] [NEW] nova-compute error after enrolling ironic baremetal nodes

2018-08-30 Thread Tzu-Mainn Chen
Public bug reported:

Description
===
After enrolling some ironic baremetal nodes, I noticed the following in 
nova-compute.log (longer trace below): 

2018-08-30 17:00:51.142 7 ERROR nova.compute.manager [req-73ba9d4b-b51d-
4ab7-88c8-5fc3f27fd89e - - - - -] Error updating resources for node
0e5705cc-e872-49aa-aff4-1a91278b5cb3.: NotImplementedError: Cannot load
'id' in the base class

Steps to reproduce
==

* Enroll ironic baremetal nodes (openstack baremetal node provide)
* Wait
* Error repeatedly appears in nova-compute.log

Expected result
===
No errors in log

Actual result
=
Errors in log

Environment
===
openstack-nova-compute-18.0.0-0.20180829095234.45fc232.el7.noarch
puppet-nova-13.3.1-0.20180825165256.5d1889b.el7.noarch
python-nova-18.0.0-0.20180829095234.45fc232.el7.noarch
python-novajoin-1.0.19-0.20180828183900.3d58511.el7.noarch
openstack-nova-common-18.0.0-0.20180829095234.45fc232.el7.noarch
python2-novaclient-11.0.0-0.20180807085257.f1005ce.el7.noarch


Logs & Configs
=
2018-08-30 17:00:51.142 7 DEBUG oslo_concurrency.lockutils 
[req-73ba9d4b-b51d-4ab7-88c8-5fc3f27fd89e - - - - -] Lock "compute_resources" 
release\
d by "nova.compute.resource_tracker._update_available_resource" :: held 0.001s 
inner /usr/lib/python2.7/site-packages/oslo_concurrency/lockutils\
.py:285
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager 
[req-73ba9d4b-b51d-4ab7-88c8-5fc3f27fd89e - - - - -] Error updating resources 
for node 0e57\
05cc-e872-49aa-aff4-1a91278b5cb3.: NotImplementedError: Cannot load 'id' in the 
base class
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager Traceback (most recent 
call last):
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7729, in 
_update_av\
ailable_resource_for_node
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager 
rt.update_available_resource(context, nodename)
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 700, 
in up\
date_available_resource
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager 
self._update_available_resource(context, resources)
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 274, in 
inner
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager return f(*args, 
**kwargs)
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 723, 
in _u\
pdate_available_resource
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager 
self._init_compute_node(context, resources)
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 563, 
in _i\
nit_compute_node
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager 
self._setup_pci_tracker(context, cn, resources)
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 594, 
in _s\
etup_pci_tracker
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager n_id = compute_node.id
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 67, in 
getter
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager 
self.obj_load_attr(name)
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 603, in 
obj_l\
oad_attr
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager _("Cannot load '%s' in 
the base class") % attrname)
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager NotImplementedError: 
Cannot load 'id' in the base class
2018-08-30 17:00:51.142 7 ERROR nova.compute.manager

** 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/1789991

Title:
  nova-compute error after enrolling ironic baremetal nodes

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===
  After enrolling some ironic baremetal nodes, I noticed the following in 
nova-compute.log (longer trace below): 

  2018-08-30 17:00:51.142 7 ERROR nova.compute.manager [req-73ba9d4b-
  b51d-4ab7-88c8-5fc3f27fd89e - - - - -] Error updating resources for
  node 0e5705cc-e872-49aa-aff4-1a91278b5cb3.: NotImplementedError:
  Cannot load 'id' in the base class

  Steps to reproduce
  ==

  * Enroll ironic baremetal nodes (openstack baremetal node provide)
  * Wait
  * Error repeatedly appears in nova-compute.log

  Expected result
  ===
  No errors in log

  Actual result
  =
  Errors in log