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

[dev.icinga.com #2923] icinga.spec: forced update on icinga.cfg change package locations #1054

Closed
icinga-migration opened this issue Jul 31, 2012 · 1 comment

Comments

@icinga-migration
Copy link

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

Created by mfriedrich on 2012-07-31 18:24:36 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2012-07-31 19:03:06 +00:00)
Target Version: 1.7.1
Last Update: 2012-07-31 19:03:06 +00:00 (in Redmine)


i forgot one thing when bumping the issue on repoforge for another icinga build - the icinga.cfg won't be overriden during an upgrade, so the overall procedure will continue, but icinga startup will fail heavily.

since it's mostly volatile data produced by the core, we can safely sed the original config entries to adapt to the new ones, as well as also update the historical ones where the data was already copied over.

# we must then check all changed config locations (and we enforce that change to icinga.cfg only once)
# cgi.cfg luckily knows where icinga.cfg is and does not need an update
# retention.dat, objects.cache, objects.precache, status.dat, cmdfile, pidfile, checkresults
%{__perl} -pi -e '
        s|/var/icinga/retention.dat|%{spooldir}/retention.dat|;
        s|/var/icinga/objects.precache|%{spooldir}/objects.precache|;
        s|/var/icinga/objects.cache|%{spooldir}/objects.cache|;
        s|/var/icinga/status.dat|%{spooldir}/status.dat|;
        s|/var/icinga/rw/icinga.cmd|%{spooldir}/cmd/icinga.cmd|;
        s|/var/icinga/icinga.pid|/var/run/icinga.pid|;
        s|/var/icinga/checkresults|%{spooldir}/checkresults|;
   ' /etc/icinga/icinga.cfg

this has been extensively tested on my test boxes, with pre-installed icinga 1.6.1 rpms, having old configs, upgrading this with a newly built 1.7.1-2 revision containing the fix.

it all works out, icinga is starting up fine.

Changesets

2012-07-31 18:30:04 +00:00 by mfriedrich 06d42a9

icinga.spec: forced update on icinga.cfg change package locations #2923

already upstream on repoforge in 1.7.1-2 revision

fixes #2923

2012-08-21 16:06:14 +00:00 by mfriedrich 4790f76

icinga.spec: forced update on icinga.cfg change package locations; update to 1.7.2

refs #2923

Conflicts:

	Changelog
	icinga.spec
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-07-31 19:03:06 +00:00

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

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