HomeSoftware Heritage

Remove facter rabbitmq_nodename error message

Description

Remove facter rabbitmq_nodename error message

Currently when facter checks for rabbitmq_nodename and rabbitmq
is not available due to a number of reasons. We get the following
facter error displayed:
Error: Facter: error while resolving custom fact "rabbitmq_nodename": undefined method `[]' for nil:NilClass

Since facter errors are non fatal anyway let's be a little friendlier.

Before this change:
$ puppet apply foo.pp
Error: Facter: error while resolving custom fact "rabbitmq_nodename": undefined method `[]' for nil:NilClass
Notice: Compiled catalog for messaging-0.redhat.local in environment production in 0.02 seconds
Notice: foo
Notice: /Stage[main]/Main/Notify[foo]/message: defined 'message' as 'foo'

After this change:
$ puppet apply foo.pp
Notice: Compiled catalog for messaging-0.redhat.local in environment production in 0.02 seconds
Notice: foo
Notice: /Stage[main]/Main/Notify[foo]/message: defined 'message' as 'foo'

After this change with debug mode:
$ puppet --debug apply foo.pp 2>&1 |grep -e "Error:.*rabbitmq_nodename"

Debug: Facter: Error: rabbitmq_nodename facter failed. Output was
warning: the VM is running with native name encoding of latin1 which may
cause Elixir to malfunction as it expects utf8. Please ensure your
locale is set to UTF-8 (which can be verified by running "locale" in
your shell)

Details

Provenance
Michele Baldessari <michele@acksyn.org>Authored on Jul 11 2020, 9:35 AM
vsellierPushed on Sep 25 2020, 11:27 AM
Parents
R198:5818788de081: [blacksmith] Bump version to 10.1.1-rc0
Branches
Unknown
Tags
Unknown

Event Timeline

Michele Baldessari <michele@acksyn.org> committed R198:877f32042a5a: Remove facter rabbitmq_nodename error message (authored by Michele Baldessari <michele@acksyn.org>).Jul 12 2020, 6:22 PM