[dev.icinga.com #2585] icinga.spec: copy old retention.dat and objects.pre.cache to new location, if found #963

Closed
icinga-migration opened this Issue May 7, 2012 · 3 comments

Projects

None yet

1 participant

@icinga-migration
Member

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

Created by mfriedrich on 2012-05-07 07:23:18 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2012-05-07 14:45:59 +00:00)
Target Version: 1.7
Last Update: 2012-05-07 14:45:59 +00:00 (in Redmine)


as there's the move away from /var/icinga to /var/spool/icinga we need to make sure that the old retained data is being copied on upgrade. logs did not change, and the rest is not historical.

Changesets

2012-05-07 14:36:14 +00:00 by mfriedrich 132c2cb

copy old retention.dat and objects.pre.cache to new location, if found #2585

refs #2585

2012-05-07 14:36:45 +00:00 by mfriedrich cbed446

copy old retention.dat and objects.pre.cache to new location, if found #2585

refs #2585
Member

Updated by mfriedrich on 2012-05-07 14:20:57 +00:00

  • Subject changed from icinga.spec: copy old retention.dat to new location to icinga.spec: copy old retention.dat and objects.pre.cache to new location, if found
Member

Updated by mfriedrich on 2012-05-07 14:35:15 +00:00

put an old one into this location, and edit the version to 1.6.0 or whatever.

vim /var/icinga/retention.dat

then rebuild the packages, force an upgrade.

~/packages/x86_64 $ sudo rpm -Uhv --force icinga-1.7.0-1.el5.x86_64.rpm icinga-gui-1.7.0-1.el5.x86_64.rpm icinga-idoutils-libdbi-mysql-1.7.0-1.el5.x86_64.rpm

$ ls -ltr /var/icinga/
insgesamt 0

$ ls -ltr /var/spool/icinga/
insgesamt 56
srwxr-xr-x 1 icinga icinga        0  6. Mai 14:25 ido.sock
-rw-r--r-- 1 icinga icinga    14862  7. Mai 16:31 retention.dat
-rw-r--r-- 1 icinga icinga    14205  7. Mai 16:31 objects.cache
-rw-rw-r-- 1 icinga icinga        0  7. Mai 16:31 idomod.tmp
drwxr-sr-x 2 icinga icingacmd  4096  7. Mai 16:31 cmd
drwxrwxr-x 2 icinga icinga     4096  7. Mai 16:31 checkresults
-rw-r--r-- 1 icinga icinga    15463  7. Mai 16:31 status.dat

$ vim /var/spool/icinga/retention.dat

########################################
#      ICINGA STATE RETENTION FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY ICINGA.  DO NOT MODIFY THIS FILE!
########################################
info {
created=1336397117
version=1.6.0
}

so icinga has successfully read the file, but not yet modified it to its new version - that will happen on future restarts, or daily retention.

the upgrade routine is only triggered once, then the files are deleted from the old location.

Member

Updated by mfriedrich on 2012-05-07 14:45:59 +00:00

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

works for me, and my rpms. so the change is clean and upgradable, even from repoforge.

@icinga-migration icinga-migration added this to the 1.7 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment