[SRU] amqp-tools server parameter unusable

Bug #1790657 reported by Max Mustermann
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
librabbitmq (Ubuntu)
Fix Released
Medium
Bryce Harrington
Xenial
Fix Released
Low
Bryce Harrington
Bionic
Fix Released
Medium
Bryce Harrington
Cosmic
Won't Fix
Medium
Bryce Harrington
Disco
Fix Released
Medium
Bryce Harrington
Eoan
Fix Released
Medium
Bryce Harrington

Bug Description

[Impact]
The --server and -url parameters do not function as documented, due to an upstream coding error that was fixed in release 0.8.1.

[Test Case]
$ sudo apt-get -y install librabbitmq-dev
$ sudo apt-get -y install amqp-tools

### Broken behavior:
$ sudo amqp-consume --server=foobar:5672 -q queue cat
both --server and --url options specify server host

### Fixed behavior:
$ sudo apt-add-repository -y ppa:bryce/librabbitmq-sru-1790657
$ sudo apt-get -y install librabbitmq-dev
$ sudo amqp-consume --server=foobar:5672 -q queue cat
Specifying the port number with --server is deprecated
opening socket to foobar:5672

[Regression Potential]
The patch alters C code to change how command line options are processed. Things to watch for, then, would be mishandling of cli options, or compilation errors during package build. The changes do not alter input handling at all, so static testing should give a high degree of confidence of stability. Also, the alterations are focused on tools, so general operation of librabbitmq should not be affected in any way by the changes.

[Fix]
The upstream patch corrects handling of --server, --url, and other options by reorganizing the logic flow.

[Discussion]
The issue appears not to be a regression from a recent change, but a problem that has existed for quite a while:

 librabbitmq | 0.0.1.hg216-1 | precise/universe | source
 librabbitmq | 0.4.1-1 | trusty | source
 librabbitmq | 0.7.1-1 | xenial/universe | source
 librabbitmq | 0.8.0-1build1 | bionic/universe | source
 librabbitmq | 0.8.0-1build1 | cosmic/universe | source
 librabbitmq | 0.9.0-0.2 | disco | source
 librabbitmq | 0.9.0-0.2 | eoan | source

The fix should be backported to bionic and probably cosmic. Earlier releases are probably also affected but probably only worth doing if the patch applies cleanly to them.

[Original Report]
The version of amqp-tools in 18.04.1 LTS (and 14.04 iirc) has a bug which renders parts of the cli unusable:

https://github.com/alanxz/rabbitmq-c/issues/364

1) 18.04.1 LTS bionic
2) 0.8.0-1build1
3) `amqp-consume --server=foobar:5672 -q queue cat` should work
4) amqp-consume complains that you cannot use --server and --url together

Related branches

tags: added: bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in librabbitmq (Ubuntu):
status: New → Confirmed
Revision history for this message
timeless (timeless) wrote :

According to github, it's fixed in 0.9.0:
https://github.com/alanxz/rabbitmq-c/commit/5dfe5d2f2680a4639090a9c239a2b0018d90c789#diff-0d2986f9db9bba422328c4379976b6d9

Would it be possible to upgrade the package?
Or would someone prefer to backport the fix?

Paride Legovini (paride)
tags: added: server-triage-discuss
Paride Legovini (paride)
Changed in librabbitmq (Ubuntu Eoan):
status: New → Triaged
tags: added: server-next
removed: server-triage-discuss
Revision history for this message
Paride Legovini (paride) wrote :

Thanks for your report. Upstream commit 5dfe5d2f2680a4639090a9c239a2b0 applies cleanly on librabbitmq v0.8.0 (the version shipped in Bionic), so this is a good candidate for a stable release upgrade.

Paride Legovini (paride)
Changed in librabbitmq (Ubuntu Bionic):
status: New → Triaged
Bryce Harrington (bryce)
summary: - amqp-tools server parameter unusable
+ [SRU] amqp-tools server parameter unusable
Bryce Harrington (bryce)
Changed in librabbitmq (Ubuntu Bionic):
assignee: nobody → Bryce Harrington (bryce)
Changed in librabbitmq (Ubuntu Eoan):
assignee: nobody → Bryce Harrington (bryce)
Revision history for this message
Bryce Harrington (bryce) wrote :
Changed in librabbitmq (Ubuntu Bionic):
importance: Undecided → High
importance: High → Medium
Changed in librabbitmq (Ubuntu Eoan):
importance: Undecided → Medium
tags: added: patch
Bryce Harrington (bryce)
description: updated
Changed in librabbitmq (Ubuntu Eoan):
status: Triaged → Fix Released
Bryce Harrington (bryce)
Changed in librabbitmq (Ubuntu Disco):
status: New → Fix Released
importance: Undecided → Medium
Changed in librabbitmq (Ubuntu Xenial):
importance: Undecided → Low
Changed in librabbitmq (Ubuntu Cosmic):
importance: Undecided → Medium
assignee: nobody → Bryce Harrington (bryce)
Changed in librabbitmq (Ubuntu Disco):
assignee: nobody → Bryce Harrington (bryce)
Changed in librabbitmq (Ubuntu Cosmic):
status: New → Triaged
Bryce Harrington (bryce)
description: updated
Changed in librabbitmq (Ubuntu Cosmic):
status: Triaged → In Progress
Changed in librabbitmq (Ubuntu Bionic):
status: Triaged → In Progress
Bryce Harrington (bryce)
Changed in librabbitmq (Ubuntu Xenial):
status: New → In Progress
assignee: nobody → Bryce Harrington (bryce)
Bryce Harrington (bryce)
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

MPs look good, one minor cleanup on the new version numbers.
I think you can go on pushing this to -unapproved then.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Max, or anyone else affected,

Accepted librabbitmq into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/librabbitmq/0.8.0-1ubuntu0.18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in librabbitmq (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Changed in librabbitmq (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Max, or anyone else affected,

Accepted librabbitmq into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/librabbitmq/0.7.1-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Bryce Harrington (bryce) wrote :

I'm gathering that the cosmic upload won't be getting accepted due to Cosmic reaching EOL.

Changed in librabbitmq (Ubuntu Cosmic):
status: In Progress → Won't Fix
Revision history for this message
Bryce Harrington (bryce) wrote :

Xenial verification:

$ lxc launch ubuntu:xenial/amd64 librabbitmq-sru-1790657-xenial
Creating librabbitmq-sru-1790657-xenial
Starting librabbitmq-sru-1790657-xenial

$ lxc exec librabbitmq-sru-1790657-xenial -- bash
(...)
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial-proposed main universe" >> /etc/apt/sources.list
# apt-get update && apt-get dist-upgrade
# apt-cache policy librabbitmq-dev | grep Installed
  Installed: 0.7.1-1ubuntu0.1
# sudo amqp-consume --server=foobar:5672 -q queue cat
Specifying the port number with --server is deprecated
opening socket to foobar:5672

Correct behavior after update.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Bryce Harrington (bryce) wrote :

$ lxc launch ubuntu:bionic/amd64 librabbitmq-sru-1790657-bionic
Creating librabbitmq-sru-1790657-bionic
Starting librabbitmq-sru-1790657-bionic
$ lxc exec librabbitmq-sru-1790657-bionic -- bash
(...)
# echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed main universe" >> /etc/apt/sources.list
# apt-get update && apt-get dist-upgrade
# apt-cache policy librabbitmq-dev | grep Installed
  Installed: 0.8.0-1ubuntu0.18.04.1
# sudo amqp-consume --server=foobar:5672 -q queue cat
Specifying the port number with --server is deprecated
opening socket to foobar:5672

Correct behavior on bionic after update.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for librabbitmq has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package librabbitmq - 0.8.0-1ubuntu0.18.04.1

---------------
librabbitmq (0.8.0-1ubuntu0.18.04.1) bionic; urgency=medium

  * d/patches: Add fix-parameter-processing.patch to correct handling of
    --server, --url, and other options by reorganizing the logic flow.
    (LP: #1790657)

 -- Bryce Harrington <email address hidden> Tue, 09 Jul 2019 21:19:59 -0700

Changed in librabbitmq (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package librabbitmq - 0.7.1-1ubuntu0.1

---------------
librabbitmq (0.7.1-1ubuntu0.1) xenial; urgency=medium

  * d/patches: Add fix-parameter-processing.patch to correct handling of
    --server, --url, and other options by reorganizing the logic flow.
    (LP: #1790657)

 -- Bryce Harrington <email address hidden> Mon, 08 Jul 2019 20:19:04 -0700

Changed in librabbitmq (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.