Fixes for testing with molecule#807
Conversation
The task "Reload kernel parameters from file /etc/sysctl.d/sap_hana.conf" now recognizes a parameter change. Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
The task "Reload kernel parameters from file /etc/sysctl.d/91-NetApp-HANA.conf" now recognizes a parameter change. Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
The task "Reload kernel parameters from file /etc/sysctl.d/sap.conf" now recognizes a parameter change. Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
The task "Ensure that the required package groups are installed, RHEL 8.1" now has a tag for skipping the molecule idempotency test Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
The task "Reload kernel parameters from file '/etc/sysctl.d/ibm_largesend.conf'" now recognizes a parameter change. Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
…linuxlab#752 Signed-off-by: Bernd Finger <bfinger@redhat.com>
Signed-off-by: Bernd Finger <bfinger@redhat.com>
|
Why the overhead of executing "x entries + 1" commands per sysctl file and not just Since the checks do not validate the content of the config file, there is no benefit to checking if all of the settings are already active or not. If one deviates, it will also reload the whole file, not just the deviating entry. It's not 100% idempotent unless you add even more overhead to check and load each entry individually. |
We have three different sysctl files to modify according to applicable SAP notes, and because we want to follow the SAP notes as closely as possible, we do the modification for each file separately. For each file, we perform the modification of the file and then reload the parameters from the file (using sysctl -p) so that it becomes effective immediately.
I am not checking if all of the settings of a config file are active or not. I want to know if any, and which one(s) of the entries or which of the current settings have been modified after reloading all the settings. So we need to compare the desired state with the current state. The solution I offered appears to be robust and easy to understand. Happy to implement a better solution if there is one!
We want to detect if there was a change or not. A misconfiguration should result in a task error in the tasks But maybe I misunderstood some of your points. In this case, can you please provide examples? |
|
Dear @berndfinger Thanks a lot for working on it. Guillaume |
These additional tasks are necessary to correctly report the 'changed' state of 'sysctl -p'. Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
This additional task is necessary to correctly report the 'changed' state of 'sysctl -p'. Relates to sap-linuxlab#752. Signed-off-by: Bernd Finger <bfinger@redhat.com>
ja9fuchs
left a comment
There was a problem hiding this comment.
Thanks @berndfinger for the comments and explanation. Now I get why these tasks are there. :)
👍
These changes should ensure that the molecule idempotency tests no longer fail, see issue #752.