openstack commands fail with GTK3 error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cmd2 (Ubuntu) |
Confirmed
|
Undecided
|
Tom Moyer | ||
Focal |
New
|
Undecided
|
Tom Moyer |
Bug Description
[ Impact ]
* There is a bug in cmd2 v0.8.5 where an exception is thrown when GTK3
libraries are not installed. This causes Python applications using
cmd2 to crash unexpectedly
* This patch backports a fix from upstream that handles that expection
gracefully, allowing applications to function properly.
* The workaround to this was to install GTK3, which is not ideal as the
Python applications are command line tools, not graphical
[ Test Plan ]
* Deploy focal
* Install an application that has cmd2 as a dependency
e.g. python3-
* Run command that uses cmd2: `openstack server list`
[ Where problems could occur ]
* This changes the error handling for a library that is used by many
Python applications. Some of these applications could rely on the
existing behavior (a ValueError exception being thrown) to detect
certain configurations and change their behavior accordingly.
* This would result in those applications failing under certain use
cases. For example, the configuration in question is a headless
Linux system without GTK libraries installed.
[ Original bug description ]
Openstack release: Wallaby
OS: Ubuntu 20.04 server edition
After installation of python3-
openstack domain create --description "An Example Domain" example
Error:
Traceback (most recent call last):
File "/usr/bin/
from openstackclient
File "/usr/lib/
from osc_lib import shell
File "/usr/lib/
from cliff import app
File "/usr/lib/
import cmd2
File "/usr/lib/
_ = pyperclip.paste()
File "/usr/lib/
copy, paste = determine_
File "/usr/lib/
return init_gi_clipboard()
File "/usr/lib/
gi.
File "/usr/lib/
raise ValueError(
Had to install GTK3 to make openstack commands work but it is taking huge time to get a response to the commands. The wait time after firing any openstack cli command is around 30 seconds.
Anybody faced the issue? What is the fix for it if it exists?
Changed in python-openstackclient (Ubuntu): | |
assignee: | nobody → Tom Moyer (tom-tom) |
affects: | python-openstackclient (Ubuntu) → cmd2 (Ubuntu) |
Changed in cmd2 (Ubuntu Focal): | |
assignee: | nobody → Tom Moyer (tom-tom) |
Anyone looking into this. This error is consistent.