[Bug 1840023] [NEW] PEP479 in ceph cli help command
netproducts
1840023 at bugs.launchpad.net
Tue Aug 13 11:13:03 UTC 2019
Public bug reported:
Affected ubuntu version: Current stable version (19.04).
Installed kernel: 5.0.0-13
Python2 version: 2.7.16
Python3 version: 3.7.3
Ceph version: 13.2.6 (7b695f835b03642f85998b2ae7b6dd093d9fbce4) mimic (stable)
To reproduce:
Install ceph (via ceph-deploy or otherwise) from the ubuntu repository.
Run: `ceph --help`
Below the section 'Monitor commands' the expected output is a list of
commands that can be used to manipulate ceph monitors. Instead, the
output is:
Traceback (most recent call last):
File "/usr/bin/ceph", line 443, in wrap
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/bin/ceph", line 1241, in <module>
retval = main()
File "/usr/bin/ceph", line 1024, in main
return do_extended_help(parser, childargs, ('mon', ''), ' '.join(childargs))
File "/usr/bin/ceph", line 390, in do_extended_help
return help_for_target(target, partial)
File "/usr/bin/ceph", line 387, in help_for_target
return help_for_sigs(outbuf.decode('utf-8'), partial)
File "/usr/bin/ceph", line 373, in help_for_sigs
partial=partial))
File "/usr/bin/ceph", line 468, in format_help
siglines = [l for l in wrap(concise, sig_width, 1)]
File "/usr/bin/ceph", line 468, in <listcomp>
siglines = [l for l in wrap(concise, sig_width, 1)]
RuntimeError: generator raised StopIteration
With an earlier python version and ceph version, this section of the
output looked like this:
Monitor commands:
=================
[Contacting monitor, timeout after 5 seconds]
auth add <entity> {<caps> [<caps>...]} add auth info for <entity> from input
file, or random key if no input is
given, and/or any caps specified in
the command
auth caps <entity> <caps> [<caps>...] update caps for <name> from caps
specified in the command
auth del <entity> delete all caps for <name>
auth export {<entity>} write keyring for requested entity, or
master keyring if none given
auth get <entity> write keyring file with requested key
auth get-key <entity> display requested key
auth get-or-create <entity> {<caps> add auth info for <entity> from input
[<caps>...]} file, or random key if no input given,
and/or any caps specified in the
command
auth get-or-create-key <entity> {<caps> get, or add, key for <name> from
[<caps>...]} system/caps pairs specified in the
command. If key already exists, any
given caps must match the existing
caps for that key.
auth import auth import: read keyring file from -i
<file>
(further output truncated).
Further investigation reveals:
The likely cause is a python 3.7 change denoted PEP479 where
StopIteration exceptions are now errors. Also see
https://docs.python.org/3/whatsnew/3.7.html.
** Affects: ceph (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to ceph in Ubuntu.
https://bugs.launchpad.net/bugs/1840023
Title:
PEP479 in ceph cli help command
Status in ceph package in Ubuntu:
New
Bug description:
Affected ubuntu version: Current stable version (19.04).
Installed kernel: 5.0.0-13
Python2 version: 2.7.16
Python3 version: 3.7.3
Ceph version: 13.2.6 (7b695f835b03642f85998b2ae7b6dd093d9fbce4) mimic (stable)
To reproduce:
Install ceph (via ceph-deploy or otherwise) from the ubuntu
repository.
Run: `ceph --help`
Below the section 'Monitor commands' the expected output is a list of
commands that can be used to manipulate ceph monitors. Instead, the
output is:
Traceback (most recent call last):
File "/usr/bin/ceph", line 443, in wrap
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/bin/ceph", line 1241, in <module>
retval = main()
File "/usr/bin/ceph", line 1024, in main
return do_extended_help(parser, childargs, ('mon', ''), ' '.join(childargs))
File "/usr/bin/ceph", line 390, in do_extended_help
return help_for_target(target, partial)
File "/usr/bin/ceph", line 387, in help_for_target
return help_for_sigs(outbuf.decode('utf-8'), partial)
File "/usr/bin/ceph", line 373, in help_for_sigs
partial=partial))
File "/usr/bin/ceph", line 468, in format_help
siglines = [l for l in wrap(concise, sig_width, 1)]
File "/usr/bin/ceph", line 468, in <listcomp>
siglines = [l for l in wrap(concise, sig_width, 1)]
RuntimeError: generator raised StopIteration
With an earlier python version and ceph version, this section of the
output looked like this:
Monitor commands:
=================
[Contacting monitor, timeout after 5 seconds]
auth add <entity> {<caps> [<caps>...]} add auth info for <entity> from input
file, or random key if no input is
given, and/or any caps specified in
the command
auth caps <entity> <caps> [<caps>...] update caps for <name> from caps
specified in the command
auth del <entity> delete all caps for <name>
auth export {<entity>} write keyring for requested entity, or
master keyring if none given
auth get <entity> write keyring file with requested key
auth get-key <entity> display requested key
auth get-or-create <entity> {<caps> add auth info for <entity> from input
[<caps>...]} file, or random key if no input given,
and/or any caps specified in the
command
auth get-or-create-key <entity> {<caps> get, or add, key for <name> from
[<caps>...]} system/caps pairs specified in the
command. If key already exists, any
given caps must match the existing
caps for that key.
auth import auth import: read keyring file from -i
<file>
(further output truncated).
Further investigation reveals:
The likely cause is a python 3.7 change denoted PEP479 where
StopIteration exceptions are now errors. Also see
https://docs.python.org/3/whatsnew/3.7.html.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1840023/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list