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

Do not stop RabbitMQ before creating the Erlang Cookie #306

Closed
wants to merge 1 commit into from

Conversation

EmilienM
Copy link
Contributor

@EmilienM EmilienM commented Feb 6, 2015

When boostraping a cluster, Puppet will:

  • create the cookie and manage permissions
  • if there is a change on this resource (create or update), thanks to
    the notify in rabbitmq::config, RabbitMQ service will be restarted by
    Puppet.

Given that, we should not manage the service in the provider itself,
since it's already done in the manifest.

This patch aims to delete the 'puppet resource' command in the
rabbitmq_erlang_cookie provider that ensured RabbitMQ service was
stopped before the cookie file management.

This patch has been tested on a new environment and an existing one, to be sure RabbitMQ is updated with the right cookie, on both use-cases.

When boostraping a cluster, Puppet will:
* create the cookie and manage permissions
* if there is a change on this resource (create or update), thanks to
  the notify in rabbitmq::config, RabbitMQ service will be restarted by
  Puppet.

Given that, we should not manage the service in the provider itself,
since it's already done in the manifest.

This patch aims to delete the 'puppet resource' command in the
rabbitmq_erlang_cookie provider that ensured RabbitMQ service was
stopped before the cookie file management.
EmilienM pushed a commit to redhat-openstack/openstack-puppet-modules that referenced this pull request Feb 6, 2015
This patch is temp and will be updated
voxpupuli/puppet-rabbitmq#306 merged.
@sbadia
Copy link
Member

sbadia commented Feb 9, 2015

This patch is related to PDB-1223

@cmurphy
Copy link
Contributor

cmurphy commented Feb 19, 2015

If you run the acceptance tests, you can see this causes serious problems with the rabbitmq-server. If the cookie changes while the server is still running, it becomes unable to connect to itself and therefore unable to restart itself.

An alternative to using the puppet resource command would be stopping the service via the init system. This means dealing with all supported init systems and all possible service names, so using the puppet resource command is much simpler.

@puppet-community-ci
Copy link

The result of the test was: FAIL
Details at http://planck.nibalizer.com:8080/buildlogs//puppetlabs+puppetlabs-rabbitmq+306+1424889518+FAIL

I am a beta ci bot. I am probably lying to you.
You can contact nibalizer for more details

@jonnytdevops
Copy link
Contributor

Closing due to inactivity and the concerns raised by @cmurphy.

Feel free to open a new PR

Thanks!

@EmilienM EmilienM deleted the drop_svc_stop_cookie branch April 1, 2015 15:00
@EmilienM EmilienM restored the drop_svc_stop_cookie branch April 1, 2015 15:36
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.

None yet

5 participants