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:
Roman, i'm not sure we will be having any additional z-stream release for 3.1, (3.2 will have fix for this) the workaround is pretty simple, remove 'disconnect' command from the script, 'exit' disconnects implicitly.
It is not working as it should according bug opener. WA is working. Please provide info how it expected to work (do we keep WA as permanent solution) ------------------------------------------------------------ [root@ilia-rhevm ~]# rpm -q rhevm-cli rhevm-cli-3.3.0.3-1.el6ev.noarch [root@ilia-rhevm ~]# cat foo connect -l https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal --password 'xxxxxx' --insecure disconnect exit [root@ilia-rhevm ~]# 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 --password 'xxxxxx' --insecure ========================================== >>> connected to RHEVM manager 3.3.0.0 <<< ========================================== [RHEVM shell (connected)]# disconnect ======================================= >>> disconnected from RHEVM manager <<< ======================================= [RHEVM shell (disconnected)]# exit error: command "exit " not valid or not available while not connected. [RHEVM shell (disconnected)]# -------------------------------------------------------- [root@ilia-rhevm ~]# cat foo connect -l https://ilia-rhevm.qa.lab.tlv.redhat.com:443/api/ -u admin@internal --password '123456' --insecure exit [root@ilia-rhevm ~]# 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 --password '123456' --insecure ========================================== >>> connected to RHEVM manager 3.3.0.0 <<< ========================================== [RHEVM shell (connected)]# exit [root@ilia-rhevm ~]#
what version you're checking at? this is fixed in the 3.3.0.4-1
build: is4 [root@ilia-rhevm ~]# rpm -q rhevm-cli rhevm-cli-3.3.0.3-1.el6ev.noarch
same cli version in is5 (and the same behaviour): http://bob.eng.lab.tlv.redhat.com/builds/is5/rhevm-cli-3.3.0.3-1.el6ev.noarch.rpm changing status To Assigned until fix will be provided
Build IS6. [imeerovi@imeerovi ART]$ rhevm-shell -f /tmp/foo URL: Username: error: missing configuration variable: url. [RHEVM shell (disconnected)]# connect -l https://vm-161-147.scl.lab.tlv.redhat.com:443/api/ -u admin@internal --password '123456' --insecure ========================================== >>> connected to RHEVM manager 3.3.0.0 <<< ========================================== [RHEVM shell (connected)]# disconnect ======================================= >>> disconnected from RHEVM manager <<< ======================================= [RHEVM shell (disconnected)]# exit [imeerovi@imeerovi ART]$ cat /tmp/foo connect -l https://vm-161-147.scl.lab.tlv.redhat.com:443/api/ -u admin@internal --password '123456' --insecure disconnect exit [imeerovi@imeerovi ART]$
*** Bug 997891 has been marked as a duplicate of this bug. ***
Closing - RHEV 3.3 Released