Add validate_cmd
for keepalived.conf
#275
Annotations
5 errors
vendor/bundle/ruby/3.2.0/gems/voxpupuli-acceptance-3.2.0/lib/voxpupuli/acceptance/examples.rb#L4
keepalived class with unmanaged external config behaves like an idempotent resource applies with no errors
Failure/Error: raise CommandFailure, "Host '#{self}' exited with #{result.exit_code} running:\n #{cmdline}\nLast #{@options[:trace_limit]} lines of output were:\n#{result.formatted_output(@options[:trace_limit])}"
Beaker::Host::CommandFailure:
Host 'oracle8-64-puppet7.example.com' exited with 6 running:
puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_112743125.fllBb7.pp
Last 10 lines of output were:
Info: /Stage[main]/Keepalived::Config/Concat[/etc/keepalived/keepalived.conf]/File[/etc/keepalived/keepalived.conf]: Filebucketed /etc/keepalived/keepalived.conf to puppet with sum 855f5706e92996eb137827a3c6cdf314c2cec14f356ac1a5d0da766c95d77726
Error: Execution of '/usr/sbin/keepalived -l -t -f /etc/keepalived/keepalived.conf20240802-1252-1q79w80' returned 4: (VI_50) No VIP specified; at least one is sensible
(VI_50) No VIP specified; at least one is sensible
Error: /Stage[main]/Keepalived::Config/Concat[/etc/keepalived/keepalived.conf]/File[/etc/keepalived/keepalived.conf]/content: change from '{sha256}855f5706e92996eb137827a3c6cdf314c2cec14f356ac1a5d0da766c95d77726' to '{sha256}bfc75800a87c80c3b8cfc73a6300d9d5d18d797abe761df12d589cf8b84d96a2' failed: Execution of '/usr/sbin/keepalived -l -t -f /etc/keepalived/keepalived.conf20240802-1252-1q79w80' returned 4: (VI_50) No VIP specified; at least one is sensible
(VI_50) No VIP specified; at least one is sensible
Info: Class[Keepalived::Service]: Unscheduling all events on Class[Keepalived::Service]
�[mNotice: /Stage[main]/Keepalived::Service/Service[keepalived]: Dependency File[/etc/keepalived/keepalived.conf] has failures: true
Warning: /Stage[main]/Keepalived::Service/Service[keepalived]: Skipping because of failed dependencies
Info: Stage[main]: Unscheduling all events on Stage[main]
�[mNotice: Applied catalog in 0.09 seconds
Shared Example Group: "an idempotent resource" called from ./spec/acceptance/keepalived_spec.rb:82
|
vendor/bundle/ruby/3.2.0/gems/voxpupuli-acceptance-3.2.0/lib/voxpupuli/acceptance/examples.rb#L8
keepalived class with unmanaged external config behaves like an idempotent resource applies a second time without changes
Failure/Error: raise CommandFailure, "Host '#{self}' exited with #{result.exit_code} running:\n #{cmdline}\nLast #{@options[:trace_limit]} lines of output were:\n#{result.formatted_output(@options[:trace_limit])}"
Beaker::Host::CommandFailure:
Host 'oracle8-64-puppet7.example.com' exited with 4 running:
puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_112745133.xJxvdI.pp
Last 10 lines of output were:
Info: Applying configuration version '1722598066'
Info: Computing checksum on file /etc/keepalived/keepalived.conf
Info: /Stage[main]/Keepalived::Config/Concat[/etc/keepalived/keepalived.conf]/File[/etc/keepalived/keepalived.conf]: Filebucketed /etc/keepalived/keepalived.conf to puppet with sum 855f5706e92996eb137827a3c6cdf314c2cec14f356ac1a5d0da766c95d77726
Error: Execution of '/usr/sbin/keepalived -l -t -f /etc/keepalived/keepalived.conf20240802-1365-1lnmib4' returned 4: (VI_50) No VIP specified; at least one is sensible
(VI_50) No VIP specified; at least one is sensible
Error: /Stage[main]/Keepalived::Config/Concat[/etc/keepalived/keepalived.conf]/File[/etc/keepalived/keepalived.conf]/content: change from '{sha256}855f5706e92996eb137827a3c6cdf314c2cec14f356ac1a5d0da766c95d77726' to '{sha256}bfc75800a87c80c3b8cfc73a6300d9d5d18d797abe761df12d589cf8b84d96a2' failed: Execution of '/usr/sbin/keepalived -l -t -f /etc/keepalived/keepalived.conf20240802-1365-1lnmib4' returned 4: (VI_50) No VIP specified; at least one is sensible
(VI_50) No VIP specified; at least one is sensible
�[mNotice: /Stage[main]/Keepalived::Service/Service[keepalived]: Dependency File[/etc/keepalived/keepalived.conf] has failures: true
Warning: /Stage[main]/Keepalived::Service/Service[keepalived]: Skipping because of failed dependencies
�[mNotice: Applied catalog in 0.08 seconds
Shared Example Group: "an idempotent resource" called from ./spec/acceptance/keepalived_spec.rb:82
|
spec/acceptance/keepalived_spec.rb#L104
keepalived class with unmanaged external config File "/etc/keepalived/keepalived.conf" content is expected to contain "include /etc/keepalived/myconfig.conf"
Failure/Error: its(:content) { is_expected.to contain('include /etc/keepalived/myconfig.conf') }
expected "# Managed by Puppet\nglobal_defs {\n notification_email {\n [email protected]\n }\n snmp_sock...pe PASS\n auth_pass secret\n }\n\n virtual_ipaddress {\n 10.0.0.1/16 dev eth0\n }\n}\n\n\n" to contain "include /etc/keepalived/myconfig.conf"
|
spec/acceptance/keepalived_spec.rb#L143
keepalived class with broken config fails validate command
Failure/Error: expect(apply_result.output).to match %r{.*emailfrom missing.*}
expected "\e[0;32mInfo: Loading facts\e[0m\n\e[0;32mInfo: Loading facts\e[0m\n\e[1;33mWarning: Facter: Contain...palived]: Triggered 'refresh' from 1 event\e[0m\n\e[mNotice: Applied catalog in 1.15 seconds\e[0m\n" to match /.*emailfrom missing.*/
Diff:
@@ -1,13 +1,25 @@
-/.*emailfrom missing.*/
+Info: Loading facts
+Info: Loading facts
+Warning: Facter: Container runtime, 'docker', is unsupported, setting to, 'container_other'
+�[mNotice: Compiled catalog for oracle8-64-puppet7.example.com in environment production in 0.08 seconds
+Info: Using environment 'production'
+Info: Applying configuration version '1722598071'
+�[mNotice: /Stage[main]/Keepalived::Config/File[/etc/sysconfig/keepalived]/content: content changed '{sha256}b18c5dd9278439d8ec7f4568efe9b5197e7b8e5b2499abde6e37ba7d089b5559' to '{sha256}70c4537afbc019f5f5c61fe139fc4380beac484f621e9a23c5c91d08bd7b1c06'
+Info: Computing checksum on file /etc/keepalived/keepalived.conf
+Info: /Stage[main]/Keepalived::Config/Concat[/etc/keepalived/keepalived.conf]/File[/etc/keepalived/keepalived.conf]: Filebucketed /etc/keepalived/keepalived.conf to puppet with sum 47d4e40550fa54f216993b7311db6ec62cf5364ee6a8d5ba4a4306c001307330
+�[mNotice: /Stage[main]/Keepalived::Config/Concat[/etc/keepalived/keepalived.conf]/File[/etc/keepalived/keepalived.conf]/content: content changed '{sha256}47d4e40550fa54f216993b7311db6ec62cf5364ee6a8d5ba4a4306c001307330' to '{sha256}ea4f728bc07dc3bf394d27fa38bdf338a15abb236aaed698344bd74b32b87a6d'
+Info: Concat[/etc/keepalived/keepalived.conf]: Scheduling refresh of Service[keepalived]
+�[mNotice: /Stage[main]/Keepalived::Service/Service[keepalived]: Triggered 'refresh' from 1 event
+�[mNotice: Applied catalog in 1.15 seconds
|
|
This job failed
Loading