Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #1267] Ido2db init script throws an error if stopped while not running #566

Closed
icinga-migration opened this issue Mar 4, 2011 · 16 comments

Comments

@icinga-migration
Copy link

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

Created by theh on 2011-03-04 08:07:05 +00:00

Assignee: theh
Status: Closed (closed on 2012-04-20 12:57:49 +00:00)
Target Version: (none)
Last Update: 2014-12-08 14:35:45 +00:00 (in Redmine)

Icinga Version: 1.10.0
OS Version: any

Ido2db init script throws an error if stopped while not running. This is not what it is supposed to do and it results in a rpm script error during removal.

Attachments

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-03-14 21:40:53 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Priority changed from High to Normal
  • Target Version set to 1.4

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-03-16 17:13:11 +00:00

  • Status changed from Assigned to Feedback
  • Assigned to changed from mfriedrich to Meier
  • Target Version deleted 1.4

this is the exact same behavior is in daemon-init from icinga.

maybe there's an rhel specific init script required? @meier

@icinga-migration
Copy link
Author

Updated by Meier on 2011-04-19 19:03:51 +00:00

  • Assigned to changed from Meier to theh

What exactly is the problem?

[cmr@meierpad RPMS]$ sudo service ido2db stop
Stopping ido2db: ido2db not running. PID file /var/icinga/ido2db.lock not found
[cmr@meierpad RPMS]$ sudo rpm -e icinga-idoutils
[cmr@meierpad RPMS]$ 

@icinga-migration
Copy link
Author

Updated by theh on 2011-04-19 20:00:35 +00:00

The problem is that according to LSB a non running service should throw no error if stopped. Ido2db does this so if you remove ido2db while the service is not running the rpm scripts interrupts after unsuccessfully trying to stop the service.

To try it just stop the ido2db service and then stop it again. It throws an error instead of a success message. I have replaced the service file so I can't test it right now but if it works for you let me know.

@icinga-migration
Copy link
Author

Updated by theh on 2011-05-06 22:45:43 +00:00

Any news on this one? Did anyone try it?

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-05-09 07:57:35 +00:00

i've tried stopping it while checking on the return value.

# service ido2db stop
Stopping ido2db: done.
# service ido2db stop
Stopping ido2db: ido2db not running. PID file /var/icinga/ido2db.lock not found
# echo $?
1

though i can't see where the exit status sources from (icinga initscript will do the same?), the killproc_ido2db call to kill probably does that.

if you got a proper patch for it, feel free to submit.

@icinga-migration
Copy link
Author

Updated by Anonymous on 2011-05-09 08:25:25 +00:00

just to add in to this issue, on SLES 11 the init script is broken. its unable to stop the process when you issue the stop command, to fix you have to manually issue a kill on the procid.

Stopping ido2db: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
done.

There is currently a SuSE init script floating around, maybe include to source so it is given to people using SuSE rather than redhat?

@icinga-migration
Copy link
Author

Updated by theh on 2011-05-09 15:01:27 +00:00

  • File added icinga-1.3.1-ido2db-init.patch

So here is a patch against 1.3.1 but please don't just apply it because basically I used an init skeleton and edited some things to make it work.

It does work for me but it is likely that there are some other issues especially on non Suse systems.

Nevertheless it properly kills ido2db on my system.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-05-09 15:06:19 +00:00

hmmm but that diff is a full diff against the existing original. it does not really solve the origin case of exiting with the return value of 'kill', in that case the error.

@icinga-migration
Copy link
Author

Updated by theh on 2011-05-09 15:20:53 +00:00

It doesn't result in the exit code problem of the old script on my system (SLES 11 SP1) which means that stopping a stopped ido2db is successful with it.

And like I mentioned killing the process works here but I never really have checked it with the default init script.

@icinga-migration
Copy link
Author

Updated by theh on 2011-06-16 10:06:02 +00:00

The Icinga init script has the same problem as ido2db so it can't be uninstalled when it is not running.
We are replacing the Icinga init script during build that's why I haven't seen the problem.

How can I update the title of this bug report?

@icinga-migration
Copy link
Author

Updated by theh on 2011-08-28 06:26:37 +00:00

  • File added rcicinga

I am adding our current init scripts for Icinga and Ido2db.

@icinga-migration
Copy link
Author

Updated by theh on 2011-08-28 06:26:51 +00:00

  • File added rcido2db

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-20 12:43:22 +00:00

what's the status of this?

@icinga-migration
Copy link
Author

Updated by theh on 2012-04-20 12:57:49 +00:00

  • Status changed from Feedback to Closed

Since we use our own init scripts it does work here and it looks like it wasn't a problem for other distros otherwise there would have been other complaints I suppose.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 14:35:45 +00:00

  • Project changed from 18 to Core, Classic UI, IDOUtils
  • Category set to IDOUtils
  • Icinga Version set to 1
  • OS Version set to any

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant