I managed to delete my Juju client cofiguration without running a
juju destroy-environment first, leaving my MaaS in a state where I could not deploy to it.
I would get the following (conflicting) output
$ juju bootstrap ERROR environment is already bootstrapped $ juju status ERROR Unable to connect to environment "". Please check your credentials or use 'juju bootstrap' to create a new environment. Error details: no instances found
So, I tried running
juju destroy-environment with the new config, to see if it would clean up the old Juju environment on the MaaS system. It gave me the error "ERROR gomaasapi: got error back from server: 409 CONFLICT".
I went into the MaaS GUI and stopped the leftover machines, and then deleted all the nodes and had then go through the discovery and commissioning stages again, but I still got the same errors after all that!
Is there a way to reset this?