[icinga-checkins] icinga.org: icinga2/feature/configconvert-2743: ConfigConvert: refactor host-svc links, add full service/usergroup relinking

git at icinga.org git at icinga.org
Thu May 2 22:17:32 CEST 2013

Module: icinga2
Branch: feature/configconvert-2743
Commit: 31d9e4ea519efe93224330d893f71ff9744e381f
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=31d9e4ea519efe93224330d893f71ff9744e381f

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Fri Apr  5 17:20:56 2013 +0200

ConfigConvert: refactor host-svc links, add full service/usergroup relinking

due to the relinking afterwards we actually modify the service objects
already prepared for 2x. since the *group magic depends on the
host/services/users already prepared, we get a perpetuum mobile here
with the host loop and resolving service relations.

in order to safely fix the issue, there's a seperate host-service link
loop after resolving all the other needed objects, which may cost a
little bit more performance, but is safe and standalone, getting all
previous modifications, migrations and also hacks.

next to the refactored flow, the issue with resolving the correct
servicegroups and stashing them into an array is solved, as well as
converting the existing contactgroups to usergroups, as well as
re-linking existing contactgroup->members to their new home,

note: when parsing the servicegroup members into an array, it must not
be sorted afterwards, because we will shift 2 objects (host, service) in
order to identify the correct service object for adding the servicegroup

some code reorganisation too, plus a minor comma fix for the host
address macro.

the used 1x configuration will be addressed in 2743.cfg on
icinga-core.git, with all future additions.

refs #2743


 contrib/configconvert/Icinga2/Convert.pm        |  426 +++++++++++++----------
 contrib/configconvert/Icinga2/DumpIcinga2Cfg.pm |   12 +-
 2 files changed, 249 insertions(+), 189 deletions(-)

Diff:   https://git.icinga.org/?p=icinga2.git;a=commitdiff;h=31d9e4ea519efe93224330d893f71ff9744e381f

More information about the icinga-checkins mailing list