EXCEPTION of type 'AttributeError' when using 'help' from openstack-cli

Bug #1751822 reported by Scott Moser
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
High
Unassigned
Pike
Fix Released
High
Unassigned
Queens
Fix Released
High
Unassigned
cliff
Fix Released
Undecided
Corey Bryant
python-cliff (Ubuntu)
Fix Released
High
Unassigned
Artful
Fix Released
High
Unassigned
Bionic
Fix Released
High
Unassigned

Bug Description

$ dpkg -S $(readlink -f `which openstack`)
python3-openstackclient: /usr/bin/python3-openstack
$ openstack
(openstack) help network
EXCEPTION of type 'AttributeError' occurred with message: ''InteractiveApp' object has no attribute 'parsed''
To enable full traceback, run the following command: 'set debug true'
(openstack) set debug true
debug - was: False
now: True
(openstack) help network
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cmd2.py", line 776, in onecmd_plus_hooks
    stop = self.onecmd(statement)
  File "/usr/lib/python3/dist-packages/cmd2.py", line 964, in onecmd
    stop = func(statement)
  File "/usr/lib/python3/dist-packages/cliff/interactive.py", line 114, in do_help
    self.default(self.parsed('help ' + arg))
AttributeError: 'InteractiveApp' object has no attribute 'parsed'
EXCEPTION of type 'AttributeError' occurred with message: ''InteractiveApp' object has no attribute 'parsed''
To enable full traceback, run the following command: 'set debug true'

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: python3-openstackclient 3.14.0-0ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-10.11-generic 4.15.3
Uname: Linux 4.15.0-10-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Feb 26 10:49:15 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (949 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python-openstackclient
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Corey Bryant (corey.bryant) wrote :

$ openstack
(openstack) set debug true
debug - was: False
now: True
(openstack) help network
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cmd2.py", line 776, in onecmd_plus_hooks
    stop = self.onecmd(statement)
  File "/usr/lib/python2.7/dist-packages/cmd2.py", line 964, in onecmd
    stop = func(statement)
  File "/usr/lib/python2.7/dist-packages/cliff/interactive.py", line 114, in do_help
    self.default(self.parsed('help ' + arg))
AttributeError: InteractiveApp instance has no attribute 'parsed'
EXCEPTION of type 'AttributeError' occurred with message: 'InteractiveApp instance has no attribute 'parsed''

It looks like upstream cmd2 moved the parsed method from class Cmd() to class ParserManager() in 0.7.3.

git clone https://github.com/python-cmd2/cmd2.git
git checkout 0.7.2
git checkout 0.7.3

Changed in python-openstackclient (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Based on upper-constraints and this being introduced in 0.7.3 of cmd2, this appears to be an issue in Pike and Queens:

Upper-constraints for stable/ocata: cmd2===0.6.9
Upper-constraints for stable/pike: cmd2===0.7.5
Upper-constraints for stable/queens: cmd2===0.7.9

Changed in python-openstackclient (Ubuntu Artful):
status: New → Triaged
importance: Undecided → High
Changed in cloud-archive:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cliff (master)

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

Changed in python-cliff:
assignee: nobody → Corey Bryant (corey.bryant)
status: New → In Progress
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Ubuntu SRU details for Pike:

[Impact]
See bug description.

[Test Case]
See bug description.

[Regression Potential]
Regression potential is minimal. This is a small one-line change that has been cherry-picked from upstream gerrit.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've uploaded a patched version of python-cliff to Bionic (Queens) and Artful (Pike). Artful is awaiting review from the SRU team.

Revision history for this message
Corey Bryant (corey.bryant) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted python-cliff into queens-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:queens-proposed
  sudo apt-get update

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-queens-needed to verification-queens-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-queens-failed. In either case, details of your testing will help us make a better decision.

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

tags: added: verification-queens-needed
Changed in python-openstackclient (Ubuntu Bionic):
status: Triaged → Fix Committed
Revision history for this message
James Page (james-page) wrote : Update Released

The verification of the Stable Release Update for python-cliff has completed successfully and the package has now been released to -updates. 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
James Page (james-page) wrote :

This bug was fixed in the package python-cliff - 2.11.0-0ubuntu2~cloud0
---------------

 python-cliff (2.11.0-0ubuntu2~cloud0) xenial-queens; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 python-cliff (2.11.0-0ubuntu2) bionic; urgency=medium
 .
   * d/p/align-parsed-call-with-cmd2-versions-0.7.3.patch: Cherry-picked
     from https://review.openstack.org/#/c/548626/ to fix AttributeError
     exception with use of cmd2 parsed() method (LP: #1751822).

Revision history for this message
Brian Murray (brian-murray) wrote :

python-cliff (2.11.0-0ubuntu2) bionic; urgency=medium

  * d/p/align-parsed-call-with-cmd2-versions-0.7.3.patch: Cherry-picked
    from https://review.openstack.org/#/c/548626/ to fix AttributeError
    exception with use of cmd2 parsed() method (LP: #1751822).

Changed in python-cliff (Ubuntu Bionic):
status: New → Fix Released
Changed in python-cliff (Ubuntu Artful):
status: New → Fix Committed
tags: added: verification-needed verification-needed-artful
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted python-cliff into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-cliff/2.8.0-0ubuntu1.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-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. 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!

Revision history for this message
Scott Moser (smoser) wrote :
tags: added: verification-done-artful
removed: verification-needed-artful
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Scott, or anyone else affected,

Accepted python-cliff into pike-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:pike-proposed
  sudo apt-get update

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-pike-needed to verification-pike-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-pike-failed. In either case, details of your testing will help us make a better decision.

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

tags: added: verification-pike-needed
no longer affects: python-openstackclient
no longer affects: python-openstackclient (Ubuntu)
no longer affects: python-openstackclient (Ubuntu Artful)
no longer affects: python-openstackclient (Ubuntu Bionic)
Changed in python-cliff (Ubuntu Artful):
importance: Undecided → High
Changed in python-cliff (Ubuntu Bionic):
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cliff (master)

Reviewed: https://review.openstack.org/548625
Committed: https://git.openstack.org/cgit/openstack/cliff/commit/?id=8416650128b9a1ae8c7fd1bfe2a8d1a49a9b6a0b
Submitter: Zuul
Branch: master

commit 8416650128b9a1ae8c7fd1bfe2a8d1a49a9b6a0b
Author: Corey Bryant <email address hidden>
Date: Wed Feb 28 10:49:24 2018 -0500

    Align parsed() call with cmd2 versions >= 0.7.3

    In version 0.7.3, cmd2 moved the parsed method from class Cmd()
    to class ParserManager().

    Change-Id: Ie0c057ffaeaa05c4f5e0f3599aab850245c55066
    Closes-Bug: #1751822

Changed in python-cliff:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-cliff - 2.8.0-0ubuntu1.1

---------------
python-cliff (2.8.0-0ubuntu1.1) artful; urgency=medium

  * d/gbp.conf: Create stable/pike branch.
  * d/p/align-parsed-call-with-cmd2-versions-0.7.3.patch: Cherry-picked
    from https://review.openstack.org/#/c/548627/ to fix AttributeError
    exception with use of cmd2 parsed() method (LP: #1751822).

 -- Corey Bryant <email address hidden> Tue, 17 Oct 2017 15:28:27 -0400

Changed in python-cliff (Ubuntu Artful):
status: Fix Committed → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've verified this is fixed in xenial-proposed. https://paste.ubuntu.com/p/hsZdjQT63W/

tags: added: verification-pike-done
removed: verification-pike-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote : Update Released

The verification of the Stable Release Update for python-cliff has completed successfully and the package has now been released to -updates. 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
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package python-cliff - 2.8.0-0ubuntu1.1~cloud0
---------------

 python-cliff (2.8.0-0ubuntu1.1~cloud0) xenial-pike; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 python-cliff (2.8.0-0ubuntu1.1) artful; urgency=medium
 .
   * d/gbp.conf: Create stable/pike branch.
   * d/p/align-parsed-call-with-cmd2-versions-0.7.3.patch: Cherry-picked
     from https://review.openstack.org/#/c/548627/ to fix AttributeError
     exception with use of cmd2 parsed() method (LP: #1751822).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cliff 2.12.0

This issue was fixed in the openstack/cliff 2.12.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cliff 2.11.1

This issue was fixed in the openstack/cliff 2.11.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cliff 2.8.2

This issue was fixed in the openstack/cliff 2.8.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cliff 2.17.0

This issue was fixed in the openstack/cliff 2.17.0 release.

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.