-
-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fact rabbitmq_plugins_dirs can crash the puppet run #783
Labels
bug
Something isn't working
Comments
jistr
added a commit
to jistr/puppet-rabbitmq
that referenced
this issue
Mar 25, 2019
Before trying to access the contents of a regexp match, see if the match was successful. On machines without rabbitmqctl this match will return nil. Fixes: voxpupuli#783
jistr
added a commit
to jistr/puppet-rabbitmq
that referenced
this issue
Mar 26, 2019
Before trying to access the contents of a regexp match, see if the match was successful. On machines without rabbitmqctl this match will return `nil`, so we can't index it with `[1]`. When that's the case, the whole rabbitmq_plugins_dirs fact value will now be `nil`, instead of throwing an exception. Fixes: voxpupuli#783
jistr
added a commit
to jistr/puppet-rabbitmq
that referenced
this issue
Mar 26, 2019
Before trying to access the contents of a regexp match, see if the match was successful. On machines without rabbitmqctl this match will return `nil`, so we can't index it with `[1]`. When that's the case, the whole rabbitmq_plugins_dirs fact value will now be `nil`, instead of throwing an exception. Fixes: voxpupuli#783
jistr
added a commit
to jistr/puppet-rabbitmq
that referenced
this issue
Mar 27, 2019
Before trying to access the contents of a regexp match, see if the match was successful. On machines without rabbitmqctl this match will return `nil`, so we can't index it with `[1]`. When that's the case, the whole rabbitmq_plugins_dirs fact value will now be `nil`, instead of throwing an exception. Fixes: voxpupuli#783
jistr
added a commit
to jistr/puppet-rabbitmq
that referenced
this issue
Mar 27, 2019
Before trying to access the contents of a regexp match, see if the match was successful. On machines without rabbitmqctl this match will return `nil`, so we can't index it with `[1]`. When that's the case, the whole rabbitmq_plugins_dirs fact value will now be `nil`, instead of throwing an exception. Fixes: voxpupuli#783
cegeka-jenkins
pushed a commit
to cegeka/puppet-rabbitmq
that referenced
this issue
Mar 26, 2021
Before trying to access the contents of a regexp match, see if the match was successful. On machines without rabbitmqctl this match will return `nil`, so we can't index it with `[1]`. When that's the case, the whole rabbitmq_plugins_dirs fact value will now be `nil`, instead of throwing an exception. Fixes: voxpupuli#783
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected Puppet, Ruby, OS and module versions/distributions
puppet-rabbitmq/lib/facter/rabbitmq_plugins_dirs.rb
Lines 4 to 5 in 5477e69
How to reproduce (e.g Puppet code you use)
Use the module on a system which doesn't have rabbitmqctl present. E.g. when we only want to generate configs but not manage RabbitMQ on that host.
What are you seeing
"Error: Facter: error while resolving custom fact "rabbitmq_plugins_dirs": undefined method `[]' for nil:NilClass",
This happens because:
returns nil, and then we try to access index on that nil with
[1]
.What behaviour did you expect instead
Ignore the absence of rabbitmqctl, return empty list for rabbitmq_plugins_dirs fact.
The text was updated successfully, but these errors were encountered: