Change Default Domain Name in MaaS

Has anyone ever changed the domain name in MaaS? My question is I already have:



I have over 100 records and I’d like to not loose them. Has any one changed their domain after the system is up and running?

I did that. You can do it from the CLI. I’m in a meeting right now so I can’t look up the exact command.

And then I looked up what I did.

maas ansible domains read
maas ansible domain update 0

0 is the id of the domain that you want to change of course, and it is listed by the domains read command.

I tried to run maas ansible domains read but did not worked. Can you please direct me to a specific CLI?

tghosal@test01:~$ maas ansible domains read
usage: maas [-h] COMMAND …

optional arguments:
-h, --help show this help message and exit

Hi @tghosal,

I think the command @lloyd pasted specified the profile name of ansible which I imagine is not the same you have.

You can check if you are logged in with any profile in the MAAS CLI with maas list. If you do not see anything there, you will have to check out the maas login -h command.

When you have logged in and created a profile name, you should be able to run the same commands. Just remember to swap out ansible with your profile name.

Ok, but my question is,

Can we add a domain name and change it to default such that all the authoritative servers registered under my previous domain will automaticall migrated to new domain which I have marked default?

The answer to your question is no.

The default domain is simply the default DNS domain that is used when you deploy a machine. Changing the default domain only affects future deployments and machines that are already deployed (and other DNS resources) stay in their original domain.

It looks like MAAS will update the domain assigned to Ready nodes when you change the default, but they aren’t in the DNS yet, so once again no DNS changes are made.

1 Like