knockd do not start at boot after enabling it with systemctl

Bug #1799697 reported by Zeta
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
knockd (Debian)
Fix Released
Unknown
knockd (Ubuntu)
Fix Released
Medium
Dan Streetman
Trusty
Invalid
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
Bionic
Fix Released
Medium
Dan Streetman
Cosmic
Fix Released
Medium
Dan Streetman
Disco
Fix Released
Medium
Dan Streetman

Bug Description

[impact]

on systems controlled by systemd, the knockd service will never start because it is not possible to enable it.

[test case]

install a system that uses systemd, and install knockd package. try to enable the service:

$ sudo systemctl enable knockd
Synchronizing state of knockd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable knockd
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.

after fixing the knockd.service file, the service can be enabled:

$ sudo systemctl enable knockd.service
Synchronizing state of knockd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable knockd

[regression potential]

very low, as knockd is useless currently since it can never be started from systemd. any regressions would be in the area of starting knockd.

[other info]

the systemd service for knockd also needs the fix from bug 1819345

this applies only to b/c/d since t/x use upstart to manage services, and this problem is only in the knockd systemd service file.

original description:

---

About my Ubuntu:

Description: Ubuntu 18.04
Release: 18.04

About Knockd:

knockd:
  Installed: 0.7-1ubuntu1
  Candidate: 0.7-1ubuntu1
  Version table:
 *** 0.7-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

>>>>>>>>>>

When enabling knockd with systemctl y get the following error:
###
$ sudo systemctl enable knockd
Synchronizing state of knockd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable knockd
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.
###

It doesnt start at boot also.
If I add the following to the end of /lib/systemd/system/knockd.service then I can enable it successfully and starts at boot:

###
[Install]
WantedBy=multi-user.target
Alias=knockd.service
###

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: knockd 0.7-1ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-38.41-generic 4.15.18
Uname: Linux 4.15.0-38-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
CurrentDesktop: KDE
Date: Wed Oct 24 14:42:40 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-06-28 (483 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
SourcePackage: knockd
UpgradeStatus: Upgraded to bionic on 2018-08-10 (74 days ago)

Revision history for this message
Zeta (z3t4m4n) wrote :
Revision history for this message
Zeta (z3t4m4n) wrote :
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in knockd (Ubuntu):
status: New → Confirmed
Dan Streetman (ddstreet)
Changed in knockd (Ubuntu Disco):
status: Confirmed → In Progress
Changed in knockd (Ubuntu Cosmic):
status: New → In Progress
Changed in knockd (Ubuntu Bionic):
status: New → In Progress
Changed in knockd (Ubuntu Xenial):
status: New → In Progress
Changed in knockd (Ubuntu Trusty):
status: New → In Progress
Changed in knockd (Ubuntu Disco):
assignee: nobody → Dan Streetman (ddstreet)
Changed in knockd (Ubuntu Cosmic):
assignee: nobody → Dan Streetman (ddstreet)
Changed in knockd (Ubuntu Bionic):
assignee: nobody → Dan Streetman (ddstreet)
Changed in knockd (Ubuntu Xenial):
assignee: nobody → Dan Streetman (ddstreet)
Changed in knockd (Ubuntu Trusty):
assignee: nobody → Dan Streetman (ddstreet)
Changed in knockd (Ubuntu Disco):
importance: Undecided → Medium
Changed in knockd (Ubuntu Cosmic):
importance: Undecided → Medium
Changed in knockd (Ubuntu Bionic):
importance: Undecided → Medium
Changed in knockd (Ubuntu Xenial):
importance: Undecided → Medium
Changed in knockd (Ubuntu Trusty):
importance: Undecided → Medium
Revision history for this message
Dan Streetman (ddstreet) wrote :

marked invalid for t/x since upstart is used in those releases, not systemd, and this affects only systemd-controlled knockd.

Changed in knockd (Ubuntu Trusty):
status: In Progress → Invalid
Changed in knockd (Ubuntu Xenial):
status: In Progress → Invalid
Changed in knockd (Ubuntu Trusty):
assignee: Dan Streetman (ddstreet) → nobody
Changed in knockd (Ubuntu Xenial):
assignee: Dan Streetman (ddstreet) → nobody
description: updated
Dan Streetman (ddstreet)
description: updated
Changed in knockd (Ubuntu Trusty):
importance: Medium → Undecided
Changed in knockd (Ubuntu Xenial):
importance: Medium → Undecided
Revision history for this message
Dan Streetman (ddstreet) wrote :
tags: added: patch
Revision history for this message
Dan Streetman (ddstreet) wrote :
Changed in knockd (Debian):
status: Unknown → New
Revision history for this message
Eric Desrochers (slashd) wrote :

Sponsored in development release (disco).

- Eric

Changed in knockd (Ubuntu Disco):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package knockd - 0.7-1ubuntu2

---------------
knockd (0.7-1ubuntu2) disco; urgency=medium

  * Fix systemd knockd.service file:
    - use After=network-online.target (LP: #1819345)
    - add [Install] so knockd service can be enabled (LP: #1799697)

 -- Dan Streetman <email address hidden> Sun, 10 Mar 2019 11:13:50 -0400

Changed in knockd (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Zeta (z3t4m4n) wrote :

Many thanks!!!!!
Kind regards.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Zeta, or anyone else affected,

Accepted knockd into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/knockd/0.7-1ubuntu1.18.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in knockd (Ubuntu Cosmic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Changed in knockd (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Zeta, or anyone else affected,

Accepted knockd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/knockd/0.7-1ubuntu1.18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Zeta (z3t4m4n) wrote :

Build armhf (knockd_0.7-1ubuntu1.18.04.1_armhf.deb) works without issue, thanks

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Dan Streetman (ddstreet) wrote :

ubuntu@lp1799697-c:~$ dpkg -l | grep knockd
ii knockd 0.7-1ubuntu1 amd64 small port-knock daemon
ubuntu@lp1799697-c:~$ sudo systemctl enable knockd
Synchronizing state of knockd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable knockd
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.

ubuntu@lp1799697-c:~$ dpkg -l | grep knockd
ii knockd 0.7-1ubuntu1.18.10.1 amd64 small port-knock daemon
ubuntu@lp1799697-c:~$ sudo systemctl enable knockd
Synchronizing state of knockd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable knockd
ubuntu@lp1799697-c:~$

tags: added: verification-done verification-done-cosmic
removed: verification-needed verification-needed-cosmic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package knockd - 0.7-1ubuntu1.18.10.1

---------------
knockd (0.7-1ubuntu1.18.10.1) cosmic; urgency=medium

  * Fix systemd knockd.service file:
    - use After=network-online.target (LP: #1819345)
    - add [Install] so knockd service can be enabled (LP: #1799697)

 -- Dan Streetman <email address hidden> Sun, 10 Mar 2019 11:13:50 -0400

Changed in knockd (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for knockd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package knockd - 0.7-1ubuntu1.18.04.1

---------------
knockd (0.7-1ubuntu1.18.04.1) bionic; urgency=medium

  * Fix systemd knockd.service file:
    - use After=network-online.target (LP: #1819345)
    - add [Install] so knockd service can be enabled (LP: #1799697)

 -- Dan Streetman <email address hidden> Sun, 10 Mar 2019 11:13:50 -0400

Changed in knockd (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in knockd (Debian):
status: New → Fix Released
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.