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

Custom Vars not updated after upgrade #6569

Closed
Crunsher opened this issue Aug 23, 2018 · 8 comments
Closed

Custom Vars not updated after upgrade #6569

Crunsher opened this issue Aug 23, 2018 · 8 comments
Labels
area/db-ido Database output bug Something isn't working
Milestone

Comments

@Crunsher
Copy link
Contributor

When upgrading from Icinga 2.8.4 to 2.9.X (unconfirmed but suspected for other upgrade paths), users observed Hosts not having their custom var changes written to the DB. See this post

Also:

  • So far I was unable to reproduce this
  • Only Hosts seem to be affected at the moment
  • Only Hosts which were created before the upgrade have this problem
@Crunsher Crunsher added bug Something isn't working area/db-ido Database output labels Aug 23, 2018
@Crunsher Crunsher added this to the 2.9.2 milestone Aug 23, 2018
@Crunsher Crunsher self-assigned this Aug 23, 2018
@Crunsher
Copy link
Contributor Author

Here are sql dumps of a very minimal config from 2.8.4 and 2.9.1: sqldump.tar.gz

While no config has been changed, the hosts have different config checksums, this may have happened because of low level changes to our arrays and maps can change the order of elements.

@Crunsher
Copy link
Contributor Author

If you are having this issue as well, you can help us by providing the following information:

  • A list of types affected
  • The config of one such object
  • How did you try to change the custom var? (config, director, modified attribute etc)
  • Information on your database (Mysql/Pgsql, db encoding)
  • An excerpt from the icinga_customvars and customvarsstate of the custom var in question

@Crunsher
Copy link
Contributor Author

This seems unrelated to modified attributes.

  1. Changed attributes over API
  2. Upgraded to 2.9.1
  3. Changed attributes over API -> works

@Crunsher
Copy link
Contributor Author

Possible workaround: Set the config_checksum for Hosts or whatever type is affected to NULL, this will force a complete update of the objects.

$ mysql -uroot -picinga icinga
MariaDB [icinga]> UPDATE icinga_hosts SET config_hash = NULL;
MariaDB [icinga]> exit
Bye
$ sudo systemctl restart icinga2

Custom vars should now be up to date.

@dnsmichi
Copy link
Contributor

dnsmichi commented Sep 6, 2018

We're not able to reproduce this, after days of debugging during workhours. The described workaround with truncating the tables (not only the checksum) after upgrade has been updated, and worked for reporters. Therefore we're stopping with further investigation and closing here.

@dnsmichi dnsmichi closed this as completed Sep 6, 2018
@K0nne
Copy link
Contributor

K0nne commented Sep 13, 2018

I found another workaround:

For all affected hosts, you have to add an aditional check to the host objects. after a reload the missing customvar section apperars in icinga web2. after this the dummy-check can be removed.

@linuxmail
Copy link

hi,

Question: I cloned a host in Icingaweb2 (which was imported via Puppet) and changed some custom host vars. Now I have "original_attributes" with the original cloned customVars, instead of only the new vars. Now I have the problem, that the apply rules doesn't recognize the changes and execute the checks on that host.
host.vars looks OK and shows, what I changed.

I tried both workarounds, without any success:

  • Master 2.10.4-1.stretch
  • Agent 2.10.4-1.jessie

cu denny

@dnsmichi
Copy link
Contributor

dnsmichi commented Apr 8, 2019

Please move such questions to https://community.icinga.com :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-ido Database output bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants