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

Hermes: username not assigned when use_ssl: True causes an error #6358

Closed
d-ylee opened this issue Oct 26, 2023 · 1 comment · Fixed by #6723
Closed

Hermes: username not assigned when use_ssl: True causes an error #6358

d-ylee opened this issue Oct 26, 2023 · 1 comment · Fixed by #6723
Assignees
Milestone

Comments

@d-ylee
Copy link
Contributor

d-ylee commented Oct 26, 2023

Description

When configuring Hermes Daemon to use_ssl: True, Hermes has an error saying, local variable 'username' referenced before assignment

Steps to reproduce

  1. Set messaging-hermes.use_ssl to True
  2. Start the Daemon

Rucio Version

Daemons: 32.4.0

Additional Information

  • Operating System: OKD Cluster/Kubernetes
  • Bug is server side (in hermes daemon)
  • ActiveMQ/RabbitMQ is the broker with STOMP plugin

After looking through the hermes daemon code, it looks like in the function setup_activemq, the username variable is only assigned when use_ssl is False:

return conns, destination, username, password, use_ssl

The only instance of username being assigned is here:

if not use_ssl:
username = config_get("messaging-hermes", "username")
password = config_get("messaging-hermes", "password")
port = config_get_int("messaging-hermes", "nonssl_port")

This doesn't happen when use_ssl is True

@d-ylee d-ylee added the bug label Oct 26, 2023
@d-ylee d-ylee changed the title Hermes: username not assigned when use_ssl: True Hermes: username not assigned when use_ssl: True causes an error Oct 26, 2023
@d-ylee
Copy link
Contributor Author

d-ylee commented Oct 27, 2023

One additional item: I think the same thing might happen with the password variable, since it is only assigned in the if not use_ssl statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants