ntp install fails causing commissioning and deploying to fail on trusty and xenial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
New
|
Undecided
|
Unassigned |
Bug Description
I cannot commission new machines as they fail commissioning. I have tried three different machines and tried to commission with both trusty and xenial but they all fail with:
2017-07-02 16:47:06,049 - util.py[DEBUG]: Running command ['systemctl', 'reload-
2017-07-02 16:47:06,106 - cc_ntp.py[ERROR]: Failed to reload/start ntp service: Unexpected error while running command.
Command: ['systemctl', 'reload-
Exit code: 1
Reason: -
Stdout: -
Stderr: Job for ntp.service failed because the control process exited with error code. See "systemctl status ntp.service" and "journalctl -xe" for details.
Traceback (most recent call last):
File "/usr/lib/
reload_
File "/usr/lib/
util.subp(cmd, capture=True)
File "/usr/lib/
cmd=args)
cloudinit.
Command: ['systemctl', 'reload-
Exit code: 1
Reason: -
Stdout: -
Stderr: Job for ntp.service failed because the control process exited with error code. See "systemctl status ntp.service" and "journalctl -xe" for details.
If I set the node to allow an ssh connection and not power off during commissioning then I can ssh to the node. Once there I can confirm that I can reproduce the error with "sudo systemctl restart ntp". I can 'fix' it by disabling the apparmor ntp profile:
ubuntu@
sudo: unable to resolve host caring-koi
Job for ntp.service failed because the control process exited with error code. See "systemctl status ntp.service" and "journalctl -xe" for details.
ubuntu@
sudo: unable to resolve host caring-koi
ubuntu@
sudo: unable to resolve host caring-koi
ubuntu@
sudo: unable to resolve host caring-koi
ubuntu@
Oddly, I worked around this by adding a commissioning script to create the symlink above which allowed me to commission 3 nodes. However, when I came to add a third it no longer seemed to work and I was back to the error above. fwiw I also hit the same error when deploying via juju and worked around it here by deploying zesty images.
I appreciate this may be a bug in ntp or cloud-init but I'm experiencing it in maas.
summary: |
- Cannot commission or deploy trusty or xenial + ntp install fails causing commissioning and deploying to fail on trusty + and xenial |
Hi Liam,
This is an issue with either the kernel or apparmor, hence this bug has been marked a duplicate of such issue.
That said, MAAS 2.1 (and 2.2) is now deprecated, as such, I highly recommend you upgrade to 2.2. Using MAAS 2.2 now has a work around that would prevent this failure.
If you are no upgrade, you have two options:
1. Use "hwe-16.04" as the kernel to deploy the machine.
2. Use apparmor=0 as a kernel paran. This will, however, cause apparmor to be disabled in your deployed machine.
Thanks!