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

Projects
None yet
5 participants
@demonccc
Copy link

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

This comment has been minimized.

Copy link
Collaborator

commented Apr 7, 2015

Is this still a problem for you?

@johnbellone

This comment has been minimized.

Copy link

commented Apr 14, 2015

Ah I think I am hitting this also.

@demonccc

This comment has been minimized.

Copy link
Author

commented Apr 23, 2015

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

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2015

@cmluciano @jjasghar any plans for this ?

@jjasghar

This comment has been minimized.

Copy link
Collaborator

commented Dec 11, 2015

@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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Collaborator

commented Dec 11, 2015

@scalp42 awesome to hear. thanks! 🤘

@scalp42

This comment has been minimized.

Copy link
Contributor

commented Dec 14, 2015

@demonccc @jjasghar this was fixed in a1bb98b

Can be closed 😄

@jjasghar jjasghar closed this Dec 14, 2015

@demonccc

This comment has been minimized.

Copy link
Author

commented Dec 21, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.