UpdateCredentialsCheckModels returns an error if Force causes the update to succeed

Bug #1873273 reported by Martin Hilton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth

Bug Description

In the commonUpdateCredentials method in the Cloud facade it is possible for a credential update to return an error when it was successfully updated.

At https://github.com/juju/juju/blob/develop/apiserver/facades/client/cloud/cloud.go#L657 if the Force flag is used then the error is added to the response but then the code goes on to update the credential anyway. If the update at https://github.com/juju/juju/blob/develop/apiserver/facades/client/cloud/cloud.go#L665 succeeds then the error field in the response is not updated, this means that the returned value claims that there was an error despite the credential baing correctly updated.

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.8-rc1
importance: Undecided → High
status: New → Triaged
Ian Booth (wallyworld)
Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :

To preserve backwards compatibility, a new V7 facade will be needed which will have the new behaviour.

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Haw Loeung (hloeung) wrote :

Is there a workaround for this in 2.7.6 or any 2.7.x series?

Harry Pidcock (hpidcock)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.