Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retry-provisioning command #13212

Merged
merged 1 commit into from
Aug 4, 2021
Merged

Conversation

wallyworld
Copy link
Member

The juju retry-provisioning command was broken because it was updating the machine agent status, not the machine instance status when it set the "transient=true" status flag.
This PR fixes that, and also addresses a long standing issue where the facade code to do the update was in the wrong package. The update code is moved from the apiserver/common package to the client facade package.

QA steps

Hard to QA unless the provider returns an error. I hard coded the LXD provider to return an error and added a machine. AFter the provisioning failed, I ran juju retry-provisioning and saw the operation being retried using juju status.

Bug reference

https://bugs.launchpad.net/juju/+bug/1938736

SetInstanceStatus(sInfo status.StatusInfo) error
}

func (c *Client) updateInstanceStatus(tag names.Tag, data map[string]interface{}) error {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved across from apiserver/common

@wallyworld
Copy link
Member Author

@wallyworld wallyworld force-pushed the retry-provisioning-fix branch from d409a40 to 79f68c7 Compare August 4, 2021 02:49
Copy link
Member

@tlm tlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wallyworld
Copy link
Member Author

$$merge$$

@wallyworld wallyworld force-pushed the retry-provisioning-fix branch from 79f68c7 to 5fc7851 Compare August 4, 2021 03:36
@wallyworld
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit 0864d73 into juju:2.9 Aug 4, 2021
@wallyworld wallyworld mentioned this pull request Aug 6, 2021
jujubot added a commit that referenced this pull request Aug 8, 2021
#13220

Merge 2.9

#13211 Fix data race (accessing charmInfo) in TestV2CharmExitsApplicationWorker
#13212 Fix retry-provisioning command
#13210 Add note and todo
#13209 Improve readablity of 'no prdesc not found' error message
#13214 Adds remaining authorization objects to ignore
#13215 Use a key-based mutex lock to download resources/agent bins once
#13218 Show application data set by the remote app in show-unit output
#13219 Add impish to the ubuntu series list

Trivial conflicts in imports/code comments.

```
Conflicts:
# apiserver/facades/client/client/client.go
# apiserver/facades/schema.json
# resource/resourceadapters/opener.go
```
## QA steps

See PRs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants