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

[dev.icinga.com #10051] Missing fix for reload on Windows in 2.3.9 #3348

Closed
icinga-migration opened this issue Aug 31, 2015 · 9 comments
Closed
Labels
area/distributed Distributed monitoring (master, satellites, clients) blocker Blocks a release or needs immediate attention bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by mfrosch on 2015-08-31 13:27:59 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-09-04 13:38:28 +00:00)
Target Version: 2.3.10
Last Update: 2015-09-04 13:38:28 +00:00 (in Redmine)

Icinga Version: 2.3.9
Backport?: Already backported
Include in Changelog: 1

When pushing new config data to a Windows agent via cluster config sync, the check fails every time:

critical/Application: Found error in config: reloading aborted

A manual configtest or restart works.

Master: 2.3.8
Agent: 2.3.9

Attachments

Changesets

2015-09-04 13:37:53 +00:00 by (unknown) 35bc567

Implement reload functionality for Windows

refs #7880
fixes #10051

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-08-31 13:48:10 +00:00

  • Relates set to 7880

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-08-31 13:48:21 +00:00

  • Target Version set to Backlog

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-31 14:06:34 +00:00

  • Status changed from New to Closed
  • Target Version deleted Backlog

Invalid, see #7880

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-08-31 14:28:38 +00:00

  • Subject changed from Windows config update fails at config test to Missing fix for reload on Windows in 2.3.9
  • Status changed from Closed to New

This issue should be in place for the next bugfix release, instead of re-assigning #7880.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-08-31 14:42:39 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.3.10
  • Backport? changed from TBD to Yes

I'm going to apply and test the fix on my windows development environment.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-09-01 16:22:48 +00:00

  • File added icinga2#10051_compile_cluster_config_sync_reload.png_
  • File added icinga2#10051_compile_vs2015.png_

Patch

Checkout support/2.3 with TortoiseGit, cherry-pick the fix and build a new exe file using Visual Studio.

Tests

  • Pre-install 2.3.9 in order to put the configuration into "C:\Program Files (x86)\icinga2\etc\icinga2"
  • Ensure that icinga2 is running somewhere as master, and run 'icinga2 node wizard' to install a new client on Windows
  • Run Visual Studio 2015\projects\icinga2\Bin\Release\Debug\icinga2 daemon

icinga2_#10051_compile_vs2015.png

  • Configure the master in zones.conf
object Zone "windows" {
  parent = "master"
  endpoints = [ "michi-PC" ]
}

object Endpoint "michi-PC" {
  host = "10.0.10.113"
}
  • Add a new test config for this new zone "michi-PC"
    • include in icinga2.conf
# vim /etc/icinga2/zones.d/windows/hosts.conf

object Host "windows-host" {
  address = "10.0.10.113"
  check_command = "hostalive"
  vars.os = "Windows"
}

object Service "disk" {
  host_name = "windows-host"
  check_command = "disk-windows"
}
  • Restart icinga2 on the master
  • Look into C:\Program Files (x86)\Icinga2\var\lib\icinga2\api\zones\michi-PC
[2015-09-01 17:29:36 +0200] information/ApiListener: New client connection for identity 'nbmif.int.netways.de'
[2015-09-01 17:29:37 +0200] information/ApiListener: Updating configuration file: C:\Program Files (x86)\ICINGA2\var/lib/icinga2/api/zones/michi-PC//_etc/hosts.conf
[2015-09-01 17:29:37 +0200] information/ApiListener: Restarting after configuration change.
[2015-09-01 17:29:38 +0200] information/Application: Got reload command: Starting new instance.

icinga2_#10051_compile_cluster_config_sync_reload.png

The problem is that reloading in foreground does not work here (the icinga2 application must be run as Service, waiting for the child triggering exitcode!=7).

Will continue tomorrow with my tests.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-09-04 11:56:31 +00:00

  • Priority changed from Normal to High

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-09-04 13:34:17 +00:00

  • File added icinga2_10051_windows_reload_working_tests.png
  • File added icinga2_10051_windows_reload_working_tests_active_config.png

Packages

I've managed to build my own snapshot packages and using those for proper tests.

Tests

Finally put up an entire set to following the chain from config updates to windows reload going further checking the runtime objects.

icinga2_10051_windows_reload_working_tests.png

icinga2_10051_windows_reload_working_tests_active_config.png

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-09-04 13:38:28 +00:00

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

Applied in changeset 35bc567.

@icinga-migration icinga-migration added blocker Blocks a release or needs immediate attention bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.10 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) blocker Blocks a release or needs immediate attention bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant