Merge lp:~danilo/maas/bug-16867570-fqdn-controller into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | no longer in the source branch. |
Merged at revision: | 6046 |
Proposed branch: | lp:~danilo/maas/bug-16867570-fqdn-controller |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
113 lines (+57/-3) 4 files modified
src/maasserver/rpc/rackcontrollers.py (+10/-1) src/maasserver/rpc/tests/test_rackcontrollers.py (+43/-0) src/provisioningserver/rpc/clusterservice.py (+1/-1) src/provisioningserver/rpc/tests/test_clusterservice.py (+3/-1) |
To merge this branch: | bzr merge lp:~danilo/maas/bug-16867570-fqdn-controller |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Review via email: mp+323747@code.launchpad.net |
Commit message
Support rack controllers using fully-qualified domain names as their hostnames
When a rack controller has a hostname set including a domain name (in the dotted form, eg. foo.example.com), registering this rack controller to existing MAAS regiond should keep the FQDN for the controller (if a domain does not exist already, it is added as non-authoritative domain name in MAAS).
Description of the change
To avoid introducing any API changes (eg. by allowing a domain argument to register() calls), we instead allow dotted hostname value and only parse it before committing to database.
Testing instructions:
I've reproduced part of the problem described in the bug using:
uvt-kvm create --memory 2048 --ssh-public-
uvt-kvm ssh --insecure maas1 sudo apt-add-repository ppa:maas/
uvt-kvm ssh --insecure maas1 sudo apt update
uvt-kvm ssh --insecure maas1 sudo apt install maas
uvt-kvm create --memory 2048 --ssh-public-
uvt-kvm ssh --insecure maas2 sudo apt-add-repository ppa:maas/
uvt-kvm ssh --insecure maas2 sudo apt update
uvt-kvm ssh --insecure maas2 sudo apt install maas-rack-
echo maas2.test | uvt-kvm ssh --insecure maas2 sudo tee /etc/hostname
(though, after I restarted from scratch, packages are failing to install for me)
To confirm that the bug is fixed, I've applied the diff from this branch to running instances of both rackd/regiond code on maas1/maas2 VMs (and restarting all MAAS services after), and re-registered the rack controller. It now shows up with the correct domain name.
Looks good. Going to approve with the condition that you add one more test. See inline comment.