[2.4, devel] ] Unable to write to plugin cache /usr/lib/python3/dist-packages/twisted/plugins/dropin.cache: error number 13

Bug #1748052 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Unassigned

Bug Description

After an upgrade from xenial -> bionic, and then upgrade to 2.4, I saw this issue:

    socks A SOCKSv4 proxy service.
    tftp A TFTP Server
    web A general-purpose web server which can serve from a
                     filesystem or application resource.
    words A modern words server
    xmpp-router An XMPP Router server

/usr/sbin/regiond: Unknown command: maas-regiond-master
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/maasserver/server.py", line 19, in runMasterServices
    runService("maas-regiond-master")
  File "/usr/lib/python3/dist-packages/provisioningserver/server.py", line 36, in runService
    usage.Options.parseOptions(config, args)
  File "/usr/lib/python3/dist-packages/twisted/python/usage.py", line 262, in parseOptions
    for (cmd, short, parser, doc) in self.subCommands:
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 641, in subCommands
    for plug in sorted(plugins, key=attrgetter('tapname')):
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/plugin.py", line 217, in getPlugins
    adapted = interface(plugin, None)
  File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 131, in __call__
    adapter = self._call_conform(conform)
  File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 467, in _call_conform
    return conform(self)
  File "/usr/lib/python3/dist-packages/twisted/plugin.py", line 71, in __conform__
    return self.load()
  File "/usr/lib/python3/dist-packages/twisted/plugin.py", line 66, in load
    return namedAny(self.dropin.moduleName + '.' + self.name)
  File "/usr/lib/python3/dist-packages/twisted/python/reflect.py", line 319, in namedAny
    obj = getattr(obj, n)
builtins.AttributeError: module 'twisted.plugins.maasregiond' has no attribute 'service'

Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/provisioningserver/server.py", line 38, in runService
    print(config)
  File "/usr/lib/python3/dist-packages/twisted/python/usage.py", line 447, in __str__
    return self.getSynopsis() + '\n' + self.getUsage(width=None)
  File "/usr/lib/python3/dist-packages/twisted/python/usage.py", line 484, in getUsage
    for (cmd, short, parser, desc) in self.subCommands:
  File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 641, in subCommands
    for plug in sorted(plugins, key=attrgetter('tapname')):
--- <exception caught here> ---
  File "/usr/lib/python3/dist-packages/twisted/plugin.py", line 217, in getPlugins
    adapted = interface(plugin, None)
  File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 131, in __call__
    adapter = self._call_conform(conform)
  File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 467, in _call_conform
    return conform(self)
  File "/usr/lib/python3/dist-packages/twisted/plugin.py", line 71, in __conform__
    return self.load()
  File "/usr/lib/python3/dist-packages/twisted/plugin.py", line 66, in load
    return namedAny(self.dropin.moduleName + '.' + self.name)
  File "/usr/lib/python3/dist-packages/twisted/python/reflect.py", line 319, in namedAny
    obj = getattr(obj, n)
builtins.AttributeError: module 'twisted.plugins.maasregiond' has no attribute 'service'

Usage: twistd [options]
Options:
  -b, --debug Run the application in the Python Debugger (implies
                       nodaemon), sending SIGUSR2 will drop into
                       debugger
      --chroot= Chroot to a supplied directory before running
  -d, --rundir= Change to a supplied directory before running [default:
                       .]
  -e, --encrypted The specified tap/aos file is encrypted.
      --euid Set only effective user-id rather than real user-id.
                       (This option has no effect unless the server is running
                       as root, in which case it means not to shed all
                       privileges after binding ports, retaining the option to
                       regain privileges in cases such as spawning processes.
                       Use with caution.)
  -f, --file= read the given .tap file [default: twistd.tap]
  -g, --gid= The gid to run as.
      --help Display this help and exit.
      --help-reactors Display a list of possibly available reactor names.
  -l, --logfile= log to a specified file, - for stdout
      --logger= A fully-qualified name to a log observer factory to use
                       for the initial log observer. Takes precedence over
                       --logfile and --syslog (when available).
  -n, --nodaemon don't daemonize, don't use default umask of 0077
  -o, --no_save do not save state on shutdown
      --originalname Don't try to change the process name
  -p, --profile= Run in profile mode, dumping results to specified file.
      --pidfile= Name of the pidfile [default: twistd.pid]
      --prefix= use the given prefix when syslogging [default: twisted]
      --profiler= Name of the profiler to use (profile, cprofile).
                       [default: cprofile]
  -r, --reactor= Which reactor to use (see --help-reactors for a list of
                       possibilities)
  -s, --source= Read an application from a .tas file (AOT format).
      --savestats save the Stats object rather than the text output of the
                       profiler.
      --spew Print an insanely verbose log of everything that happens.
                       Useful when debugging freezes or locks in complex code.
      --syslog Log to syslog, not to file
  -u, --uid= The uid to run as.
      --umask= The (octal) file creation mask to apply.
      --version Print version information and exit.
  -y, --python= read an application from within a Python file (implies
                       -o)

twistd reads a twisted.application.service.Application out of a file and runs
it.
Commands:
    conch A Conch SSH service.
    dns A domain name server.
    ftp An FTP server.
    inetd An inetd(8) replacement.
    maas-rackd The MAAS Rack Controller daemon.
    manhole An interactive remote debugger service accessible via
                     telnet and ssh and providing syntax coloring and basic line
                     editing functionality.
    portforward A simple port-forwarder.
    procmon A process watchdog / supervisor
    socks A SOCKSv4 proxy service.
    tftp A TFTP Server
    web A general-purpose web server which can serve from a
                     filesystem or application resource.
    words A modern words server
    xmpp-router An XMPP Router server

/usr/sbin/regiond: Unknown command: maas-regiond-master

I looked into /usr/lib/python3/dist-packages/twisted/plugins/ and saw droping.cache. I manually removed such file and MAAS started, but with:

2018-02-08 00:12:11 -: [info] Unable to write to plugin cache /usr/lib/python3/dist-packages/twisted/plugins/dropin.cache: error number 13
2018-02-08 00:12:11 twisted.scripts: [info] twistd 17.9.0 (/usr/bin/python3 3.6.4) starting up.
2018-02-08 00:12:11 twisted.scripts: [info] reactor class: twisted.internet.asyncioreactor.AsyncioSelectorReactor.
2018-02-08 00:12:12 maasserver.regiondservices.active_discovery: [info] Active network discovery: Discovery interval set to 10800 seconds.
2018-02-08 00:12:12 maasserver.listener: [info] Listening for database notifications.

Changed in maas:
importance: Undecided → Critical
status: New → Triaged
milestone: none → 2.4.0alpha1
Revision history for this message
Blake Rouse (blake-rouse) wrote :

That dropin.cache has always been that way, even in Xenial. Twisted just ignores it and continues.

I believe there is another underlying issue here. What it is? Idk.

Changed in maas:
milestone: 2.4.0alpha1 → 2.4.0alpha2
Changed in maas:
milestone: 2.4.0alpha2 → 2.4.0beta1
Changed in maas:
status: Triaged → Fix Released
milestone: 2.4.0beta1 → 2.4.0alpha2
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.