[WIP] Check instance/machine mapping exclusively for model migration in credential validation
Currently there are two checks being done for credential validation. 1) can we reach all cloud instances? 2) can we cross examine all machines we know about with all the instances we can reach. The 2nd one is redundant for just checking the validity of a credential (we can already reach in the 1st check), but it absolutely needs to be done for model migrations. So this change move things around to perform that check only for migrations, because if one of the machine gets down during that process (of checking the instance mapping) we deem the credential not valid, which is incorrect.
https://bugs.launchpad.net/juju/+bug/2049917
Checklist
- [ ] Code style: imports ordered, good names, simple structure, etc
- [ ] Comments saying why design decisions were made
- [ ] Go unit tests, with comments saying what you're testing
- [ ] Integration tests, with comments saying what you're testing
- [ ] doc.go added or updated in changed packages
QA steps
Documentation changes
Links
Launchpad bug: https://bugs.launchpad.net/juju/+bug/
Jira card: JUJU-5361
/build
/build
Thanks for opening a pull request! Please follow the instructions here to ensure your pull request is ready for review. Then, a maintainer will review your patch.
@hpidcock @anvial
Closing in favor of #17010, moving onto 3.3.