-
Notifications
You must be signed in to change notification settings - Fork 571
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
Problems with custom vars not being updated if hosts have been created and updated via API #8699
Comments
At the first sight it sounds like #8155. |
I am not sure if this is the case. The problem can be reproduced by this simple sequence:
Do you need any additional logs or information to narrow it down ? |
We believe we have run into this as well on
We were able to get around it on a test server by deleting the contents of |
Sure or not sure – would you test that fix if I build packages for you? |
yes - no problem with that (sorry for the late reply) |
On which Icinga 2 version + OS shall the packages be based? |
uname -a icinga2 --version Copyright (c) 2012-2021 Icinga GmbH (https://icinga.com/) System information: Build information: Application information: General paths: Old paths (deprecated): Internal paths: |
https://git.icinga.com/packaging/deb-icinga2/-/jobs/127541/artifacts/download Backup your |
thanks - will install it today or tomorrow and will let you know. |
The fix is working ! See below a snip of the installed version and the output of the commands.
root@icingamaster-dev:/etc/icinga2# icinga2 object list --type=host --name "azrg_acs_mixed"
root@icingamaster-dev:/etc/icinga2# icinga2 --version Copyright (c) 2012-2021 Icinga GmbH (https://icinga.com/) System information: Build information: Application information: General paths: Old paths (deprecated): Internal paths: |
@Al2Klimov |
Unfortunately no. |
Changes of custom vars are not handled correctly
This issue is probably related to #6012, #6569 and #6576.
We create and update hosts via API. The updates of custom vars are not processed correctly (e.g. hostgroups and dependencies defined on above mentioned custom vars) even after a restart/reload of the icinga2 service
We have tried out all workarounds (e.g. UPDATE icinga_hosts SET config_hash = NULL; ...) without any luck.
To make a long story short, there is a difference between the host object retrieved via the API :
curl -k -s -u 'user:password' -H 'Accept: application/json'
-H 'X-HTTP-Method-Override: GET' -X POST
'https://localhost:5665/v1/objects/hosts'
-d '{ "filter": "host.name=="600601_IN_Salem_MithraScans(P)Ltd_12504_desktop-vice7td_rlp0"", "pretty": true }'
and via the icinga2 object list command below:
icinga2 object list --type=host --name="600601_IN_Salem_MithraScans(P)Ltd_12504_desktop-vice7td_rlp0"
even after a restart or reload of icinga2
To Reproduce
Expected behavior
The updated custom vars should be reflected in the icinga2 object list output
Screenshots
n.a.
Your Environment
Include as many relevant details about the environment you experienced the problem in
icinga2 --version
):icinga2 feature list
):icinga2 daemon -C
):zones.conf
file (oricinga2 object list --type Endpoint
andicinga2 object list --type Zone
) from all affected nodes.Content of zones.conf
Additional context
The text was updated successfully, but these errors were encountered: