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

Error on using puppet resource rabbitmq_user #147

Closed
matthewbarr opened this issue Nov 27, 2013 · 6 comments
Closed

Error on using puppet resource rabbitmq_user #147

matthewbarr opened this issue Nov 27, 2013 · 6 comments
Labels
bug Something isn't working

Comments

@matthewbarr
Copy link

matthewbarr commented Nov 27, 2013

Per the docs, you should be able to see the current users with puppet resource rabbitmq_user.

That currently gives an error on both puppet 3.1.1 & 3.3.2:

Error: Could not run: Validation of Rabbitmq_user[guest] failed: must set password when creating user
Wrapped exception:
must set password when creating user

Manifest on master:
  class {'::rabbitmq':
}

  rabbitmq_user { 'usernamehere':
    admin    => true,
    password => 'XXXX',
  }
@morrisjones
Copy link

Yes ... this pops up in another unexpected way as well:

When using a Rabbitmq_user['something'] -> as a 'before' relationship, the same error occurs.

If the user is being created, all is well. If it already exists, then the puppet apply fails.

@wyardley wyardley added the bug Something isn't working label Sep 11, 2017
@wyardley
Copy link
Contributor

I'm able to verify this, even with current master.

@wyardley
Copy link
Contributor

https://tickets.puppetlabs.com/browse/MODULES-3084 seems to be the same issue as well.

@wyardley
Copy link
Contributor

I think #598 (rework of #460 by @mpolenchuk) might end up fixing this if I can get it to work.

@wyardley
Copy link
Contributor

The actual issue seems to be unrelated to those two. It's actually much simpler. The code that's trying to ensure that you don't create a user without defining a password is also preventing puppet resource rabbitmq_user from working.

  validate do
    if self[:ensure] == :present && !self[:password]
      raise ArgumentError, 'must set password when creating user' unless self[:password]
    end
  end

@wyardley
Copy link
Contributor

Closing via #598 (I'll cherry-pick the fix for this or break it out into another pull if that doesn't get merged for some reason).

wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 12, 2017
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue Sep 12, 2017
bastelfreak added a commit that referenced this issue Sep 13, 2017
Resolve issue with "puppet resource rabbitmq_user" failing (#147)
slm0n87 pushed a commit to slm0n87/puppet-rabbitmq that referenced this issue Mar 7, 2019
slm0n87 pushed a commit to slm0n87/puppet-rabbitmq that referenced this issue Mar 7, 2019
Resolve issue with "puppet resource rabbitmq_user" failing (voxpupuli#147)
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this issue Mar 26, 2021
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this issue Mar 26, 2021
Resolve issue with "puppet resource rabbitmq_user" failing (voxpupuli#147)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants