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

Chef restarts RabbitMQ because it always set the permissions to all the users when it runs #197

Closed
demonccc opened this issue Jan 8, 2015 · 9 comments

Comments

@demonccc
Copy link

demonccc commented Jan 8, 2015

Hi,

I was checking the code and I found that the cookbook use this command to detect user the policies:

cmd = "rabbitmqctl -q list_user_permissions #{name} | grep \"^#{vhost}\\b\""

When vhost is /, the grep command doesn't match and the function user_has_permissions? returns false (permissions found but do not match).

I tested the command manually:

#  rabbitmqctl -q list_user_permissions bell-rw
/       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+
# rabbitmqctl -q list_user_permissions bell-rw | grep "/\b"

And I tested the command grep by using the command echo to emulate the rabbitmqctl output:

# echo "/       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+"  | grep "/\b"
# echo "/lala       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+"  | grep "/lala\b"
/lala       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+

Regards.

@cmluciano
Copy link

Is this still a problem for you?

@johnbellone
Copy link

Ah I think I am hitting this also.

@demonccc
Copy link
Author

Hi, I didn't see any change in the code... Have you changed anything? I didn't test the new version of this cookbook.

@scalp42
Copy link
Contributor

scalp42 commented Dec 11, 2015

@cmluciano @jjasghar any plans for this ?

@jjasghar
Copy link
Contributor

@scalp42 i'll be honest, i havent dug into this at all.

If you have a fix, i'd love to see it, but i'll put it on my TODO and ideally get to it soon.

@scalp42
Copy link
Contributor

scalp42 commented Dec 11, 2015

@jjasghar okay I'll try to get to it early next week unless @demonccc has a fix for it already

@jjasghar
Copy link
Contributor

@scalp42 awesome to hear. thanks! 🤘

@scalp42
Copy link
Contributor

scalp42 commented Dec 14, 2015

@demonccc @jjasghar this was fixed in a1bb98b

Can be closed 😄

@demonccc
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants