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

Fix Bug #804 'rabbitmqadmin will not be upgraded' #897

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

s-johansson
Copy link
Contributor

Pull Request (PR) description

Add removal of rabbitmqadmin script and trigger refresh upon package upgrade or downgrade

This Pull Request (PR) fixes the following issues

Fixes #804

@wyardley
Copy link
Contributor

Hi - thanks for the contribution

Can you look at the formatting errors? There may be some expectations that also need to be updated.

Also, can you make the subject / commit message not include the bug number, and instead explain the fix, maybe something along the lines of
"Reinstall rabbitmqadmin on upgrade"?

@kenyon kenyon changed the title Fix Bug #804 'rabbitmqamin will not be upgraded' Fix Bug #804 'rabbitmqadmin will not be upgraded' Nov 23, 2021
@s-johansson s-johansson force-pushed the rabbitmqadmin_upgrade branch 3 times, most recently from 9a1695f to 2cff357 Compare January 3, 2022 11:54
@s-johansson
Copy link
Contributor Author

@wyardley I was finally able to figure out the needed adjustments. I think, that's it. Happy new year 🍀 !


Exec { 'remove_old_rabbitmqadmin_on_upgrade':
path => ['/bin','/usr/bin','/sbin','/usr/sbin'],
command => "rm ${rabbitmq::rabbitmq_home}/rabbitmqadmin",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we do this with a file resource with ensure => absent vs. using a shell exec (but still using the same onlyif)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am aware, that exec resources should be avoided, if there is any possibilty to fullfil the task as well with other basically idempotent resources. In order to provide idempotence for this exec resource, onlyif and refreshonly parameter are set.

Managing a file resource presence dependent on the refresh signal seems not to be possible imho.

@wyardley wyardley merged commit 16824ac into voxpupuli:master Jan 6, 2022
@s-johansson s-johansson deleted the rabbitmqadmin_upgrade branch January 14, 2022 22:03
@s-johansson s-johansson restored the rabbitmqadmin_upgrade branch January 14, 2022 22:03
@s-johansson s-johansson deleted the rabbitmqadmin_upgrade branch January 14, 2022 22:03
@root-expert root-expert added the bug Something isn't working label Mar 28, 2022
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

Successfully merging this pull request may close these issues.

rabbitmqadmin will not be upgraded
3 participants