icingaweb2-module-director
icingaweb2-module-director copied to clipboard
Add global element for default group behavior.
Add Global Director Settings for group behavior so it can be changed from the current default of assignment (=) to append (+=).
- Add global element for default group behavior.
- Add default value 'assign' for default group behavior which matches group behavior .
- Add logic to IcingaObjectGroups so the class initializes the with the global group behavior and sets the group operator based on the class operator.
Partial Fix for #344, #636, #824, #2273
Thank you for your pull request. Before we can look at it, you'll need to sign a Contributor License Agreement (CLA).
Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA.
After that, please reply here with a comment and we'll verify.
Contributors that have not signed yet: @sol1-matt
-
If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Please contact us if you think this is the case.
-
If you signed the CLA as a corporation, your GitHub username may not have been submitted to us. Please reach out to the responsible person in your organization.
Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA.
CLA has been signed
@cla-bot check
Hi @sol1-matt,
most users probably want it this way, but for compatibility reasons this is hard to change. While I do not really like the idea of a global toggle, this of course addresses the problem. From a user perspective it might be irritating, having on Director behaving this way and another Director behaving another way. Even worse for vendors shipping baskets, that might behave differently in different setups.
To complete your variant, there is one important thing missing: object property resolution must work the same way, to address pre-calculated group memberships and related UI features. But even given this, I would prefer a clean solution, which would have to store the desired behaviour with every assignment.
Cheers, Thomas
Hi @Thomas-Gelf,
I did look into individual sync rule properties, it is where the changes in library/Director/Objects/IcingaObjectGroups.php came from originally, but had some problems getting that working, from memory the database needs to be modified to accommodate the use of assign, remove and append.
If the preferred approach here is to implement this at the individual sync rule property level I'll look at what changes are needed to make that happen.
Thanks, Matt
@sol1-matt: this is about group inheritance behavior, not about Sync - isn't it?
@Thomas-Gelf
This is about adding the ability for groups to use inheritance.
But I do a lot of automation so my solutions focused on functionality that can be used in Automation Sync Rules to achieved the desired outcome, or the global setting which affects everything.
Your comment is a reminder than there is a whole other UI people use to enter things manually so I'll need to account for that as well which will be complicated. The Automation Sync Rule properties are ordered, the current group allocation UI in director not so much.
Are you sure you don't want to reconsider your stance on a global setting? I'm managing multiple director installations, many of which I've added a global group append to. I've found the advantages of having a global setting far outweigh the downsides you've listed above in practical use.