Code review comment for lp:~jameinel/juju-core/api-set-creds-1199915

Revision history for this message
John A Meinel (jameinel) wrote :

https://codereview.appspot.com/11137044/diff/1/cmd/jujud/upgradevalidation.go
File cmd/jujud/upgradevalidation.go (right):

https://codereview.appspot.com/11137044/diff/1/cmd/jujud/upgradevalidation.go#newcode165
cmd/jujud/upgradevalidation.go:165: if err :=
setter.SetPassword(password); err != nil {
On 2013/07/15 13:53:51, fwereade wrote:
> Hmm. The original idea IIRC was that we save the oldPassword (for
recovery
> purposes), write the new password to disk, and then really set the new
password.
> Not quite sure this mechanism and that one are properly joined-up?

We already have OldPassword available (or StateInfo.Password). We use
the fact that APIInfo.Password isn't set yet to indicate we need to call
state.State.SetPassword().

If we write to disk first, and then crash, the next startup won't call
SetPassword.

I did think carefully about it and had a comment, but if you feel it
needs more clarification I can try to do so.

https://codereview.appspot.com/11137044/

« Back to merge proposal