Comment 5 for bug 1705508

Revision history for this message
Lee Trager (ltrager) wrote :

I just built master and went to do a fresh install and my setup script failed. In rackd.log the following error is repeated a number of times. /etc/maas/rackd.conf and /etc/maas/regiond.conf are both owned by root:maas with their permission set to 640. Setting both to 660 fixed the problem for me.

Did packaging change the permission of these files? I used make package-dev to build the deb files.
If the permission is correct MAAS needs to be opening these files with read only permission. The error below happens when we try to touch it, we could touch it only if it doesn't exist.

PermissionError: [Errno 13] Permission denied: '/etc/maas/rackd.conf'
Traceback (most recent call last):
  File "/usr/bin/twistd3", line 18, in <module>
    run()
  File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 29, in run
    app.run(runApp, ServerOptions)
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 617, in run
    runApp(config)
  File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 25, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 348, in run
    self.application = self.createOrGetApplication()
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 408, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/usr/lib/python3/dist-packages/provisioningserver/plugin.py", line 200, in makeService
    with ClusterConfiguration.open() as config:
  File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/usr/lib/python3/dist-packages/provisioningserver/config.py", line 697, in open
    with cls.backend.open(filepath) as store:
  File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/usr/lib/python3/dist-packages/provisioningserver/config.py", line 549, in open
    touch(path)
  File "/usr/lib/python3/dist-packages/provisioningserver/config.py", line 345, in touch
    os.close(os.open(path, os.O_CREAT | os.O_APPEND, mode))