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

[dev.icinga.com #11650] RPM update starts disabled icinga2 service #4148

Closed
icinga-migration opened this issue Apr 21, 2016 · 8 comments
Closed
Labels
area/setup Installation, systemd, sample files bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11650

Created by bcogel on 2016-04-21 13:39:46 +00:00

Assignee: bcogel
Status: Resolved (closed on 2016-08-08 16:00:05 +00:00)
Target Version: 2.5.0
Last Update: 2016-08-22 11:49:21 +00:00 (in Redmine)

Icinga Version: icinga2-2.4.7-1.el6.x86_64
Backport?: Not yet backported
Include in Changelog: 1

System: Rhel6 x86_64

During system update icinga2 is started although it is chkconfig off.

[root@hydra~]$ service icinga2 status
Icinga 2 status: Not running
[root@hydra~]$ chkconfig icinga2 --list
icinga2 0:Aus 1:Aus 2:Aus 3:Aus 4:Aus 5:Aus 6:Aus

[root@hydra~]$ yum update
Geladene Plugins: rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
Einrichten des Aktualisierungsprozess
epel | 4.3 kB 00:00
icinga-stable-release | 951 B 00:00
icinga-stable-release/primary | 32 kB 00:00
icinga-stable-release 179/179

....

Löse Abhängigkeiten auf
--> Führe Transaktionsprüfung aus
---> Package icinga2.x86_64 0:2.4.4-1.el6 will be aktualisiert
---> Package icinga2.x86_64 0:2.4.7-1.el6 will be an update
---> Package icinga2-bin.x86_64 0:2.4.4-1.el6 will be aktualisiert
---> Package icinga2-bin.x86_64 0:2.4.7-1.el6 will be an update
---> Package icinga2-common.x86_64 0:2.4.4-1.el6 will be aktualisiert
---> Package icinga2-common.x86_64 0:2.4.7-1.el6 will be an update

....

--> Abhängigkeitsauflösung beendet

Abhängigkeiten aufgelöst

Paket Arch Version Repository Grösse
Aktualisieren:
icinga2 x86_64 2.4.7-1.el6 icinga-stable-release 9.0 k
icinga2-bin x86_64 2.4.7-1.el6 icinga-stable-release 2.7 M
icinga2-common x86_64 2.4.7-1.el6 icinga-stable-release 90 k

.....

Vorgangsübersicht
Upgrade 12 Package(s)

Gesamte Downloadgrösse: 32 M
Ist dies in Ordnung? [j/N] :j
Lade Pakete herunter:
(1/12): icinga2-2.4.7-1.el6.x86_64.rpm | 9.0 kB 00:00
(2/12): icinga2-bin-2.4.7-1.el6.x86_64.rpm | 2.7 MB 00:00
(3/12): icinga2-common-2.4.7-1.el6.x86_64.rpm | 90 kB 00:00

....


Gesamt 15 MB/s | 32 MB 00:02
Führe rpm_check_debug durch
Führe Verarbeitungstest durch
Verarbeitungstest erfolgreich
Führe Verarbeitung durch

....

Aktualisieren: icinga2-common-2.4.7-1.el6.x86_64 7/24
Aktualisieren: icinga2-bin-2.4.7-1.el6.x86_64 8/24

....

Aktualisieren: icinga2-2.4.7-1.el6.x86_64 11/24

....

Aktualisiert:
icinga2.x86_64 0:2.4.7-1.el6
icinga2-bin.x86_64 0:2.4.7-1.el6
icinga2-common.x86_64 0:2.4.7-1.el6

....

Komplett!

[root@hydra~]$ service icinga2 status
Icinga 2 status: Running
[root@hydra~]$ service icinga2 stop
Stopping Icinga 2: .Done
[root@hydra~]$ chkconfig icinga2 --list
icinga2 0:Aus 1:Aus 2:Aus 3:Aus 4:Aus 5:Aus 6:Aus

Attachments

Changesets

2016-08-08 15:55:11 +00:00 by bcogel 47726d7

Init script: condrestart should only restart a running service

fixes #11650

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>

2016-08-08 15:56:35 +00:00 by mfriedrich 60dcf23

Update AUTHORS

refs #11359
refs #11650
@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-05-11 16:16:41 +00:00

  • Status changed from New to Feedback
  • Assigned to set to bcogel

Apparently the init script (etc/initsystem/icinga2.init.d.cmake) doesn't properly implement condrestart, i.e. it just delegates that functionality to the 'restart' handler - which doesn't check whether the service is already running.

Can you provide a patch for this?

@icinga-migration
Copy link
Author

Updated by bcogel on 2016-05-12 14:17:13 +00:00

Try this one.... I hope this patch for the initscript does the job. I didn't have the time for package building and extensive testing.

***** icinga2.org 2016-05-12 15:48:27.165054196 +0200
--- icinga2 2016-05-12 16:13:29.027920583 +0200

*****

* 165,175
status)
status
;;
! restart|condrestart)
checkconfig restart fail
stop nofail
start
;;
reload)
reload
;;
--- 165,181 ----
status)
status
;;
! restart)
checkconfig restart fail
stop nofail
start
;;

  • condrestart)
  • status > /dev/null 2>&1 || exit 0
  • checkconfig restart fail
  • stop nofail
  • start
  • ;;
    reload)
    reload
    ;;

@icinga-migration
Copy link
Author

Updated by bcogel on 2016-05-12 14:21:12 +00:00

  • File added icinga2.initscript.patch

Opps.... HTML garbage..... Now the patch as file attached...

Sorry!

@icinga-migration
Copy link
Author

Updated by bcogel on 2016-07-29 14:57:30 +00:00

  • File added 0001-Fix-for-initscript-bug-11650-in-etc-init.d-icinga2.patch

Sorry.... took me some time to get it done the git way....

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-08-08 15:56:56 +00:00

  • Status changed from Feedback to Assigned
  • Target Version set to 2.5.0

@icinga-migration
Copy link
Author

Updated by bcogel on 2016-08-08 16:00:05 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 47726d7.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-08-22 11:49:15 +00:00

  • Subject changed from _RPM update starts disabled icinga2 _ to RPM update starts disabled icinga2 service

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-08-22 11:49:21 +00:00

  • Subject changed from RPM update starts disabled icinga2 service to RPM update starts disabled icinga2 service

@icinga-migration icinga-migration added bug Something isn't working area/setup Installation, systemd, sample files labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.5.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/setup Installation, systemd, sample files bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant