BaremetalHostManager cannot distinguish baremetal hosts from other hosts

Bug #1260265 reported by Arata Notsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Hans Lindgren
OpenStack Compute (nova)
Fix Released
Medium
Hans Lindgren

Bug Description

BaremetalHostManager could distinguish baremetal hosts by checking "baremetal_driver" exists in capabilities or not. However, now BaremetalHostManager cannot, because capabilities are not reported to scheduler and BaremetalHostManager always receives empty capabilities. As a result, BaremetalHostManager just does the same thing as the original HostManager.

Changed in nova:
status: New → Triaged
importance: Undecided → Medium
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/97447

Changed in ironic:
assignee: nobody → Hans Lindgren (hanlind)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/94043
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ce3f9e5fa9cd05f3ee3bb0cc7d06521d05901cf4
Submitter: Jenkins
Branch: master

commit ce3f9e5fa9cd05f3ee3bb0cc7d06521d05901cf4
Author: Hans Lindgren <email address hidden>
Date: Sat May 17 13:42:40 2014 +0200

    Remove traces of now unused host capabilities from scheduler

    Host capabilities updates are no longer used by the scheduler. All host
    state is instead fetched from the DB. Some left over fields are still kept
    by the host manager but contain no data. This change remove the last
    traces of host capabilities from the scheduler.

    The baremetal host manager used to rely on capabilities info to
    decide which host state class to use, VM or baremetal. This has been
    broken since host capabilities were removed (bug 1260265). The logic to
    decide on host state class to use is updated to use DB data instead and
    a test is added to verify the same.

    Change-Id: I350109492c2addf5fdfaadee7cec4784f244e102
    Closes-Bug: #1260265

Changed in nova:
status: Triaged → Fix Committed
Hans Lindgren (hanlind)
Changed in nova:
assignee: nobody → Hans Lindgren (hanlind)
Revision history for this message
Dmitry Tantsur (divius) wrote :

Critical in Ironic, as Nova change breaks our tests

Changed in ironic:
importance: Undecided → Critical
Changed in ironic:
assignee: Hans Lindgren (hanlind) → Robert Collins (lifeless)
Revision history for this message
aeva black (tenbrae) wrote :

Re-opening this bug, since the commit was reverted in
  https://review.openstack.org/97757

Changed in nova:
status: Fix Committed → Confirmed
Changed in ironic:
importance: Critical → Medium
Revision history for this message
aeva black (tenbrae) wrote :

This was incorrectly set to "critical" in Ironic -- that status was meant for the bug created by the patch which attempted to fix this bug. I am setting this bug to "medium" for Ironic until there is an indication that it represents a serious problem for users.

Changed in ironic:
assignee: Robert Collins (lifeless) → Hans Lindgren (hanlind)
status: In Progress → Triaged
aeva black (tenbrae)
tags: added: nova-driver
Hans Lindgren (hanlind)
Changed in nova:
status: Confirmed → In Progress
Hans Lindgren (hanlind)
Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/99026

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/99027

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/99459

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/99460

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/99026
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=656884d60b90c28981659747fd2795d1a509e4ac
Submitter: Jenkins
Branch: master

commit 656884d60b90c28981659747fd2795d1a509e4ac
Author: Hans Lindgren <email address hidden>
Date: Tue Jun 10 12:38:54 2014 +0200

    Update IronicHostManager tests to better match how code works

    This is the first in a series of patches to prepare Ironic for the
    removal of capabilities in Nova HostManager.

    IronicHostManager used to rely on capabilities info to decide which
    host state class to use, VM or baremetal. This has been broken since
    host capabilities reporting were removed in Nova, resulting in Nova
    HostState class always being used.

    IronicBareMetal tests make use of an internal Nova HostManager variable
    in a way that hides the fact that IronicNodeState class is no longer
    used. This patch rewrites tests to better reflect how Ironic/Nova code
    now works and prepares for further changes that needs to land in Ironic
    before Nova HostManager capabilities can be removed.

    Change-Id: I795eaed58f6587585d89366d8f1e521588866a58
    Partial-Bug: #1260265

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/99027
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=9373b141c79f8fc69fc21442e29c5c4a25ec0a52
Submitter: Jenkins
Branch: master

commit 9373b141c79f8fc69fc21442e29c5c4a25ec0a52
Author: Hans Lindgren <email address hidden>
Date: Tue Jun 10 12:39:53 2014 +0200

    Add missing stats to IronicNodeState

    This is the second in a series of patches to prepare Ironic for the
    removal of capabilities in Nova HostManager.

    IronicHostManager used to rely on capabilities info to decide which
    host state class to use, VM or baremetal. This has been broken since
    host capabilities reporting were removed in Nova, resulting in Nova
    HostState class always being used.

    Before IronicNodeState class can be used again, it must be updated to
    store host stats as this is needed by ComputeCapabilitiesFilter to
    correctly filter hosts or this filter will return no hosts.

    Change-Id: I1661107883722bf14a488842373fd3027dc7a62c
    Partial-Bug: #1260265

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/97447
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=09f07a79a2912b57aca6e348a5a164462703df92
Submitter: Jenkins
Branch: master

commit 09f07a79a2912b57aca6e348a5a164462703df92
Author: Hans Lindgren <email address hidden>
Date: Tue Jun 10 12:57:33 2014 +0200

    Fix host manager node detection logic

    This is the last in a series of patches to prepare Ironic for the
    removal of capabilities in Nova HostManager.

    IronicHostManager used to rely on capabilities info to decide which
    host state class to use, VM or baremetal. This has been broken since
    host capabilities reporting were removed in Nova, resulting in Nova
    HostState class always being used.

    This patch fixes the detection logic in IronicHostManager to correctly
    choose IronicHostState class for use with baremetal nodes. Tests are
    added to verify that the correct class is used for both vm and
    baremetal nodes.

    In reality, the new detection logic will not start to deliver the
    correct HostState class until the Nova HostManager change has landed.

    Change-Id: Ifa47d721835cfea87e9d0bce87c7853dd6724b98
    Closes-Bug: #1260265

Changed in ironic:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/97806
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=aef246c67507532da6f03e4670390e5c783a4873
Submitter: Jenkins
Branch: master

commit aef246c67507532da6f03e4670390e5c783a4873
Author: Hans Lindgren <email address hidden>
Date: Wed Jun 4 16:20:14 2014 +0200

    Add missing stats info to BaremetalNodeState

    This is the first of two patches to prepare baremetal for the removal
    of capabilities in Nova HostManager.

    BaremetalHostManager used to rely on capabilities info to decide which
    host state class to use, VM or baremetal. This has been broken since
    host capabilities reporting were removed in Nova, resulting in Nova
    HostState class always being used.

    BaremetalNodeState lacks stats info needed by some filters during
    scheduling. This may result in failures like ComputeCapabilitiesFilter
    not returning any hosts. This must be fixed before BaremetalNodeState
    can be used again.

    Change-Id: I63d992371640b2fd33d35eae72201fd41944f8a4
    Partial-Bug: #1260265

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/99459
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=99002ef53fdb05362b57331b76d6c17c7cb10030
Submitter: Jenkins
Branch: master

commit 99002ef53fdb05362b57331b76d6c17c7cb10030
Author: Hans Lindgren <email address hidden>
Date: Wed Jun 11 19:43:35 2014 +0200

    Fix BaremetalHostManager node detection logic

    This is the second patch to prepare baremetal for the removal of
    capabilities in Nova HostManager.

    BaremetalHostManager used to rely on capabilities info to decide which
    host state class to use, VM or baremetal. This has been broken since
    host capabilities reporting were removed in Nova, resulting in Nova
    HostState class always being used.

    This patch fixes the detection logic in BaremetalHostManager to
    correctly choose BaremetalHostState class for use with baremetal nodes.
    Tests are added to verify that the correct class is used for both vm
    and baremetal nodes.

    In reality, the new detection logic will not start to deliver the
    correct HostState class until the Nova HostManager change that follows
    has landed.

    Change-Id: I0c2e6d985fb29f35b823cdf9a83fead2fa45082a
    Partial-Bug: #1260265

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/99460
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5486935a01ef3ed58b5b43dea4598847d87f759d
Submitter: Jenkins
Branch: master

commit 5486935a01ef3ed58b5b43dea4598847d87f759d
Author: Hans Lindgren <email address hidden>
Date: Sat May 17 13:42:40 2014 +0200

    Remove traces of now unused host capabilities from scheduler

    This is take two of this patch. This time after preparing Baremetal
    and Ironic code to work with the HostManager changes introduced in
    this patch.

    Host capabilities updates are no longer used by the scheduler. All host
    state is instead fetched from the DB. Some left over fields are still
    kept by the host manager but contain no data. This change remove the
    last traces of host capabilities from the scheduler.

    Baremetal/Ironic host managers used to rely on capabilities info to
    decide which host state class to use, VM or baremetal. This has been
    broken since host capabilities reporting were removed. This change
    works in tandem with prior updates to Baremetal/Ironic node detection
    logic to fix this problem.

    Important: This must not be approved until the Ironic patch in
    https://review.openstack.org/97447 has first landed!

    Change-Id: Id5f88c0aa1df9152ddb62904b0544801a8bcfd2a
    Closes-Bug: #1260265

Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Changed in ironic:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.