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

added an example to the "user_management" section. #350

Merged
merged 2 commits into from
Mar 8, 2016

Conversation

farshidce
Copy link
Contributor

The example demonstrator how using the node attributes we can
add a user with attributes needed to have access to one or more
ghosts.

The example demonstrator how using the node attributes we can
add a user with attributes needed to have access to one or more
vhosts.
@farshidce
Copy link
Contributor Author

while bootstrapping rabbitmq cluster using this cookbook i spent lot of time trying to figure out why some of the user properties i added were being ignored ( e.g the tag or vhost). I spent some time reading the code provider and recipe code to find out what properties need to be provided and in what format.

now that i have successfully enabled all users in the rabbitmq server i thought of sending this pull request to update the README file in case someone else wants to jump right into adding users and an example might help them.

@farshidce
Copy link
Contributor Author

the second patch (farshidce@ed7ebcd) is related to
#335

if user specifies a string then we will set the value as string
e.g "10GB" but if user specifies an integer then we will set the
disk free limit to the value that user has set

there is no additional validation done here so if the user passes
a value that is beyond what system resources can accomodate it can
cause issues in production but we dont check the value against
the system resources

tests:

modified the disk_free_limit to both int and string and
confirmed that etc/rabbitmq/rabbitmq.config reflects the value
set.

    {log_levels, [{ connection, info }]},
    {disk_free_limit, 10000000},

or

    {log_levels, [{ connection, info }]},
    {disk_free_limit, "10GB"},

chef 12.7 output

  * template[/etc/rabbitmq/rabbitmq.config] action create
    - update content in file /etc/rabbitmq/rabbitmq.config from 08a317 to 75ef07
    - suppressed sensitive resource
@farshidce
Copy link
Contributor Author

to be backward compatible i could also convert "10GB" string into bytes but wasn't sure if it is needed or if it would be justified to use a gem to do the conversion for something like that.

please let me know me either way.

jjasghar pushed a commit that referenced this pull request Mar 8, 2016
added an example to the "user_management" section.
@jjasghar jjasghar merged commit cca89c8 into rabbitmq:master Mar 8, 2016
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

Successfully merging this pull request may close these issues.

2 participants