twistd3 crashed with PermissionError in touch(): [Errno 13] Permission denied: '/etc/maas/rackd.conf'

Bug #1565467 reported by Rod Smith
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned
twisted (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Automatic bug reporting error dialog appeared when installing MAAS.

ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: python3-twisted 16.0.0-1
ProcVersionSignature: Ubuntu 4.4.0-16.32-generic 4.4.6
Uname: Linux 4.4.0-16-generic x86_64
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
CrashCounter: 1
Date: Sun Apr 3 09:01:04 2016
ExecutablePath: /usr/bin/twistd3
InstallationDate: Installed on 2016-01-17 (76 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160117)
InterpreterPath: /usr/bin/python3.5
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/twistd3 --nodaemon --pidfile= maas-rackd
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/false
 LD_PRELOAD=<set>
PythonArgs: ['/usr/bin/twistd3', '--nodaemon', '--pidfile=', 'maas-rackd']
SourcePackage: twisted
Title: twistd3 crashed with PermissionError in touch(): [Errno 13] Permission denied: '/etc/maas/rackd.conf'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Rod Smith (rodsmith) wrote :
tags: removed: need-duplicate-check
Changed in twisted (Ubuntu):
importance: Undecided → Medium
information type: Private → Public
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Create a xenial image and install maas. This appears to affect both with the PPA and without.

Create a quick xenial image:
uvt-simplestreams-libvirt sync release=xenial arch=amd64
uvt-kvm create maas release=xenial
uvt-kvm wait maas
uvt-kvm ssh maas --insecure

Then in VM:
    1 sudo apt update
    2 sudo apt upgrade
    3 sudo add-apt-repository ppa:maas/next
    4 sudo apt update
    5 sudo apt-get install maas

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

It seems that just running:
sudo apt upgrade again made it work

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

For me, this was caused by the VM not having enough memory during apt operations. I bumped memory to 4GB and now it appears to work fine.

@rodsmith. Could that have been the issue for you as well?

Changed in twisted (Ubuntu):
status: New → Incomplete
Changed in maas:
status: New → Incomplete
Revision history for this message
Rod Smith (rodsmith) wrote :

I'm not sure, Brian. I've done installs both on real hardware with 4GiB of RAM and under VirtualBox with less than that, and I don't recall which installation triggered this bug report.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for twisted (Ubuntu) because there has been no activity for 60 days.]

Changed in twisted (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
Christian Reis (kiko)
Changed in maas:
status: Expired → Confirmed
Revision history for this message
Christian Reis (kiko) wrote :

We've just encountered a user on IRC that is being affected by this very same issue.

Revision history for this message
Christian Reis (kiko) wrote :

Here's his rackd log: http://pastebin.com/WEJs6iDN

He's noting that his rack is failing to register with his region at first; it seems to later succeed.

Here are the permissions:

  -rw-r----- 1 root maas 87 Sep 12 13:05 /etc/maas/rackd.conf

This is a fresh install of MAAS 2.0.

Revision history for this message
Christian Reis (kiko) wrote :

And here's his maas.log from that node: http://pastebin.com/u67Yentn

Note that this is a standalone rack controller connecting to a remote region.

Revision history for this message
Sean Goller (smgoller) wrote :

I'm the user in question. Note that there is no rack controller installed alongside the region controller.

Steps to reproduce:

Install region controller software on one machine.
Create user, log in to ensure everything is running.

Install rack controller software on separate machine.
Note permissions on /etc/maas/rackd.conf are 640, as mentioned above.

When registering the rack controller with the region controller, it takes a very long time, but eventually completes. (The error above shows up in the logs)

When attempting to provision DHCP on a subnet controlled by the rack controller, no rack controller is present in the list of rack controllers.

Revision history for this message
Richard (rmustakos) wrote :
Download full text (78.1 KiB)

Also received this problem, ubuntu 1.6, maas 2.2, installing on a 2 GB RAM VM.
Appears (from log) to be transient during install, from log, gives traceback and Errno 13 twice, then bunch of 'connection was refused', then what appears to be a successful connection and startup:
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))
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...

Revision history for this message
Andres Rodriguez (andreserl) wrote :

while there's a traceback, the reality of it is that MAAS itself recovers, so it is not immediately a blocking issue.

Changed in maas:
milestone: none → 2.3.x
importance: Undecided → Medium
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi!

**This is an automated message**

We believe this is may no longer be an issue in the latest MAAS release. Due to the original date of the bug report, we are currently marking it as Invalid. If you believe this bug report still valid against the latest release of MAAS, or if you are still interested in this, please re-open this bug report.

Thanks

Changed in maas:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.