Merge lp:~ltrager/maas/lp1603563 into lp:~maas-committers/maas/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Lee Trager | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5515 | ||||
Proposed branch: | lp:~ltrager/maas/lp1603563 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
47 lines (+18/-0) 2 files modified
src/maasserver/models/node.py (+9/-0) src/maasserver/models/tests/test_node.py (+9/-0) |
||||
To merge this branch: | bzr merge lp:~ltrager/maas/lp1603563 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+309305@code.launchpad.net |
Commit message
Reset status_expires when a non-monitored status is set.
Description of the change
In LP1554636 we have multiple users who are reporting that when releasing a deployed node the node goes to failed releasing state. When you look through the attached logs you can see the node goes into a failed releasing state 1 second after the release request comes in. I haven't been able to reproduce this myself but I *think* I found a race condition which is causing this to happen. Node._release was setting the status_expires time in a post_commit hook before the status was set.
What I believe is happening is the status gets set, then the status_monitor service runs using an old expired_status, sees its expired and puts the node into a FAILED_RELEASING state. This happens before the post_commit hook to update the node status is run.
What this MP does is always set the status_expires field to None on save if the status is not monitored.
Looks good to me! (Needs a commit message though.)