Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch updater to systemd system service #72

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

pluehne
Copy link
Contributor

@pluehne pluehne commented Jan 3, 2018

This makes the systemd system service a user service. There are two reasons that motivated this change.

  1. User services require an active session of the specified user. This has the drawback that the updater would not be triggered after reboots if no SSH connection to the GitHub Enterprise appliance was made (see also Updater service not triggered without user session #71, which should be fixed by this pull request).
  2. User services cannot depend on system services. Because of that, the updater service could not reliably wait for the rest of GitHub Enterprise to start.

Copy link
Collaborator

@larsxschneider larsxschneider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 👍

@@ -72,7 +72,7 @@ The updater may be run in two modes:

The updater’s log is accessible as follows:
```sh
journalctl -f --user-unit hubble-enterprise.service
journalctl -fu hubble-enterprise.service
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is unrelated, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it isn’t. -u stands for --unit and refers to system units, while --user-unit is the equivalent for user units and doesn’t have a corresponding shorthand option.

@@ -2,7 +2,7 @@ all: # nothing to build

PKGNAME = hubble-enterprise
INSTALLDIR = $(DESTDIR)/opt/autodesk/$(PKGNAME)
SYSTEMDDIR = $(DESTDIR)/home/admin/.local/share/systemd/user
SYSTEMDDIR = $(DESTDIR)/usr/lib/systemd/system
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you see a way to move our stuff into a subdirectory here? Would that make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that systemd doesn’t look for unit files in a subdirectory.

This makes the systemd system service a user service. There are two
reasons that motivated this change. First, user services require an
active session of the specified user. This has the drawback that the
updater would not be triggered after reboots if no SSH connection to the
GitHub Enterprise appliance was made. Second, user services cannot
depend on system services. Because of that, the updater service could
not reliably wait for the rest of GitHub Enterprise to start.
@larsxschneider larsxschneider merged commit 6c6339f into master Jan 3, 2018
@larsxschneider larsxschneider deleted the patrick/system-service branch January 3, 2018 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants