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

RabbitMQ HTTP API - Unable to provide default VHost value #768

Closed
quoimec opened this issue Apr 21, 2020 · 5 comments · Fixed by #782
Closed

RabbitMQ HTTP API - Unable to provide default VHost value #768

quoimec opened this issue Apr 21, 2020 · 5 comments · Fixed by #782
Labels
bug Something isn't working scaler-rabbit-mq
Milestone

Comments

@quoimec
Copy link

quoimec commented Apr 21, 2020

When setting up RabbitMQ, the default name that is created for a VHost is / (very weird I know). Normally, to use the HTTP API with this VHost, you can provide an encoded slash like %2f which allows you to access the VHost specific parts of the API. The changes introduced in Issue 700 that allowed access to the HTTP API over AMPQ, work when a named VHost is provided but when using either a /, %2f or nothing to represent the default VHost, the scaled object will not work and will be stuck at 0.

I don't know a lick of Go but I've dug through the code and I think some part of the URL parser that is being employed is stripping out the / value as the name of the VHost.

Expected Behavior

To be able to pass the default VHost name and have the deployment scale up and down.

Actual Behavior

The deployment immediately scales down to 0 and is unable to poll the API correctly.

Steps to Reproduce the Problem

  1. Provide an apiHost value of http://un:pw@host:port/, http://un:pw@host:port/%2f or http://un:pw@host:port//
@quoimec quoimec added the bug Something isn't working label Apr 21, 2020
@tomkerkhove
Copy link
Member

This shoulds like a regression bug, right?

We'll have a look at this, sorry about that!

@zroubalik
Copy link
Member

Yeah this is a bug we should fix.

@quoimec would ve great if you can open PR with proposed change, since you have done the investigation.
We will probably release 1.4.1 with some fixes so we could include this as well.

@tomkerkhove tomkerkhove added this to the v1.4.1 milestone Apr 23, 2020
@zroubalik
Copy link
Member

@holyketzer do you think you could take a look on this?

@holyketzer
Copy link
Contributor

ok

@holyketzer
Copy link
Contributor

Hey guys, yes it didn't support empty vhost.
I opened a PR with a fix. I tested it in our environment. Now it support all kinds of empty vhosts like:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scaler-rabbit-mq
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants