Public bug reported:
Reproduced with python3-configshell-fb 1.1.20-1 on fully-updated Ubuntu
Server 18.04 by attempting to run targetcli via PHP using Symfony
Process:
Test script (in a directory with Symfony 3.4.1 pulled in via Composer)
------------------------------------------------------------
<?php
include 'vendor/autoload.php';
$process = new \Symfony\Component\Process\Process('targetcli');
$process->setInput('ls');
$process->mustRun();
var_dump($process->getOutput());
------------------------------------------------------------
Actual output
------------------------------------------------------------
PHP Fatal error: Uncaught
Symfony\Component\Process\Exception\ProcessFailedException: The command
"targetcli" failed.
Exit Code: 1(General error)
Working directory: /home/matt/reproduce
Output:
================
targetcli shell version 2.1.fb43
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
Error Output:
================
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 893, in
run_interactive
old_completer = readline.get_completer()
NameError: name 'readline' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/targetcli", line 121, in <module>
main()
File "/usr/bin/targetcli", line 111, in main
shell.run_interactive()
File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 899, in
run_interactive
readline.set_completer(old_completer)
NameError: name 'readline' is not defined
in /home/matt/reproduce/vendor/symfony/ in
/home/matt/reproduce/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php
on line 239
------------------------------------------------------------
Expected output
------------------------------------------------------------
string(1324) "targetcli shell version 2.1.fb43
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> o- /
.........................................................................................................................
[...]
o- backstores
..............................................................................................................
[...]
| o- block
..................................................................................................
[Storage Objects: 0]
| o- fileio
.................................................................................................
[Storage Objects: 0]
| o- pscsi
..................................................................................................
[Storage Objects: 0]
| o- ramdisk
................................................................................................
[Storage Objects: 0]
o- iscsi
............................................................................................................
[Targets: 0]
o- loopback
.........................................................................................................
[Targets: 0]
o- vhost
............................................................................................................
[Targets: 0]
/> exit
"
------------------------------------------------------------
I assume the package version 1.1.20 correpsonds to the project's 1.1fb20
tag on GitHub.
This bug was fixed in this commit and released in 1.1fb23:
https://github.com/open-iscsi/configshell-
fb/commit/82f79eb2f967ecd820d531488d0b64d6015b1aaf
The latest tagged version is 1.1fb24.
** Affects: python-configshell-fb (Ubuntu)
Importance: Undecided
Status: New
** Affects: targetcli-fb (Ubuntu)
Importance: Undecided
Status: New
** Also affects: targetcli-fb (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1776761
Title:
targetcli aborts with the error message "NameError: name 'readline' is
not defined" when running in interactive shell mode
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-configshell-fb/+bug/1776761/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs