[RFE] FSM event for skipping automatic cleaning

Bug #1630442 reported by Yuriy Zveryanskyy
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Triaged
Wishlist
Unassigned

Bug Description

Currently if automatic cleaning disabled node does quickly transition via CLEANING state. If API "get node" request comes at this moment it shows wrong state. Node provision state notifications should follow FSM logic and to be consistently with DB states. Therefore two messages (start, end) will be issued in this case. If a service collects nodes states history based on notifications, operator always will see transitions related to automatic cleaning in the results, even it disabled on the cluster. This also causes two non needed updates on services like Searchlight. Proposal: add new FSM event "skip" that changes state directly to AVAILABLE, two new FSM transitions related to automatic cleaning with this event:

add_transition(MANAGEABLE, AVAILABLE, 'skip')
add_transition(DELETING, AVAILABLE, 'skip')

Add logic based on existing config option that enables/disables automatic cleaning and new event to conductor manager.

Tags: needs-spec rfe
tags: added: rfe
summary: - FSM event for skipping automatic cleaning
+ [RFE] FSM event for skipping automatic cleaning
Revision history for this message
Vladyslav Drok (vdrok) wrote :

This makes sense to me, the change should be pretty small and easy. And this way we'll avoid claiming a worker just to check an if statement.

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Not sure that it deserves an rfe tho, seems like a usual wishlist bug.

Changed in ironic:
assignee: nobody → Varun Gadiraju (varun-gadiraju)
Revision history for this message
Mario Villaplana (mario-villaplana-j) wrote :

This sounds fine to me. If cleaning is a no-op in this case, it makes sense to just add an edge around it on the state graph.

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

I'm not sure I understand what is being proposed here. Looking at the FSM diagram [1], are you proposing that we add a 'skip' event/verb (arrow) from 'manageable' to 'available'? Or from 'cleaning' to 'available'? (I'll try to catch you on irc tomorrow.)

[1] http://docs.openstack.org/developer/ironic/_images/states.svg

Revision history for this message
Yuriy Zveryanskyy (yzveryanskyy) wrote :

Ruby, description updated.

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

If we were to add a new transition/event/verb, I don't think we should use 'skip'. 'skip' means that something is being skipped -- but you don't know what is being skipped. It seems to me that you want a 'go directly to', and since they are both going to 'available', maybe 'available' or some other verb like that ('direct-avail') would work.

I don't understand though, what is wrong with having it go to cleaning first. It is going to cleaning, finding out that it is disabled, and then continuing to available. Is it bad to emit 2 extra notifications?

Ruby Loo (rloo)
Changed in ironic:
importance: Undecided → Wishlist
Changed in ironic:
assignee: Varun Gadiraju (varun-gadiraju) → nobody
Revision history for this message
Ruby Loo (rloo) wrote :

This was discussed in today's ironic meeting [1]. People don't like 'skip'. And it isn't clear whether we even want this feature. We'd like more details in a spec.

[1] at 17:17:34, http://eavesdrop.openstack.org/meetings/ironic/2016/ironic.2016-11-28-17.00.log.html

tags: added: needs-spec
Changed in ironic:
status: New → Triaged
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.