Finding juju models in MAAS

Is there any way to detect which model/controller a server in MAAS is deployed into?

It’s hard to track down servers going up and down into our juju models atm.

Anyone got experience in this? It’s a MAAS topic I guess, but related with juju…

I don’t believe there is which brings me to the point that I’ve broken models as a result of poking around in MAAS with a pointy stick.

Juju should tag and lock instances it’s consumed from MAAS pools. It should be immediately apparent which knobs you can turn with no effect and which ones you should leave alone.

The same holds true for any cloud actually, Juju controlled resources should have some kind of protection/flag enabled. If absolutely necessary, (like a dead controller) only after manually disabling at least two other checks/flags should you be “permitted” to delete or modify an object created from a model.

We do set an attribute of MAAS instances.
agent_name gets set to the model uuid of the model that it is included in.
I don’t know that the MAAS UI makes it easy to see the agent name of running instances, but the information is there. (It is how Juju itself lists all the instances in a model and helps to ensure things like ‘destroy-model’ cleanup all resources.)

On the Juju side, we do provide mechanisms for disallowing actions on a model (juju disable-command, juju disabled-commands, juju enable-command). These allow you to disable things like destroy-machine in models that are considered stable.
But that isn’t the same as telling the underlying provider that it shouldn’t be controlled via the normal dashboard.

It isn’t something that we have explored, but it does make sense.

There’s a blocked concept in MAAS. We’ve run astray of it when someone locks the MAAS end and we try to do something that get a “cloud says no” error.

It’s something we could take forward as an idea around locking/unlocking things in MAAS using that as a feature request for the future.

When the model deploys onto maas it should also add notes with the juju model, units, containers, etc. All that metadata could go in the notes for the VM or provisioned bare metal.

Feature request!

1 Like