minihtcondor DEB package fails to install in debian or ubuntu containers

Description

The minicondor (minihtcondor) DEB package attempts to launch the htcondor service via systemctl commands at the end of the install. This always fails on stock Debian and Ubuntu containers because these containers do not have systemd, and thus do not even have systemctl commands installed.

This commit will change the minihtcondor postinstall on Debian and Ubuntu to not attempt to start htcondor via systemd if a) the systemctl commands are not present, or b) env var RUNLEVEL is equal to 1 (single user mode). The setting of env RUNLEVEL may be used by get_htcondor.

Activity

Show:
Todd Tannenbaum
7 days ago

In response to your code review question: Setting RUNLEVEL env variable to 1 is a way for get_htcondor to tell the DEB package to not start the htcondor service after installing. We are not (yet) taking advantage of this, but we likely will down the road. Re runlevel not being installed - it is not a program, it is an environment variable. By convention, RUNLEVEL == 1 means the system is in single-user mode and many packages are setup to honor this to mean do not start any services.

Mark Coatsworth
April 5, 2021, 9:17 PM

Code review: Tested with Ubuntu container and the systemctl check works as expected. However I'm a bit confused about the $RUNLEVEL check; this variable isn’t set on any systems I tried, and the Ubuntu container doesn’t even have runlevel installed? I’m not sure why exactly you’re checking this, but it seems like $RUNLEVEL will never equal “1” and the check will always pass.

Time remaining

0m

Assignee

Todd Tannenbaum