[SRU] overrides in /etc

Bug #1797884 reported by Julian Andres Klode
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networkd-dispatcher (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
networkd-dispatcher in bionic does not support overriding scripts or placing custom scripts in /etc, making it not configurable for a system administrator.

We patched it in bionic from /etc to /usr in a quick hack sort of way to enable us to provide packaged scripts that are not conffiles. This now restores the ability to have /etc scripts, while still keeping the /usr thing in tact.

[Test case]
1. Check that /etc/networkd-dispatcher/$event/$foo overrides /usr/lib/networkd-dispatcher/$event/$foo for some event directory $event, and some script $foo
2. Check that a script in /etc is executed correctly without a script in /usr
3. Check that a script in /usr is executed correctly without a script in /etc

Can just run networkd-dispatcher -T to retrigger the current state as user to verify

[Regression potential]
If something went wrong with the implementations, scripts would not execute or in the wrong order, or the wrong script might execute (/usr where overriden in /etc).

Changed in networkd-dispatcher (Ubuntu):
status: New → Fix Released
Changed in networkd-dispatcher (Ubuntu Bionic):
status: New → In Progress
tags: added: id-5b8c3425c6aa9c1a04a34ce0
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Julian, or anyone else affected,

Accepted networkd-dispatcher into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/networkd-dispatcher/1.7-0ubuntu3.3 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.

Changed in networkd-dispatcher (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
summary: - {SRU] overrides in /etc
+ [SRU] overrides in /etc
Revision history for this message
Julian Andres Klode (juliank) wrote :

I created three scripts:

(1) override in both /usr and /etc
(2) usr-only in /usr
(3) etc-only in /etc

doing "echo $0 >&2"

and then ran networkd-dispatcher with -T (triggering scripts for current state) to run them:

# networkd-dispatcher -v -TTTT
No valid path found for iwconfig
No valid path found for iw
INFO:Triggering scripts for last-known state for allinterfaces
INFO:Invoking '/etc/networkd-dispatcher/routable.d/etc-only' for interface eth0
/etc/networkd-dispatcher/routable.d/etc-only
INFO:Invoking '/etc/networkd-dispatcher/routable.d/override' for interface eth0
/etc/networkd-dispatcher/routable.d/override
INFO:Invoking '/usr/lib/networkd-dispatcher/routable.d/usr-only' for interface eth0
/usr/lib/networkd-dispatcher/routable.d/usr-only
INFO:Startup complete

As we can see, this passes our test cases:

1. /etc overrides /usr
2. etc-only is executed
3. usr-only is executed

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for networkd-dispatcher 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 networkd-dispatcher - 1.7-0ubuntu3.3

---------------
networkd-dispatcher (1.7-0ubuntu3.3) bionic; urgency=medium

  * Allow overriding /usr/lib scripts in /etc/networkd-dispatcher.
    Replaces our patch to use /usr/lib/networkd-dispatcher with the
    solution contributed upstream that has a search path with both
    /usr/lib/ and /etc locations.
    (LP: #1797884)
  * Create directories for scripts in /etc

 -- Julian Andres Klode <email address hidden> Mon, 15 Oct 2018 14:12:24 +0200

Changed in networkd-dispatcher (Ubuntu Bionic):
status: Fix Committed → 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.