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/ diff/1/ cmd/jujud/ upgradevalidati on.go upgradevalidati on.go (right):
File cmd/jujud/
https:/ /codereview. appspot. com/11137044/ diff/1/ cmd/jujud/ upgradevalidati on.go#newcode16 5 upgradevalidati on.go:165: if err := SetPassword( password) ; err != nil {
cmd/jujud/
setter.
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 SetPassword( ).
the fact that APIInfo.Password isn't set yet to indicate we need to call
state.State.
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/