[RFE] Add support for operators on root device hints

Bug #1561137 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Lucas Alvares Gomes
ironic-lib
Fix Released
Wishlist
Lucas Alvares Gomes
ironic-python-agent
Fix Released
Wishlist
Lucas Alvares Gomes

Bug Description

Root device hints is a mechanism that allow operators to pass some hints to the deploy ramdisk about which disk it should pick for the deployment.

Currently this mechanism only supports exact values, so you operators can not specify things like: Pick a disk which the size is greater than etc...

By support operators we would improve a lot the use of root device hints, making it less rigid. This RFE proposes supporting the same operators as nova for capabilities [0], which are:

* = (equal to or greater than as a number) (I know...)
* == (equal to as a number)
* != (not equal to as a number)
* >= (greater than or equal to as a number)
* <= (less than or equal to as a number)
* s== (equal to as a string)
* s!= (not equal to as a string)
* s>= (greater than or equal to as a string)
* s> (greater than as a string)
* s<= (less than or equal to as a string)
* s< (less than as a string)
* <in> (substring)
* <all-in> (all elements contained in collection)
* <or> (find one of these)

Examples are: ">= 5", "s== 2.1.0", "<in> gcc", "<all-in> aes mmx", and "<or> fpu <or> gpu"

[0] https://github.com/openstack/nova/blob/bc5035343d366a18cae587f92ecb4e871aba974a/nova/scheduler/filters/extra_specs_ops.py

Tags: rfe-approved
tags: added: rfe
Changed in ironic:
importance: Undecided → Wishlist
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Jim Rollenhagen (jim-rollenhagen) wrote :

Going to talk about this at the next meeting, thinking this may not need a spec.

Revision history for this message
Dmitry Tantsur (divius) wrote :

We had a quick chat on the meeting today. Good news is that this RFE does not require a spec. Slightly worse news is that we might support both eq, ne, lt, etc and ==, !=, < so that not to surprise people who are used to nova notation.

Revision history for this message
Mathieu Mitchell (mat128) wrote :
Revision history for this message
Jim Rollenhagen (jim-rollenhagen) wrote :

We've decided that this syntax needs a bit of work. The goal is to align with nova and inspector, where the syntax of each is supported here. Lucas, can you re-propose the syntax to match those and we can re-visit?

Revision history for this message
Dmitry Tantsur (divius) wrote :

For comparison: here's what inspector has: http://docs.openstack.org/developer/ironic-inspector/usage.html#conditions. Would be good to have something compatible with both to reduce confusion.

Changed in ironic:
status: New → Confirmed
Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Hi folks,

So wouldn't be better to pick one or another? Cause trying to merge the inspector way with the nova way and I believe the result will be an over-complicated UX. For example, "eq" in inspector can be mapped to "==" and "s==" in nova.

What you guys think, shouldn't we pick a winner here?

Revision history for this message
Ruby Loo (rloo) wrote :

https://review.openstack.org/#/c/318538/ (
Get root device hints from the node object) was merged.

Revision history for this message
Ruby Loo (rloo) wrote :

We agreed in mid-cycle (well, Dmitry said it was fine if this doesn't support inspector operators, and no one disagreed) that we'd go with nova operators.

The oslo changes should provide the same as nova's operators (and/or more).

Revision history for this message
Jim Rollenhagen (jim-rollenhagen) wrote :

Lucas, could you update the description to do a nova-like thing (as agreed in the midcycle), and we will approve?

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/335070

Changed in ironic:
status: Confirmed → In Progress
tags: added: rfe-approved
removed: rfe
Changed in ironic-lib:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Changed in ironic-python-agent:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Changed in ironic-lib:
importance: Undecided → Wishlist
Changed in ironic-python-agent:
importance: Undecided → Wishlist
Changed in ironic-lib:
status: New → In Progress
Dmitry Tantsur (divius)
Changed in ironic-python-agent:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-lib (master)

Reviewed: https://review.openstack.org/348953
Committed: https://git.openstack.org/cgit/openstack/ironic-lib/commit/?id=dccd7b17895046d8b34ee9f450900b81a4a266d1
Submitter: Jenkins
Branch: master

commit dccd7b17895046d8b34ee9f450900b81a4a266d1
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Jul 29 17:02:06 2016 +0100

    Extend parse_root_device_hints to support operators

    This patch is extending the parse_root_device_hints() method to make it
    work with the oslo.utils operators.

    Partial-Bug: #1561137
    Change-Id: I9ab7357e396b89e1fe0c326d9bdfaca71916910e

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

Reviewed: https://review.openstack.org/358000
Committed: https://git.openstack.org/cgit/openstack/ironic-lib/commit/?id=96c287d34e29267d4441760d85c2b26042d883b1
Submitter: Jenkins
Branch: master

commit 96c287d34e29267d4441760d85c2b26042d883b1
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Aug 19 16:31:33 2016 +0100

    Add match_root_device_hints() to the utils.py module

    This patch is adding a function called match_root_device_hints() to the
    utils.py module. This function tries to find a device that matches all the
    given root device hints.

    Closes-Bug: #1561137
    Change-Id: Ia3ad098d6334ba22387c0f6d17b4bd518b178ca9

Changed in ironic-lib:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic-lib 2.2.0

This issue was fixed in the openstack/ironic-lib 2.2.0 release.

Changed in ironic-python-agent:
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/386204

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Lucas Alvares Gomes (<email address hidden>) on branch: master
Review: https://review.openstack.org/335070

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/386714

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

Reviewed: https://review.openstack.org/366742
Committed: https://git.openstack.org/cgit/openstack/ironic-python-agent/commit/?id=cca1cd48efb544df54054b4538d1dae4a182facf
Submitter: Jenkins
Branch: master

commit cca1cd48efb544df54054b4538d1dae4a182facf
Author: Lucas Alvares Gomes <email address hidden>
Date: Wed Sep 7 14:10:11 2016 +0100

    Add support for root device hints with operators

    This patch is updating IPA to use the match_root_device_hints() method
    provided by ironic-lib version 2.2.0.

    Partial-Bug: #1561137
    Depends-On: I1d9dc7a57ea391a3419710c289242b39a4201463
    Change-Id: Id93dd0360137df600f5a656348279e56c6b84bf9

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

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

commit 2383d8d014e3ae8cceca4e88ba0367c0692d878c
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Oct 13 15:43:07 2016 -0300

    Replace parse_root_device_hints with the ironic-lib version one

    This patch is replacing the parse_root_device_hints() method from
    deploy_utils.py with the ironic-lib version.

    The parse_root_device_hints() method is only being used to verify the
    syntax of the root device hints, finding/matching a disk with the hints
    is performed by IPA.

    The ironic-lib version also does add support for using operators such as
    (>=, >, <, etc...) to finding a suitable disk device.

    Closes-Bug: #1561137
    Depends-On: Id93dd0360137df600f5a656348279e56c6b84bf9
    Change-Id: I4516d9f1f1733be26ae603b70c1e59ccf19e0448

Changed in ironic:
status: In Progress → Fix Released
Changed in ironic-python-agent:
status: In Progress → Fix Released
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/392114

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

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

commit 45b85e580e32654308ee3aeb8248a75b127ccbee
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Oct 14 14:44:38 2016 -0300

    Docs: Document using operators with root device hints

    This patch is adding documentation for operators in root device hints:
    In which release they are available, what are the supported operators
    and few usage examples.

    The patch also adds a link to the documentation in the release note.

    Closes-Bug: #1561137
    Change-Id: I419ca5b07238a3996bcc0c76560349ad70a93f52

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 7.0.0

This issue was fixed in the openstack/ironic 7.0.0 release.

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.