-
Notifications
You must be signed in to change notification settings - Fork 579
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
Bugfix: configobject shutdown order #10191
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,6 +295,7 @@ vigiroux <[email protected]> | |
Vytenis Darulis <[email protected]> | ||
Wenger Florian <[email protected]> | ||
Will Frey <[email protected]> | ||
William Calliari <[email protected]> | ||
Winfried Angele <[email protected]> | ||
Wolfgang Nieder <[email protected]> | ||
XnS <[email protected]> | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -598,10 +598,10 @@ void ConfigObject::StopObjects() | |||||
continue; | ||||||
|
||||||
for (const ConfigObject::Ptr& object : dtype->GetObjects()) { | ||||||
#ifdef I2_DEBUG | ||||||
Log(LogDebug, "ConfigObject") | ||||||
<< "Deactivate() called for config object '" << object->GetName() << "' with type '" << type->GetName() << "'."; | ||||||
#endif /* I2_DEBUG */ | ||||||
<< "Deactivate() called for config object '" << object->GetName() | ||||||
<< "' with type '" << type->GetName() | ||||||
<< "and priority " << type->GetActivationPriority() << "'."; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
object->Deactivate(); | ||||||
} | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,7 +10,7 @@ namespace icinga | |||||
|
||||||
class IcingaDB : ConfigObject | ||||||
{ | ||||||
activation_priority 100; | ||||||
activation_priority -50; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No matter whether Icinga DB purges Redis and re-inserts everything – or performs a diff – given #10151, not yet activated objects – all checkables – will effectively be deleted. This is not acceptable, so if -50 is actually needed here, we have to: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Idk, how you came up to that conclusion, nor how this relates to #10057 or #10151 in anyway. Icinga DB won't do anything if the checkables aren't truly deleted. icinga2/lib/icingadb/icingadb-objects.cpp Lines 2781 to 2782 in 3218908
I already checked this PR last week and noticed that Icinga DB, IDO etc. are not activated first as before, but last in the same way they are deactivated. IMHO the possible solution I am thinking of is to not touch the activation order of these objects on startup and deactivate them last on shutdown/reload, but this will not be achievable by simply changing the |
||||||
|
||||||
[config] String host { | ||||||
default {{{ return "127.0.0.1"; }}} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this!