-
Notifications
You must be signed in to change notification settings - Fork 174
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
Ops user changes should be rolled back when attempt at VCH reconfigure fails #7814
Comments
I'm going to mark this as a P1 because it's a regression in behavior since 1.3. I don't think we can reasonably fix this for 1.4 due to the complexity, but I think it's significant enough to call out as something that we should be fixing, but can't. To restate the impact of this, the effects are twofold:
|
Is there a workaround? Adding kind/note. |
A high-level workaround would be for the administrator to manually adjust the permissions of the operations user back to what they "should be". That's an annoying sort of workaround though; presumably the whole reason they're using the |
Marking this as blocked by #7818. I think the easiest way to address this would be to use invoke |
Gracefully plumbing through the old configuration values seems to be the hardest part of the above idea; the rest of the change looks roughly like: if conf.ShouldGrantPerms() {
err = opsuser.GrantOpsUserPerms(d.op, d.session, conf)
if err != nil {
return errors.Errorf("Failed to grant permissions to ops-user, failure: %s", err)
}
+
+ defer func() {
+ if err != nil {
+ d.op.Info("Attempting to undo changes to operations user due to previous error: %s", err)
+
+ opsuser.GrantOpsUserPerms(d.op, d.session, oldConf)
+ }
+ }()
} |
@stuclem Looks good. It may be worth noting that there is a workaround to cleanup: Browse to Administration -> Roles, and delete every role that begins with |
Thanks @jzt. Added: Workaround: In the vSphere Client, go to Administration -> Roles and delete every role that begins with |
User Statement:
As a user, when I attempt to change ops user permissions during a
vic-machine configure
, I would expect those changes to be rolled back in the event of a failure.Details:
Currently, an attempt to use
vic-machine configure
to grant permissions to an ops user does not work (see issue #7725, and fix #7777). Even with this fix, there exists a scenario in which changes to the ops user during a failingvic-machine configure
persist even after a rollback is executed. Logic to undo changes to the ops user permissions should be added to the rollback step.Acceptance Criteria:
vic-machine configure
The text was updated successfully, but these errors were encountered: