Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 971285 - Rhevm-shell fails on "exit" command when "disconnect" command is used just before it in batch mode
Rhevm-shell fails on "exit" command when "disconnect" command is used just be...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli (Show other bugs)
All Linux
unspecified Severity low
: ---
: 3.2.1
Assigned To: Michael Pasternak
Ilia Meerovich
: ZStream
Depends On: 971277
Blocks: 997891
  Show dependency treegraph
Reported: 2013-06-06 04:05 EDT by Michael Pasternak
Modified: 2016-02-10 14:03 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 971277
: 997891 (view as bug list)
Last Closed: 2013-07-16 11:30:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 15475 None None None Never
oVirt gerrit 15481 None None None Never
Red Hat Product Errata RHBA-2013:1079 normal SHIPPED_LIVE rhevm-cli bug fix and enhancement update 2013-07-16 15:29:19 EDT

  None (edit)
Description Michael Pasternak 2013-06-06 04:05:07 EDT
+++ 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:

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):

How reproducible:

Steps to Reproduce:
1. Create a script containing the following sequence of commands:
    connect -l <RHEVM_API_URL> -u admin@internal --password 'XXXXXX' --insecure

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:
Comment 1 Roman Hodain 2013-06-07 02:34:57 EDT

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.
Comment 4 Ilia Meerovich 2013-06-25 08:33:36 EDT
[imeerovi@imeerovi ~]$ rpm -qa | grep rhevm-cli
[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 <<<

[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
[imeerovi@imeerovi ~]$
Comment 6 errata-xmlrpc 2013-07-16 11:30:35 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.