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-00000012 | 
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-00000012 | 
a00696d5-32ba-475e-9528-59bf11cffea6 | a00696d5-32ba-475e-9528-59bf11cffea6 |
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+
[stack@localhost compute(keystone_admin)]$ nova hypervisor-servers 
534653c9-890d-4b25-9d6d-f4f260945384 
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+
| ID                                   | Name              | Hypervisor ID      
                  | Hypervisor Hostname                  |
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+
| 8b09bb55-c288-4d95-8caf-60550a661350 | instance-00000012 | 
534653c9-890d-4b25-9d6d-f4f260945384 | 534653c9-890d-4b25-9d6d-f4f260945384 |
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+


Expected result
===============
The instance only shows up when 'nova hypervisor-servers' is run against the 
node where the instance is deployed.

Actual result
=============
The instance shows up when 'nova hypervisor-servers' is run against any node.

Environment
===========
nova @ ad842aa
ironic @ 4404292.

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

Title:
  'nova hypervisor-servers' returns unexpected results when working with
  Ironic

Status in OpenStack Compute (nova):
  New

Bug description:
  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-00000012 | 
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-00000012 | 
a00696d5-32ba-475e-9528-59bf11cffea6 | a00696d5-32ba-475e-9528-59bf11cffea6 |
  
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+
  [stack@localhost compute(keystone_admin)]$ nova hypervisor-servers 
534653c9-890d-4b25-9d6d-f4f260945384 
  
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+
  | ID                                   | Name              | Hypervisor ID    
                    | Hypervisor Hostname                  |
  
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+
  | 8b09bb55-c288-4d95-8caf-60550a661350 | instance-00000012 | 
534653c9-890d-4b25-9d6d-f4f260945384 | 534653c9-890d-4b25-9d6d-f4f260945384 |
  
+--------------------------------------+-------------------+--------------------------------------+--------------------------------------+

  
  Expected result
  ===============
  The instance only shows up when 'nova hypervisor-servers' is run against the 
node where the instance is deployed.

  Actual result
  =============
  The instance shows up when 'nova hypervisor-servers' is run against any node.

  Environment
  ===========
  nova @ ad842aa
  ironic @ 4404292.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1815793/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to