+++ This bug was initially created as a clone of Bug #971277 +++ Description of problem: If the rhevm-shell is used in the "batch" mode (--file) and the script contains sequence of the following two commands: disconnect exit Then the shell is not exited with the following error message: error: command "exit " not valid or not available while not connected. The same sequence of commands works if the shell is used in the interactive mode. Version-Release number of selected component (if applicable): rhevm-cli-3.1.1.2-1.el6ev.noarch How reproducible: 100% Steps to Reproduce: 1. Create a script containing the following sequence of commands: connect -l <RHEVM_API_URL> -u admin@internal --password 'XXXXXX' --insecure disconnect exit 2. Run: rhevm-shell -f <SCRIPT_NAME> Actual results: error: command "exit " not valid or not available while not connected. Expected results: The shell is ended. Additional info:
Hello, I have some additional information. This issue is not exactly related to the command sequence of the commands, but rather to the state of the connection. Simply if the cli is not connected, the "exit" command triggers the error message.
[imeerovi@imeerovi ~]$ rpm -qa | grep rhevm-cli rhevm-cli-3.2.1.1-1.el6ev.noarch [imeerovi@imeerovi ~]$ vim foo [imeerovi@imeerovi ~]$ rhevm-shell -f ./foo error: missing configuration variable: url. [RHEVM shell (disconnected)]# connect -l https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I ========================================== >>> connected to RHEVM manager 3.2.0.0 <<< ========================================== [RHEVM shell (connected)]# disconnect ======================================= >>> disconnected from RHEVM manager <<< ======================================= [RHEVM shell (disconnected)]# exit [imeerovi@imeerovi ~]$ cat ./foo connect -l https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal -I disconnect exit [imeerovi@imeerovi ~]$
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1079.html