Package: python3-configshell-fb
Version: 1.1.20-1

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

I suggest updating the package to contain the most recent tagged version from 
the GitHub repository (currently 1.1fb24).

Reply via email to