Bug 38438 - Fix dependency based boot - insserv / systemd
Fix dependency based boot - insserv / systemd
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: General
UCS 4.0
Other Linux
: P4 normal (vote)
: UCS 4.2
Assigned To: Philipp Hahn
Janek Walkenhorst
: interim-1, systemd
Depends on: 43217
Blocks: 41961 42380 43306 43313 43330 43760
  Show dependency treegraph
 
Reported: 2015-05-05 09:43 CEST by Philipp Hahn
Modified: 2017-09-26 10:47 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2015-05-05 09:43:35 CEST
Installing OpenStack braks, since nova is started before libvirtd:
> /etc/rc2.d/S20nova-compute
>  # Should-Start:      libvirtd postgresql mysql keystone rabbitmq-server ntp
> /etc/rc2.d/S28libvirtd

Bug #35688 disabled insserv.
Running it manually does not work because our init scripts are missing the LSB headers:
> insserv: warning: script 'univention-management-console-web-server' missing LSB tags and overrides
> insserv: warning: script 'klogd' missing LSB tags and overrides
> insserv: warning: script 'univention-directory-listener' missing LSB tags and overrides
> insserv: warning: script 'rdate' missing LSB tags and overrides
> insserv: warning: script 'univention-runit' missing LSB tags and overrides
> insserv: warning: script 'univention-directory-policy' missing LSB tags and overrides
> insserv: warning: script 'univention-management-console-server' missing LSB tags and overrides
> insserv: warning: script 'univention-network-common' missing LSB tags and overrides
> insserv: warning: script 'univention-system-setup-boot-prepare' missing LSB tags and overrides
> insserv: warning: script 'univention-system-setup-boot' missing LSB tags and overrides
> insserv: warning: script 'univention-firewall' missing LSB tags and overrides
> insserv: warning: script 'univention-maintenance' missing LSB tags and overrides

We should add LSB headers for insserv or switch to systemd longterm.
Comment 1 Christina Scheinig univentionstaff 2015-10-28 11:37:16 CET
In two customer-systems this issue occured, and scrambled the runlevel order.  We should add LSB headers for insserv or switch to systemd longterm
Comment 2 Philipp Hahn univentionstaff 2016-09-13 17:34:50 CEST
r72502 | Bug #38438 server: Make init-script LSB compliant
r72501 | Bug #38438 docker: Make init-script LSB compliant
r72500 | Bug #38438 cloud: Make init-script LSB compliant
r72499 | Bug #38438 log: Make init-script LSB compliant
r72498 | Bug #38438 welcome: Make init-script LSB compliant
r72497 | Bug #38438 uss: Make init-script LSB compliant
r72496 | Bug #38438 saml: Make init-script LSB compliant
r72495 | Bug #38438 up: Make init-script LSB compliant
r72494 | Bug #38438 policy: Make init-script LSB compliant
r72493 | Bug #38438 adc: Make init-script LSB compliant
r72492 | Bug #38438 s4c: Make init-script LSB compliant
r72491 | Bug #38438 smb: Make init-script LSB compliant
r72490 | Bug #38438 neti: Make init-script LSB compliant
r72489 | Bug #38438 demo: Make init-script LSB compliant
r72488 | Bug #38438 kvm: Make init-script LSB compliant
r72487 | Bug #38438 uvmm: Make init-script LSB compliant
r72486 | Bug #38438 dhcp: Make init-script LSB compliant
r72485 | Bug #38438 runit: Make init-script LSB compliant
r72484 | Bug #38438 fw,net: Make init-script LSB compliant
r72483 | Bug #38438,Bug #42339,Bug #42340 umc: Make init-script LSB compliant
r72482 | Bug #38438 net: Make init-script LSB compliant
r72481 | Bug #38438 bind: Make init-script LSB compliant
r72480 | Bug #38438 udn: Make init-script LSB compliant
r72479 | Bug #38438 udl: Make init-script LSB compliant
r72478 | Bug #38438 base: Make init-script rdate LSB compliant
r72477 | Bug #38438 base: Remove klogd for dependency based boot
 Add LSB headers <https://wiki.debian.org/LSBInitScripts>
 Use correct log functions <https://hutten.knut.univention.de/mediawiki/index.php/Philipp_memo/Bash#LSB-Init-Skript>
 Remove obsolete calls to "update-rc.d"
 Remove obsolete migration code related to init scripts
 Remove useless debian/*.dirs files

r72504 | Bug #38438 welcome: Make init-script LSB compliant
r72509 | Bug #38438 udn: Make init-script LSB compliant
r72527 | Bug #38438: Fix use of get_lsb_header_val


Package: univention-base-files
Version: 6.0.0-4A~4.2.0.201609121014
Branch: ucs_4.2-0

Package: univention-bootsplash
Version: 8.0.0-2A~4.2.0.201609121019
Version: 8.0.0-3A~4.2.0.201609131019
Branch: ucs_4.2-0

Package: univention-firewall
Version: 9.0.0-1A~4.2.0.201609121021
Version: 9.0.0-2A~4.2.0.201609131023
Branch: ucs_4.2-0

Package: univention-network-manager
Version: 9.0.0-1A~4.2.0.201609121023
Version: 9.0.0-2A~4.2.0.201609131025
Branch: ucs_4.2-0

Package: univention-runit
Version: 8.0.0-1A~4.2.0.201609121025
Version: 8.0.0-2A~4.2.0.201609131026
Branch: ucs_4.2-0

Package: univention-server
Version: 12.0.0-1A~4.2.0.201609121026
Branch: ucs_4.2-0

Package: univention-system-setup
Version: 10.0.0-8A~4.2.0.201609121028
Version: 10.0.0-9A~4.2.0.201609131049
Branch: ucs_4.2-0

Package: univention-updater
Version: 12.0.0-7A~4.2.0.201609121032
Branch: ucs_4.2-0

Package: univention-docker
Version: 2.0.0-1A~4.2.0.201609121034
Branch: ucs_4.2-0

Package: univention-docker-container-mode
Version: 2.0.0-1A~4.2.0.201609121035
Version: 2.0.0-2A~4.2.0.201609131035
Branch: ucs_4.2-0

Package: univention-directory-listener
Version: 11.0.0-1A~4.2.0.201609121037
Version: 11.0.0-1A~4.2.0.201609121259
Version: 11.0.0-2A~4.2.0.201609131037
Version: 11.0.0-3A~4.2.0.201609131100
Branch: ucs_4.2-0

Package: univention-directory-notifier
Version: 11.0.0-1A~4.2.0.201609121043
Version: 11.0.0-1A~4.2.0.201609121050
Version: 11.0.0-2A~4.2.0.201609131039
Branch: ucs_4.2-0

Package: univention-directory-policy
Version: 8.0.0-1A~4.2.0.201609121052
Version: 8.0.0-2A~4.2.0.201609131041
Branch: ucs_4.2-0

Package: univention-management-console
Version: 9.0.12-1A~4.2.0.201609121053
Version: 9.0.12-4A~4.2.0.201609131043
### BROKEN due Bug #42228
Branch: ucs_4.2-0

Package: univention-saml
Version: 4.0.0-4A~4.2.0.201609121057
Version: 4.0.0-5A~4.2.0.201609131045
Branch: ucs_4.2-0

Package: univention-ad-connector
Version: 11.0.2-1A~4.2.0.201609121059
Branch: ucs_4.2-0

Package: univention-bind
Version: 11.0.0-1A~4.2.0.201609121101
Version: 11.0.0-2A~4.2.0.201609131047
Branch: ucs_4.2-0

Package: univention-cloud-init
Version: 4.0.0-1A~4.2.0.201609121103
Version: 4.0.0-3A~4.2.0.201609131054
Branch: ucs_4.2-0

Package: univention-dhcp
Version: 11.0.0-1A~4.2.0.201609121104
Version: 11.0.0-2A~4.2.0.201609131050
Branch: ucs_4.2-0

Package: univention-log-collector
Version: 10.0.0-1A~4.2.0.201609121106
Version: 10.0.0-2A~4.2.0.201609131052
Branch: ucs_4.2-0

Package: univention-net-installer
Version: 10.0.0-1A~4.2.0.201609121107
Branch: ucs_4.2-0

Package: univention-s4-connector
Version: 11.0.0-3A~4.2.0.201609121109
Version: 11.0.0-4A~4.2.0.201609131053
Branch: ucs_4.2-0

Package: univention-samba
Version: 11.0.0-1A~4.2.0.201609121110
Branch: ucs_4.2-0

Package: univention-demo-configuration
Version: 5.0.0-3A~4.2.0.201609121112
Branch: ucs_4.2-0

Package: univention-virtual-machine-manager-daemon
Version: 6.0.0-3A~4.2.0.201609121113
Branch: ucs_4.2-0

Package: univention-virtual-machine-manager-node
Version: 5.0.0-1A~4.2.0.201609121115
Branch: ucs_4.2-0

TODO: Migration to systemd will be done in a 2nd step
Comment 3 Philipp Hahn univentionstaff 2016-09-15 10:34:09 CEST
(In reply to Philipp Hahn from comment #2)
> TODO: Migration to systemd will be done in a 2nd step

See Bug #42380

r72607 | Bug #38438,Bug #36571 base: Make init scripts executable

Package: univention-base-files
Version: 6.0.0-5A~4.2.0.201609150950
Branch: ucs_4.2-0
Comment 4 Philipp Hahn univentionstaff 2016-12-05 12:31:39 CET
r74964 | Bug #38438 adc: Make init-script LSB compliant
Comment 5 Philipp Hahn univentionstaff 2016-12-19 14:53:06 CET
r75380 | Bug #38438 dhcp: Fix init script

Package: univention-dhcp
Version: 11.0.0-3A~4.2.0.201612191126
Branch: ucs_4.2-0
Comment 6 Janek Walkenhorst univentionstaff 2017-02-02 18:00:20 CET
(In reply to Philipp Hahn from comment #2)
> r72502 | Bug #38438 server: Make init-script LSB compliant
> r72501 | Bug #38438 docker: Make init-script LSB compliant
> r72500 | Bug #38438 cloud: Make init-script LSB compliant
> r72499 | Bug #38438 log: Make init-script LSB compliant
> r72498 | Bug #38438 welcome: Make init-script LSB compliant
> r72497 | Bug #38438 uss: Make init-script LSB compliant
> r72496 | Bug #38438 saml: Make init-script LSB compliant
> r72495 | Bug #38438 up: Make init-script LSB compliant
> r72494 | Bug #38438 policy: Make init-script LSB compliant
Changes: OK

> r72493 | Bug #38438 adc: Make init-script LSB compliant
I think --oknodo should be added.

Also the following change breaks the check:
        crestart)
                ADCONNECTOR=`cat $ADCONNECTORPID 2>/dev/null`
                if [ -n "$ADCONNECTOR" ]; then
-                   ps xaw | grep connector | grep -q "$ADCONNECTOR" && $0 restart
+                   ps xaw | grep -q "$ADCONNECTOR" && "$0" restart
                fi
(Because grep finds itself)
Maybe use »kill -0 "$ADCONNECTOR"« instead?

> r72492 | Bug #38438 s4c: Make init-script LSB compliant
I think --oknodo should be added.
Also the following change breaks the check:
        crestart)
                S4CONNECTOR=`cat $S4CONNECTORPID 2>/dev/null`
                if [ -n "$S4CONNECTOR" ]; then
-                   ps xaw | grep connector | grep -q "$S4CONNECTOR" && $0 restart
+                   ps xaw | grep -q "$S4CONNECTOR" && "$0" restart
                fi
(Because grep finds itself)
Maybe use »kill -0 "$S4CONNECTOR"« instead?

> r72491 | Bug #38438 smb: Make init-script LSB compliant
> r72490 | Bug #38438 neti: Make init-script LSB compliant
> r72489 | Bug #38438 demo: Make init-script LSB compliant
> r72488 | Bug #38438 kvm: Make init-script LSB compliant
> r72487 | Bug #38438 uvmm: Make init-script LSB compliant
> r72486 | Bug #38438 dhcp: Make init-script LSB compliant
> r72485 | Bug #38438 runit: Make init-script LSB compliant
> r72484 | Bug #38438 fw,net: Make init-script LSB compliant
> r72483 | Bug #38438,Bug #42339,Bug #42340 umc: Make init-script LSB compliant
> r72482 | Bug #38438 net: Make init-script LSB compliant
> r72481 | Bug #38438 bind: Make init-script LSB compliant
> r72480 | Bug #38438 udn: Make init-script LSB compliant
> r72479 | Bug #38438 udl: Make init-script LSB compliant
> r72478 | Bug #38438 base: Make init-script rdate LSB compliant
> r72477 | Bug #38438 base: Remove klogd for dependency based boot
>  Add LSB headers <https://wiki.debian.org/LSBInitScripts>
>  Use correct log functions
> <https://hutten.knut.univention.de/mediawiki/index.php/Philipp_memo/Bash#LSB-
> Init-Skript>
>  Remove obsolete calls to "update-rc.d"
>  Remove obsolete migration code related to init scripts
>  Remove useless debian/*.dirs files
Changes: OK

> r72504 | Bug #38438 welcome: Make init-script LSB compliant
> r72509 | Bug #38438 udn: Make init-script LSB compliant
> r72527 | Bug #38438: Fix use of get_lsb_header_val
Changes: OK
Comment 7 Philipp Hahn univentionstaff 2017-02-03 09:37:47 CET
(In reply to Janek Walkenhorst from comment #6)
> (In reply to Philipp Hahn from comment #2)
> > r72493 | Bug #38438 adc: Make init-script LSB compliant
...
> > r72492 | Bug #38438 s4c: Make init-script LSB compliant
> I think --oknodo should be added.

r76367 | Bug #38438 adc/s4c: start-stop-daemon --oknodo
r76366 | Bug #38438 adc/s4c: start-stop-daemon --oknodo

Package: univention-ad-connector
Version: 11.0.6-2A~4.2.0.201702030931
Branch: ucs_4.2-0

Package: univention-s4-connector
Version: 11.0.6-3A~4.2.0.201702030932
Branch: ucs_4.2-0


> Also the following change breaks the check:
No:
> -                   ps xaw | grep connector | grep -q "$ADCONNECTOR" && $0
> restart
> +                   ps xaw | grep -q "$ADCONNECTOR" && "$0" restart
It was broken before!
ucs-4.2-0@74941 fixed it through Bug #40659
Comment 8 Janek Walkenhorst univentionstaff 2017-02-03 11:46:09 CET
(In reply to Philipp Hahn from comment #7)
> (In reply to Janek Walkenhorst from comment #6)
> > (In reply to Philipp Hahn from comment #2)
> > > r72493 | Bug #38438 adc: Make init-script LSB compliant
> ...
> > > r72492 | Bug #38438 s4c: Make init-script LSB compliant
> > I think --oknodo should be added.
> 
> r76367 | Bug #38438 adc/s4c: start-stop-daemon --oknodo
> r76366 | Bug #38438 adc/s4c: start-stop-daemon --oknodo
OK
> > Also the following change breaks the check:
> […]
> ucs-4.2-0@74941 fixed it through Bug #40659
r74941 looks good.
Comment 9 Stefan Gohmann univentionstaff 2017-04-04 18:30:03 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".