test_corosync_config fails for pacemaker 3.x
AndreasPfaffeneder opened this issue · 3 comments
Affected Puppet, Ruby, OS and module versions/distributions
Puppet: 6.21.1
Ruby: 2.5.5p157
Distribution: RHEL 8.4
Module version: v8.0.0
How to reproduce (e.g Puppet code you use)
Multiple steps required:
1.) Have a corosync.conf which is not working, something like:
/etc/corosync/corosync.conf
[...]
totem{
crypto_hash: sha1
crypto_cipher: aes256
transport: udpu
}
[...]
This configuration will not validate, because crypto_hash & crpto_cipher must not be set when using udpu.
Now, trying to deploy a configuration will persistently fail, because test_corosync_config defaults to true, but the actual command does not use the temporarly written configuration file from puppet in /etc/corosync/corosync.conf<puppet-name-extension> via
/usr/bin/env COROSYNC_MAIN_CONFIG_FILE=/etc/corosync/corosync.conf<puppet-name-extension> /usr/sbin/corosync -t but the currently deployed configuration file
So the check command should be changed to something like
/usr/sbin/corosync -t -c %
What are you seeing
Check command validates current configuration, not future configuration.
What behaviour did you expect instead
Check command checks the file deployed by puppet.
Output log
Any additional information you'd like to impart
config_validate_cmd exists
need to get the parameter to the signature of the main class.
With #509 its possible to provide a custom check command which solves that issue.
For reference, the check-command for pacemaker 3x.:
class {'corosync':
[...]
config_validate_cmd => '/usr/sbin/corosync -t -c %'
}