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_binding] Fix the quoting of vhost and other names #45109

Merged
merged 3 commits into from
Sep 25, 2018

Conversation

towolf
Copy link
Contributor

@towolf towolf commented Sep 3, 2018

SUMMARY

Quoting of vhost and names was broken in PR #35651

See discussion I added to the merged PR:
#35651 (comment)

The / char should always be urlencoded, Rabbitmq names the default vhost simp,ly /. The second param to urllib_parse.quote sets this and defaults to safe='/', but it isn't here. PR #35651 just removed it.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

rabbitmq_binding.py

ANSIBLE VERSION
ansible 2.8.0.dev0 (fix_urlencode_in_rabbitmq_binding a2e62b1be2) last updated 2018/09/03 13:28:20 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/towolf/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/towolf/src/local/github/ansible/lib/ansible
  executable location = /home/towolf/src/local/github/ansible/bin/ansible
  python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]

@ansibot
Copy link
Contributor

ansibot commented Sep 3, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Sep 3, 2018
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Sep 3, 2018
@Akasurde
Copy link
Member

Akasurde commented Sep 3, 2018

@towolf Thanks for the PR. Could you please take a look at this one - #42422 ?

@towolf
Copy link
Contributor Author

towolf commented Sep 3, 2018

@Akasurde, when @hyperized refactored this module he just dropped the needed arguments. I've restored them all, the other PR only restored some.

Please get the other PR to also properly escape exchange names. They could contain / as well ...

Then we can close this PR as a dupe.

@Akasurde
Copy link
Member

Akasurde commented Sep 4, 2018

@towolf Thanks. I will follow up with this.

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Sep 12, 2018
@Im0
Copy link
Contributor

Im0 commented Sep 20, 2018

@Akasurde @towolf when do we consider the other PR (#42422) to be stale and go with an active PR?

@towolf
Copy link
Contributor Author

towolf commented Sep 20, 2018

@lm0 @Akasurde I can merge both PRs today and then we go with mine and close the other one.

If the other submitter won't react, that is.

@Akasurde
Copy link
Member

@towolf Go ahead and let me know once you are done. Thanks.

Copy link
Contributor

@Im0 Im0 left a comment

Choose a reason for hiding this comment

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

Tested to be working with rabbitmq 3.7.7 and below:

    - rabbitmq_binding:
        name: myExchange
        destination: myQueue
        type: queue
        login_host: 192.168.0.2
        routing_key: 'info'

It didn't work when I left out routing_key but I wasn't sure if that was expected behaviour.

@towolf @Akasurde what do we do here? @boite hopefully you can respond so we can merge one or the other :)

@towolf
Copy link
Contributor Author

towolf commented Sep 24, 2018

@Akasurde merged the two lines that are in PR #42422. I think merging this PR and closing the other should do it.

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Sep 24, 2018
@Akasurde Akasurde merged commit d5f8738 into ansible:devel Sep 25, 2018
@Akasurde
Copy link
Member

@towolf Thanks for the contribution. @Im0 Thanks for the review.

henrysher pushed a commit to henrysher/fedora-infra-ansible that referenced this pull request Oct 5, 2018
Akasurde pushed a commit to Akasurde/ansible that referenced this pull request Oct 6, 2018
…45109)

* [rabbitmq_binding] Fix the quoting of vhost and other names, which was broken in PR ansible#35651
* Merge missing urllib_parse.quote from PR ansible#42422
* Missed one line, where  also needs to be escaped, i.e., the destination

(cherry picked from commit d5f8738)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
abadger pushed a commit that referenced this pull request Oct 9, 2018
* [rabbitmq_binding] Fix the quoting of vhost and other names, which was broken in PR #35651
* Merge missing urllib_parse.quote from PR #42422
* Missed one line, where  also needs to be escaped, i.e., the destination

(cherry picked from commit d5f8738)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@dagwieers dagwieers added the rabbitmq RabbitMQ community label Jan 28, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. rabbitmq RabbitMQ community support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants