This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/212/

src/rolekit/server/rolebase.py (Diff revision 4)
1079
    def cleanup_targets(self):
1080
        # remove extension units
1081
        files = self._settings.get('extension_units', ())
1082
1083
        for f in files:
1084
            try:
1085
                os.unlink(f)
1086
            except Exception as e:
1087
                log.warning(
1088
                    "Couldn't remove extension unit '{}': {!s}\n".format(
1089
                        f, e))
1090
            else:
1091
                log.debug9("Removed extension unit '{}'\n".format(f))

You need to make sure to call

with SystemdJobHandler() as job_handler:
    job_handler.manager.Reload()

after removing the unit files or else systemd misbehaves.


- Stephen Gallagher


On September 15th, 2015, 3:51 p.m. UTC, Nils Philippsen wrote:

Review request for RoleKit Mailing List, Miloslav Trmac, Nils Philippsen, Stephen Gallagher, and Thomas Woerner.
By Nils Philippsen.

Updated Sept. 15, 2015, 3:51 p.m.

Repository: rolekit

Description

https://github.com/libre-server/rolekit/issues/16

Testing

Deployed databaseserver, checked that extension unit file paths are stored in role JSON file, decommissioned it again and checked that the files are installed, and removed again.

NB: This is only about extension units, the patch for the others is reviewed in #216.

Diffs

  • src/rolekit/server/rolebase.py (d7063c0069ae03d86c75286290780d3d1cda772a)
  • src/rolekit/server/io/systemd.py (317c589109a382d180b1a457fa1c0ed633ec73bc)

View Diff