If user trigger an unlock when stx-openstack is reapplying, the unlock_ready flag should not be removed.

Bug #1837343 reported by Yan Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Yan Chen

Bug Description

Test steps:
1. deploy starlingx infrastructure for a simplex system and apply stx-openstack.
2. lock the controller-0.
3. unlock controller-0, this operation will trigger the stx-openstack reapply.
3. before the reapply finished, unlock controller-0 again.

Expected Result:
As stx-openstack is already under reapplying, the new unlock operation will not trigger the reapply again, and the unlock_ready flag should not be removed.

Actual Result:
The reapply is not triggered again.
But unlock_ready flag is removed again, although the flag is already removed by the former unlock.

This is a logic error, though impact is low.

Revision history for this message
Yan Chen (ychen2u) wrote :
Changed in starlingx:
assignee: nobody → Yan Chen (ychen2u)
Revision history for this message
Yan Chen (ychen2u) wrote :

From the last piece of the attached file, we can see the following log:

2019-07-04 15:46:54.702 112183 INFO sysinv.api.controllers.v1.host [-] controller-0 Action unlock perform notify_mtce
2019-07-04 15:46:54.708 112183 INFO sysinv.api.controllers.v1.host [-] Remove unlock ready flag
....
2019-07-04 15:46:54.743 112183 INFO sysinv.api.controllers.v1.rest_api [-] Response={u'status': u'pass'}
2019-07-04 15:46:54.784 112183 INFO sysinv.api.controllers.v1.host [-] stx-openstack system app is present but not applied, skipping re-apply

Removal of unlock_ready is triggered but app reapply is not.
These 2 operations should be aligned.

Revision history for this message
Ghada Khalil (gkhalil) wrote :

@ychen2u, what is the system impact of this issue?

tags: added: stx.containers
Ghada Khalil (gkhalil)
Changed in starlingx:
status: New → Incomplete
Changed in starlingx:
status: Incomplete → In Progress
Revision history for this message
Yan Chen (ychen2u) wrote :

Currently there's no obvious impact on the system.
But if a user do unlock twice when the first unlock is still on-going, there might be a competition on the unlock_ready flag.

This issue can be fixed with the following patch.
https://review.opendev.org/#/c/669278/

Revision history for this message
Frank Miller (sensfan22) wrote :

This issue is part of a set of issues with application apply/re-apply. LP https://bugs.launchpad.net/starlingx/+bug/1837750 is tracking a set of changes to improve the re-apply logic and will include a fix for this 1837343 as well. My recommendation is to abandon the current proposed commit and mark 1837343 as a duplicate of 1837750.

Also as this is impacting containers and is reproducible, adding the stx.2.0 gating tag.

tags: added: stx.2.0
Changed in starlingx:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on config (master)

Change abandoned by Yan Chen (<email address hidden>) on branch: master
Review: https://review.opendev.org/669278
Reason: Abandon this commit as Frank recommended.

Revision history for this message
Yan Chen (ychen2u) wrote :

Abandon this commit as Frank recommended.
https://review.opendev.org/#/c/669278/

Revision history for this message
Yan Chen (ychen2u) wrote :
Changed in starlingx:
status: In Progress → Invalid
Cindy Xie (xxie1)
Changed in starlingx:
status: Invalid → Triaged
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Duplicate bug has been addressed in master & the r/stx.2.0 branch. Marking as "Fix Released" to match.

Changed in starlingx:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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