Bug 929058 - [RHSC-SHELL] Not able to connect to rhsc-shell after disconnecting it.
Summary: [RHSC-SHELL] Not able to connect to rhsc-shell after disconnecting it.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhsc-cli
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Shireesh
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-29 07:00 UTC by RamaKasturi
Modified: 2013-07-03 06:08 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-17 16:09:19 UTC
Embargoed:


Attachments (Terms of Use)
Attaching engine log file. (9.49 MB, text/x-log)
2013-03-29 07:00 UTC, RamaKasturi
no flags Details
Attaching engine.log file (268.05 KB, text/x-log)
2013-04-10 13:34 UTC, RamaKasturi
no flags Details

Description RamaKasturi 2013-03-29 07:00:20 UTC
Created attachment 717956 [details]
Attaching engine log file.

Description of problem:
Not able to connect to rhsc-shell after disconnecting it.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. login to shell by typing the command "rhsc-shell"
2. connect to shell by typing the command "connect --url https://10.70.35.155/api --user admin@internal --password redhat --insecure"
3.Now disconnect by typing the command "disconnect".
4. again try to connect by typing the command "connect --url https://10.70.35.155/api --user admin@internal --password redhat --insecure"
  
Actual results:
error: [401] - Unauthorized, HTTP Status 401

Expected results:
 It should be able to connect to the shell with out any errors.

Additional info:

Comment 2 Shireesh 2013-04-02 12:39:54 UTC
Michael, is this a known behavior?

Comment 3 Michael Pasternak 2013-04-02 12:56:32 UTC
(In reply to comment #2)
> Michael, is this a known behavior?

i cannot reproduce this, what rhevm-shell tag your sources are based on?

Comment 4 Michael Pasternak 2013-04-02 12:57:30 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Michael, is this a known behavior?
> 
> i cannot reproduce this, what rhevm-shell tag your sources are based on?

(i need both sdk & cli)

Comment 5 Aravinda VK 2013-04-05 07:08:04 UTC
RHSC sdk and cli both are based on rhevm-engine-sdk-3.2.0.4 and rhevm-engine-cli-3.2.0.4 respectively.

Comment 6 Michael Pasternak 2013-04-07 07:35:25 UTC
(In reply to comment #5)
> RHSC sdk and cli both are based on rhevm-engine-sdk-3.2.0.4 and
> rhevm-engine-cli-3.2.0.4 respectively.


1. please run cli in debug mode and attach the output.
2. running connect command will produce authorization HTTP header,
please use it against api and let me know if you able to login

- only ERROR related to the mentioned issue in your log is [1]
but no evidence of "[401] - Unauthorized" that you've mentioned,
despite that this is server error and should appear in the log,
please try #1, #2 mentioned above and attach new log,

thanks.


[1] 2013-03-29 12:20:47,941 INFO  [org.ovirt.engine.api.restapi.security.auth.LoginValidator] (ajp-/127.0.0.1:8702-9) Login failure, user: knarra domain: null reason: Missing domain component in User Principal Name (UPN)

Comment 7 Aravinda VK 2013-04-08 11:21:10 UTC
connect for first time with --debug is working fine, and using that header we were able to connect to the api. 

But when "disconnect" is triggered cli looses the "debug" preference also, so when we run "connect" again it is not showing any debug messages.

Comment 8 Michael Pasternak 2013-04-09 14:47:42 UTC
(In reply to comment #7)
> connect for first time with --debug is working fine, and using that header
> we were able to connect to the api. 
> 
> But when "disconnect" is triggered cli looses the "debug" preference also,

thanks, i'll address this issue as well.

> so when we run "connect" again it is not showing any debug messages.

do you have engine.log with "Unauthorized" error for the admin@internal?

Comment 9 RamaKasturi 2013-04-10 13:34:06 UTC
Created attachment 733697 [details]
Attaching engine.log file

Comment 10 Michael Pasternak 2013-04-10 13:50:04 UTC
(In reply to comment #9)
> Created attachment 733697 [details]
> Attaching engine.log file

i can't see any "Unauthorized" error in the log, do you still face this error?

Comment 13 Michael Pasternak 2013-04-17 16:09:19 UTC
1) i can see this happening indeed, running two following LoginUserCommand 
commands, results the second one to fail, cannot reproduce this on RHEVM
sf13.1 [1], 

not sure where did you cut the engine/shell to build your artifacts, but looks
like server/client are incompatible, please rebuild RHSC engine/clients against
he latest sources, there are few changes been introduced at both server and
client sides.

2) i see that the engine you're using is 3.3 (connected to RHSC manager 3.3.0.0), but clients are 3.2 [2], note - this mode ain't supported.

3) in RHSC shell components versions are not displayed [3], this is known
issue in very early release of rhevm-cli, this was fixed and working in sf13 as
shown in [2].


[1] 

 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (disconnected)]# connect --url "https://xxx.xxx.xxx.155/api" --user admin@internal --password xxx --insecure

 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================

[RHEVM shell (connected)]# disconnect

  =======================================
  >>> disconnected from RHEVM manager <<<
  =======================================
 
[RHEVM shell (disconnected)]# connect --url "https://xxx.xxx.xxx.155/api" --user admin@internal --password xxx --insecure

 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================


[2] 

backend version: 3.3
sdk version    : 3.2.0.8
cli version    : 3.2.0.6
python version : 2.6.6.final.0

[3]

[RHSC shell (connected)]# info

backend version: 3.3
sdk version    : 0.0.0.0
cli version    : 0.0.0.0
python version : 2.6.6.final.0

entry point    : https://10.70.35.155/api


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