[RFE] Support tags for nodes in Ironic

Bug #1526266 reported by Vladyslav Drok on 2015-12-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
In Progress
Ruby Loo

Bug Description

Ironic will support "tags" field stored in metadata for every node. The same tags will be stored in extra metadata for Nova flavor, so that every flavor can be bound to some group of nodes. To achieve this:
* Ironic API should allow listing nodes by tag
* Scheduler should allow deploying on nodes with tag, fetched from flavor (XXX does it belong in Ironic Nova driver or in Nova scheduler itself?)

Vladyslav Drok (vdrok) wrote :

Spec is merged - https://review.openstack.org/#/c/183971/, the first patch adding a migration too - https://review.openstack.org/#/c/192576/.

Changed in ironic:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: rfe
Changed in ironic:
assignee: nobody → Zhenguo Niu (niu-zglinux)
status: Confirmed → In Progress
Ruby Loo (rloo) wrote :

Specification is available at http://specs.openstack.org/openstack/ironic-specs/specs/approved/nodes-tagging.html.

Copying this from old BP (https://blueprints.launchpad.net/ironic/+spec/nodes-tagging):

Gerrit topic: https://review.openstack.org/#q,topic:nodes-tagging,n,z

Addressed by: https://review.openstack.org/183971
    Add nodes tagging support

Gerrit topic: https://review.openstack.org/#q,topic:bp/nodes-tagging,n,z

Addressed by: https://review.openstack.org/192576
    Add db migration script for creating tags table

Addressed by: https://review.openstack.org/232308
    Add db migration for tags table

Addressed by: https://review.openstack.org/232598
    Add db api layer for CRUD operations on node tags

Addressed by: https://review.openstack.org/233357
    Add Tag, TagList objects and a new tags field to Node

Addressed by: https://review.openstack.org/250478
    Added node tags in ironic-api

Addressed by: https://review.openstack.org/253065
    Joined 'tags' column while getting node

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

Change abandoned by Zhenguo Niu (<email address hidden>) on branch: master
Review: https://review.openstack.org/267434

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

commit c1a8606095d4021c0f484d2bfa86fc15602503eb
Author: Zhenguo Niu <email address hidden>
Date: Wed Oct 21 18:04:35 2015 +0800

    Add db api layer for CRUD operations on node tags

    - set/unset node tags
    - get node tags
    - add/delete single tag
    - check whether node tag exists
    - Delete all tags attached to the node when it's destroyed

    This will not support creating node with tags, just ignore
    the specified tags.

    Change-Id: Ibe83a726d904fd33b8550c8bec134cf05644560e
    Partial-bug: #1526266

tags: added: rfe-approved
removed: rfe

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

commit 19ef56cf00a78871e0d30a160b07f280488ddd0c
Author: Zhenguo Niu <email address hidden>
Date: Fri Jan 29 21:28:50 2016 +0800

    Joined 'tags' column while getting node

    Partial-bug: #1526266
    Change-Id: Iab795248d7b5b1071f6dbd7dc170d1d6adc488a4

Changed in ironic:
assignee: Zhenguo Niu (niu-zglinux) → Vladyslav Drok (vdrok)
Tao Li (eric-litao) on 2017-09-19
Changed in ironic:
status: In Progress → Opinion
Ruby Loo (rloo) wrote :

@Tao, what's the reason for setting the status to 'Opinion'? There are code patches for this.

Changed in ironic:
status: Opinion → In Progress

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

Changed in ironic:
assignee: Vladyslav Drok (vdrok) → Ruby Loo (rloo)

Reviewed: https://review.openstack.org/533700
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=afc432af4d2342a550536967a7c880145266c362
Submitter: Zuul
Branch: master

commit afc432af4d2342a550536967a7c880145266c362
Author: Ruby Loo <email address hidden>
Date: Mon Jan 15 10:11:50 2018 -0500

    node_tag_exists(): raise exception if bad node

    To make tags consistent with traits, change db.api.node_tag_exists()
    to raise a NodeNotFound exception if the node doesn't exist.

    This is a follow up to bbff319f0226af11af3c2864ad8f678abef6dcdb.

    Change-Id: Id0ddf448d97b5ac22ef5dc27154a1b229514a968

Change abandoned by Zhenguo Niu (<email address hidden>) on branch: master
Review: https://review.opendev.org/272624

Change abandoned by Zhenguo Niu (<email address hidden>) on branch: master
Review: https://review.opendev.org/233357

Change abandoned by Zhenguo Niu (<email address hidden>) on branch: master
Review: https://review.opendev.org/250478

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers