/usr/bin/glance's built-in pager breaks redirection

Bug #978610 reported by Craig Sanders on 2012-04-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Low
Eoghan Glynn
Essex
Low
Eoghan Glynn
glance (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned

Bug Description

The built-in pager breaks the ability to use more or less, or even redirect output to a file as it sits there waiting for the user to enter Y or N after fetching the first "page" of image data.

The only way around it is to use something silly like '--limit 99999' or similar.

IMO, the default should be to fetch all matching images, no built-in pagination, and --limit should be used to actually limit the output rather than as a control for the pager.

Related branches

Eoghan Glynn (eglynn) wrote :

Hi Craig,

Have you tried the -f/--force option?

I think this gives you what you want:

    bin/glance index -f

i.e. straight output suitable for redirection, with no pagination applied.

Changed in glance:
status: New → Opinion
importance: Undecided → Low
assignee: nobody → Eoghan Glynn (eglynn)

Fix proposed to branch: master
Review: https://review.openstack.org/6455

Changed in glance:
status: Opinion → In Progress
Eoghan Glynn (eglynn) on 2012-04-11
Changed in glance:
milestone: none → folsom-1

Reviewed: https://review.openstack.org/6455
Committed: http://github.com/openstack/glance/commit/0e105198063d1365a2147d83c85453f21646e333
Submitter: Jenkins
Branch: master

commit 0e105198063d1365a2147d83c85453f21646e333
Author: Eoghan Glynn <email address hidden>
Date: Wed Apr 11 11:40:08 2012 +0100

    Suppress pagination on non-tty glance index.

    Fixes bug 978610.

    Avoid the 'Fetch next page? [Y/n]' prompt interfering with
    redirected output.

    The native glance CLI will soon be superceeded by the new
    python-glanceclient, however this patch could still be useful
    to propogate from master to the stable diablo/essex branches.

    Change-Id: I16bc6156d7c7e9ed27aabcaa51211060ec24a824

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-05-23
Changed in glance:
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/8596
Committed: http://github.com/openstack/glance/commit/5fbdad8c91ed4d669fabaf63881cc2a54e8ddb2b
Submitter: Jenkins
Branch: stable/essex

commit 5fbdad8c91ed4d669fabaf63881cc2a54e8ddb2b
Author: Eoghan Glynn <email address hidden>
Date: Wed Apr 11 11:40:08 2012 +0100

    Suppress pagination on non-tty glance index.

    Fixes bug 978610.

    Avoid the 'Fetch next page? [Y/n]' prompt interfering with
    redirected output.

    The native glance CLI will soon be superceeded by the new
    python-glanceclient, however this patch could still be useful
    to propogate from master to the stable diablo/essex branches.

    Change-Id: I16bc6156d7c7e9ed27aabcaa51211060ec24a824

Dave Walker (davewalker) on 2012-08-24
Changed in glance (Ubuntu):
status: New → Fix Released
Changed in glance (Ubuntu Precise):
status: New → Confirmed

Please find the attached test log from the Ubuntu Server Team's CI infrastructure. As part of the verification process for this bug, Glance has been deployed and configured across multiple nodes using precise-proposed as an installation source. After successful bring-up and configuration of the cluster, a number of exercises and smoke tests have be invoked to ensure the updated package did not introduce any regressions. A number of test iterations were carried out to catch any possible transient errors.

Please Note the list of installed packages at the top and bottom of the report.

For records of upstream test coverage of this update, please see the Jenkins links in the comments of the relevant upstream code-review(s):

Trunk review: https://review.openstack.org/6455
Stable review: https://review.openstack.org/8596

As per the provisional Micro Release Exception granted to this package by the Technical Board, we hope this contributes toward verification of this update.

Adam Gandelman (gandelman-a) wrote :

Test coverage log.

tags: added: verification-done

The verification of this Stable Release Update 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 regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glance - 2012.1.3+stable~20120821-120fcf-0ubuntu1

---------------
glance (2012.1.3+stable~20120821-120fcf-0ubuntu1) precise-proposed; urgency=low

  * New upstream snapshot. (LP: #1041120)
  * Resynchronzie with stable/essex:
    - Glance add uploads a double image if using ssl and images is smaller
      than 4k. (LP: #1007093)
    - If response.environ is None, instance fails to spawn.
      (LP: #1010560)
    - exception.BadStoreURL exposes sensitive information to end users.
      (LP: #1012268)
    - glance-cache.conf needs metadata encryption key (LP: #1012752)
    - image.upload notification doesn't report size (LP: #1018246)
    - Admins should be able to share image regardless of ownership.
      (LP: #1021054)
    - Glance scrubber date formatting fails with postgres (LP: #1022369)
    - Support zero-size image creation. (LP: #1025353)
    - Image id not contained in swift chunk debug message. (LP: #1028433)
    - qpid_heartbeat setting is ineffective. (LP: #1032314)
    - Image properties that reference image ids are not updated to UUIDs.
      (LP: #975651)
    - Migration 012_id_to_uuid attempts to convert IDs twice for non-sqlite
      databases. (LP: #975655)
    - multiprocess glance-api failed to exit when stopped by ctrl+c.
      (LP: #978130)
    - /usr/bin/glance's built-in pager breaks redirection.
      (LP: #978610)
    - Content-Length and Transfer-Encoding are mutually exclusive HTTP headers
      (LP: #981332)
    - glance add command - incorrect help text (LP: #997565)
  * debian/patches/convert_properties_to_uuid.patch: Dropped no longer
    needed.
  * debian/patches/fix-pep8-ubuntu.patch: Dropped no longer needed.
 -- Adam Gandelman <email address hidden> Fri, 24 Jun 2012 03:14:33 -0400

Changed in glance (Ubuntu Precise):
status: Confirmed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in glance:
milestone: folsom-1 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers