Skip to content
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

forced to run twice due to failing provider detection #95

Closed
zeph opened this issue Jul 26, 2013 · 9 comments
Closed

forced to run twice due to failing provider detection #95

zeph opened this issue Jul 26, 2013 · 9 comments

Comments

@zeph
Copy link

zeph commented Jul 26, 2013

err: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Provider rabbitmqctl is not functional on this host

u can checkout my https://github.com/zeph/mcollective-lnmp and type "vagrant up" to see it

u need to rekick puppet via "vagrant provision" to see it succeed

@jurgenweber
Copy link

run puppet a second time and it works fine, it is just the first time where it fails.

@bodepd
Copy link
Contributor

bodepd commented Jul 26, 2013

@zeph

try reverting this patch and see if it works:

https://github.com/puppetlabs/puppetlabs-rabbitmq/commit/0c4ba9bff3f6c4306b9d4eedb6847ad0b9cc2c98

This patch looks like it would result in that behavior

@apenney
Copy link
Contributor

apenney commented Jul 26, 2013

Hmm, this is unexpected (and of course I can't reproduce it easily in testing). I can confirm what you're seeing via vagrant and it's definitely odd. We do a rabbitmqctl list_users -q and look for 'unable to connect to node'. If we get that we fail out the providers.

I can see that the service refreshed and is running prior to the first attempted load of the provider, so this should work. At least my understanding was that providers don't run the :confine block until they are actually called for the first time so it shouldn't have done it up front and cached that result past the start of the service.

I'm torn over the right thing to do here. We want the provider to fail if the service isn't up so users don't have to specify their own requires, but if this is going to fail on every first run then it won't do. I'll dig into this a little more and see if I can find out exactly what is happening.

@jurgenweber
Copy link

Yeah, I can confirm reverting that code resolved the issue as well.

Thanks

@apenney
Copy link
Contributor

apenney commented Jul 26, 2013

I'll give in and switch these over to just autorequires the service. I wanted to avoid that as I couldn't autorequires the service but it seems like a cleaner solution and should hopefully work for a first run.

Testing with your vagrant and the changes:

Notice: /Stage[main]/Roles::Middleware/Rabbitmq_user[mcollective]/ensure: created

I'll get a PR in to make these changes.

@zeph
Copy link
Author

zeph commented Jul 26, 2013

awesome! tnx @apenney & @bodepd 👍

@apenney
Copy link
Contributor

apenney commented Jul 26, 2013

@zeph #96 - give that a whirl, seems to work better for me. If you have success I'll merge it.

@jurgenweber
Copy link

Yeah, works great for me. Thanks.

@apenney
Copy link
Contributor

apenney commented Jul 30, 2013

Awesome, closing this for now then!

@apenney apenney closed this as completed Jul 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants