diff --git a/.puppet-lint.rc b/.puppet-lint.rc index dd8272c7..02a3e71d 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1,3 +1 @@ --fail-on-warnings ---no-parameter_documentation-check ---no-parameter_types-check diff --git a/.sync.yml b/.sync.yml index b2d9d45d..784bd9e6 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,4 +1,8 @@ --- +.puppet-lint.rc: + enabled_lint_checks: + - parameter_documentation + - parameter_types .travis.yml: docker_sets: - set: centos7-64 diff --git a/REFERENCE.md b/REFERENCE.md index 42addf42..b376293b 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -30,12 +30,12 @@ ### Data types -* [`Corosync::ArrayRing`](#Corosync--ArrayRing) +* [`Corosync::ArrayRing`](#Corosync--ArrayRing): Custom type for infinitely nestable arrays * [`Corosync::CryptoCipher`](#Corosync--CryptoCipher): Defines the allowed cipher types for secure corosync communication -* [`Corosync::CryptoHash`](#Corosync--CryptoHash) -* [`Corosync::IpStringIp`](#Corosync--IpStringIp) -* [`Corosync::QuorumAlgorithm`](#Corosync--QuorumAlgorithm) -* [`Corosync::Syslogpriority`](#Corosync--Syslogpriority) +* [`Corosync::CryptoHash`](#Corosync--CryptoHash): Custom type for possible crypto hashes +* [`Corosync::IpStringIp`](#Corosync--IpStringIp): Custom type for string <-> array of string variants +* [`Corosync::QuorumAlgorithm`](#Corosync--QuorumAlgorithm): Custom type for quorumalgorithm enum +* [`Corosync::Syslogpriority`](#Corosync--Syslogpriority): Custom type for syslog priority enum ## Classes @@ -76,8 +76,10 @@ The following parameters are available in the `corosync` class: * [`authkey`](#-corosync--authkey) * [`crypto_hash`](#-corosync--crypto_hash) * [`crypto_cipher`](#-corosync--crypto_cipher) +* [`config_validate_cmd`](#-corosync--config_validate_cmd) * [`threads`](#-corosync--threads) * [`bind_address`](#-corosync--bind_address) +* [`pcs_version`](#-corosync--pcs_version) * [`port`](#-corosync--port) * [`multicast_address`](#-corosync--multicast_address) * [`unicast_addresses`](#-corosync--unicast_addresses) @@ -137,11 +139,8 @@ The following parameters are available in the `corosync` class: * [`clear_node_high_bit`](#-corosync--clear_node_high_bit) * [`max_messages`](#-corosync--max_messages) * [`test_corosync_config`](#-corosync--test_corosync_config) -* [`test_corosync_config_cmd`](#-corosync--test_corosync_config_cmd) * [`watchdog_device`](#-corosync--watchdog_device) * [`provider`](#-corosync--provider) -* [`config_validate_cmd`](#-corosync--config_validate_cmd) -* [`pcs_version`](#-corosync--pcs_version) ##### `enable_secauth` @@ -187,6 +186,14 @@ values are none, aes256, aes192, aes128, and 3des Default value: `'aes256'` +##### `config_validate_cmd` + +Data type: `String[1]` + + + +Default value: `'/usr/bin/env COROSYNC_MAIN_CONFIG_FILE=% /usr/sbin/corosync -t'` + ##### `threads` Data type: `Optional[Integer]` @@ -206,6 +213,14 @@ Can be specified as an array to have multiple rings. Default value: `$corosync::params::bind_address` +##### `pcs_version` + +Data type: `String` + + + +Default value: `''` + ##### `port` Data type: `Optional[Variant[Stdlib::Port, Array[Stdlib::Port]]]` @@ -774,10 +789,6 @@ Whether we should test new configuration files with `corosync -t`. Default value: `$corosync::params::test_corosync_config` -##### `test_corosync_config_cmd` - -Override the standard config_validate_cmd which only works for corosync 2.x. - ##### `watchdog_device` Data type: `Optional[Variant[Stdlib::Absolutepath, Enum['off']]]` @@ -795,22 +806,6 @@ What command line utility provides corosync configuration capabilities. Default value: `'pcs'` -##### `config_validate_cmd` - -Data type: `String[1]` - - - -Default value: `'/usr/bin/env COROSYNC_MAIN_CONFIG_FILE=% /usr/sbin/corosync -t'` - -##### `pcs_version` - -Data type: `String` - - - -Default value: `''` - ### `corosync::params` Configures sane defaults based on the operating system. @@ -1802,7 +1797,7 @@ discover the appropriate provider for your platform. ### `Corosync::ArrayRing` -The Corosync::ArrayRing data type. +Custom type for infinitely nestable arrays Alias of @@ -1820,13 +1815,13 @@ Alias of `Enum['aes256', 'aes192', 'aes128', '3des']` ### `Corosync::CryptoHash` -The Corosync::CryptoHash data type. +Custom type for possible crypto hashes Alias of `Enum['md5', 'sha1', 'sha256', 'sha384', 'sha512']` ### `Corosync::IpStringIp` -The Corosync::IpStringIp data type. +Custom type for string <-> array of string variants Alias of @@ -1838,13 +1833,13 @@ Variant[Stdlib::IP::Address, Array[ ### `Corosync::QuorumAlgorithm` -The Corosync::QuorumAlgorithm data type. +Custom type for quorumalgorithm enum Alias of `Enum['ffsplit', 'lms']` ### `Corosync::Syslogpriority` -The Corosync::Syslogpriority data type. +Custom type for syslog priority enum Alias of `Enum['debug', 'info', 'notice', 'warning', 'err', 'alert', 'emerg', 'crit']` diff --git a/manifests/init.pp b/manifests/init.pp index 2250abae..3b5ba773 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,6 +24,8 @@ # Encryption cipher used by corosync for intra-cluster communication. Valid # values are none, aes256, aes192, aes128, and 3des # +# @param config_validate_cmd +# # @param threads # How many threads you are going to let corosync use to encode and decode # multicast messages. If you turn off secauth then corosync will ignore @@ -33,6 +35,8 @@ # The ip address we are going to bind the corosync daemon too. # Can be specified as an array to have multiple rings. # +# @param pcs_version +# # @param port # The UDP port that corosync will use to do its multicast communication. Be # aware that corosync used this defined port plus minus one. @@ -306,9 +310,6 @@ # Whether we should test new configuration files with `corosync -t`. # (requires corosync 2.3.4) # -# @param test_corosync_config_cmd -# Override the standard config_validate_cmd which only works for corosync 2.x. -# # @param watchdog_device # Watchdog device to use, for example '/dev/watchdog' or 'off'. # Its presence (or lack thereof) shifted with corosync versions. diff --git a/metadata.json b/metadata.json index 28d481ca..22e4d311 100644 --- a/metadata.json +++ b/metadata.json @@ -30,8 +30,8 @@ { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "18.04", - "20.04" + "20.04", + "22.04" ] }, { diff --git a/spec/acceptance/cs_location_spec.rb b/spec/acceptance/cs_location_spec.rb index 34d4bbb7..80f4a7c8 100755 --- a/spec/acceptance/cs_location_spec.rb +++ b/spec/acceptance/cs_location_spec.rb @@ -64,7 +64,7 @@ class { 'corosync': pp = <<-EOS cs_location { 'duncan_vip_there': primitive => 'duncan_vip', - node_name => $::hostname, + node_name => $facts['networking']['hostname'], score => 'INFINITY', } EOS @@ -93,7 +93,7 @@ class { 'corosync': cs_location { 'duncan_vip_there': primitive => 'duncan_vip', resource_discovery => 'exclusive', - node_name => $::hostname, + node_name => $facts['networking']['hostname'], score => 'INFINITY', } EOS diff --git a/types/arrayring.pp b/types/arrayring.pp index 787f07c3..058fa3f1 100644 --- a/types/arrayring.pp +++ b/types/arrayring.pp @@ -1,3 +1,5 @@ +# @summary Custom type for infinitely nestable arrays +# type Corosync::ArrayRing = Variant[ Array[Stdlib::IP::Address], Array[ diff --git a/types/cryptohash.pp b/types/cryptohash.pp index a9b9c107..c9d42ab2 100644 --- a/types/cryptohash.pp +++ b/types/cryptohash.pp @@ -1,3 +1,5 @@ +# @summary Custom type for possible crypto hashes +# type Corosync::CryptoHash = Enum[ 'md5', 'sha1', diff --git a/types/ipstringip.pp b/types/ipstringip.pp index a8717bce..fa1d6e5f 100644 --- a/types/ipstringip.pp +++ b/types/ipstringip.pp @@ -1,3 +1,5 @@ +# @summary Custom type for string <-> array of string variants +# type Corosync::IpStringIp = Variant[ Stdlib::IP::Address, Array[ diff --git a/types/quorumalgorithm.pp b/types/quorumalgorithm.pp index 0c1da331..12863bd4 100644 --- a/types/quorumalgorithm.pp +++ b/types/quorumalgorithm.pp @@ -1,3 +1,5 @@ +# @summary Custom type for quorumalgorithm enum +# type Corosync::QuorumAlgorithm = Enum[ 'ffsplit', 'lms', diff --git a/types/syslogpriority.pp b/types/syslogpriority.pp index 94e463bd..02fe7b53 100644 --- a/types/syslogpriority.pp +++ b/types/syslogpriority.pp @@ -1,3 +1,5 @@ +# @summary Custom type for syslog priority enum +# type Corosync::Syslogpriority = Enum[ 'debug', 'info',