It definitely confirms that it is the second part of the check that fails - we can see MAAS machine but cannot find corresponding Juju machine.
So the PR above will help your case somewhat - even though the credential will still be invalidated since MAAS throws up a Permission Error as your MAAS machine is Locked and Juju will still treat it as a credential error, at least when you go to update the credential, the update will succeeded and you would not need to swap credentials underneath.
@Stamatis Katsaounis (skatsaounis),
Thank you for the update \o/
It definitely confirms that it is the second part of the check that fails - we can see MAAS machine but cannot find corresponding Juju machine.
So the PR above will help your case somewhat - even though the credential will still be invalidated since MAAS throws up a Permission Error as your MAAS machine is Locked and Juju will still treat it as a credential error, at least when you go to update the credential, the update will succeeded and you would not need to swap credentials underneath.