I had the same error after deciding to start over with a fresh Juju setup and forgetting to run juju destroy-environment
before deleting my Juju config (~/.juju
). This left my MaaS setup thinking it was currently deployed to while my new Juju setup had never been bootstrapped. This lead to getting the 409 CONFLICT
conflict error.
When I tried to connect my new configuration to the same MaaS, it gave that error. I even tried manually deallocating all the nodes in the MaaS thinking it was having some trouble there.
But that's not what the problem was. MaaS stores files, some of them including the Juju bootstrapped state.
To reset this, you need to run:
maas-cli login root http://<your_MaaS_server_hostname>/MAAS/
maas-cli root files list
See if any of the files listed have the filename bootstrap-verify
or provider-state
. If so, run the following commands to remove the files and reset the MaaS to being in an "Non bootstrapped" state:
maas-cli root file delete bootstrap-verify
maas-cli root file delete provider-state
Run juju status
. If it gives you an error that indicates it is not bootstrapped, simply run juju bootstrap
and you should be good to go. If it gives some other error indicating that it thinks it's deployed but can't find a file or something, then remove the folder ~/.juju/environments/
(maybe back it up just in case), and then run juju bootstrap
.