discoverd incorrectly reports False from validate when disabled

Bug #1431999 reported by aeva black
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Dmitry Tantsur

Bug Description

When support for ironic-discoverd is disabled by config option (and this is the current default behavior), calling "ironic node-validate" incorrectly reports that the interface fails validation:

| Interface | Result | Reason |
+------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------+
| inspect | False | ironic-discoverd support is disabled in configuration, set [discoverd]enabled to true to enable |

This indicates to users that they have done something wrong -- when in fact it is a configuration option that the operator has set.

Unsupported interfaces should return a value of "None", not "False".

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
assignee: nobody → Devananda van der Veen (devananda)
importance: Undecided → High
Revision history for this message
aeva black (tenbrae) wrote :

This currently only affects the "fake" driver, since no other drivers instantiate the DiscoverdInspect class yet. Changing to Medium as it doesn't affect any users.

Changed in ironic:
importance: High → Medium
Changed in ironic:
status: Triaged → In Progress
Revision history for this message
Dmitry Tantsur (divius) wrote :

As I already said in a review, I don't agree it's a bug. We don't have a good way to report unsupported interfaces, None means missing interface, not unsupported. And the crucial difference is whether an admin can "fix" it. Maybe we should invent a "disabled" state?

Changed in ironic:
assignee: Devananda van der Veen (devananda) → Dmitry "Divius" Tantsur (divius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit dc05d18b566174afd772b18e256089a664e4c5b6
Author: Dmitry Tantsur <email address hidden>
Date: Thu Mar 5 17:45:43 2015 +0100

    Start using in-band inspection

    Start using in-band inspection with ironic-discoverd, but do not
    instantiate the driver interface when discoverd support is disabled in
    the config file.

    * Check the CONF option prior to instantiating DiscoverdInspect class
      and binding it to any driver interface
    * Updates unit tests to better test the loading (or lack thereof) of the
      driver.inspect interface, based on the CONF option

    If in-band discovery is enabled by setting [discoverd] enabled=True in
    the config file, then the following drivers will bind it to their
    inspect interface:
    * pxe_ssh
    * pxe_ipmitool
    * pxe_ipminative
    * pxe_drac

    This patch also fixes a few nits (copied from previous reviews).

    The bug tagged below presently affects only the "fake" driver. Without
    the above-mentioned changes, enabling discoverd for any
    production-facing driver would have led to the problem described there.

    Updated UnsupportedDriverExtension error message to suggest that
    the extension might be disabled.

    Co-authored-by: Devananda van der Veen <email address hidden>

    Closes-bug: #1431999
    Implements: blueprint inband-properties-discovery
    Change-Id: I1dd844525852b1ec806f286d01dfc95313c6ad94

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: kilo-3 → 2015.1.0
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.