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

Warn early and clearly user when using incompatible RabbitMQ version #5300

Closed
3 of 4 tasks
giovannipizzi opened this issue Jan 12, 2022 · 4 comments · Fixed by #5315
Closed
3 of 4 tasks

Warn early and clearly user when using incompatible RabbitMQ version #5300

giovannipizzi opened this issue Jan 12, 2022 · 4 comments · Fixed by #5315
Assignees
Labels
type/feature request status undecided
Milestone

Comments

@giovannipizzi
Copy link
Member

giovannipizzi commented Jan 12, 2022

Splitting off from #5278 one smaller task.
Before 2.0 we should add, if possible, a clear warning if the version of RabbitMQ is incompatible. In this way, people know and fix this before starting to run in production with AiiDA, and discovering weeks later that there is an issue (and that is very hard to debug, because the error shows up as seemingly random "Channel is closed" errors.

Some sub-tasks:

  • check programmatically the version of RabbitMQ (to see how to do it)
  • add checks in all relevant places (definitely in verdi status and in verdi daemon start, possibly also in verdi shell if not too slow?)
  • The warning should point to a wiki page with more information (EDIT: here is the page). For now we put a general explanation of the problem and relevant links to issues, as well as some instructions on how to fix the issue. However, this page might improve in the future (e.g. if we also want to suggest to keep using the newer version, we need to explain:
    • how to change the RMQ configuration to a longer time
    • how to reset the permanent queues that might have been already created if the user already started using the profile (as these might have incompatible settings and RMQ would crash)
  • update the installation documentation. This should include both the system-wide installation and all other paths (conda, etc.). If appropriate, we can just highlight with some emphasis that version should be <=3.7, and link to the wiki page

Last point was split off to separate issue #5317

@giovannipizzi giovannipizzi added the type/feature request status undecided label Jan 12, 2022
@giovannipizzi giovannipizzi added this to the v2.0.0 milestone Jan 12, 2022
@giovannipizzi
Copy link
Member Author

I don't know if there is an easy way to get the version via the communicator, e.g. via KiwiPy or the underlying libraries. @muhrin do you have any idea if this is possible? (or @sphuber @chrisjsewell )

@muhrin
Copy link
Contributor

muhrin commented Jan 12, 2022

Let me have a look. I did try this some time ago but I think it wasn't trivial, let me see if the underlying library we use has made it any easier now...

@muhrin
Copy link
Contributor

muhrin commented Jan 12, 2022

Ok, I've created a PR in kiwipy that would allow the following:

if comm.server_properties['version'] == b'3.8.2':
    ...

Or other logic based on the version string.

@giovannipizzi
Copy link
Member Author

I have created a first attempt of the wiki page: https://github.com/aiidateam/aiida-core/wiki/RabbitMQ-version-to-use

At the moment, in Ubuntu 20.04, it seems to me that the simplest approach is to tell users to run RabbitMQ in a docker container, because even using the APT sources provided by RabbitMQ, they anyway provide only versions 3.8.x and 3.9.x.

  • @sphuber could you please add some comments on how to run with a recent version (or @chrisjsewell or anyone who tested this); I left some notes of things one might need to say
  • @chrisjsewell is there a way to select the version of rabbitmq with conda? If so, can you add a paragraph to the wiki? So we can then later also link to it (or update) the installation docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature request status undecided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants