Bug 929058

Summary: [RHSC-SHELL] Not able to connect to rhsc-shell after disconnecting it.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: RamaKasturi <knarra>
Component: rhsc-cliAssignee: Shireesh <shireesh>
Status: CLOSED NOTABUG QA Contact: RamaKasturi <knarra>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 2.1CC: avishwan, dtsang, knarra, mmahoney, mpastern, pprakash, rhs-bugs, sabose, shtripat, ssampat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-17 16:09:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Attaching engine log file.
none
Attaching engine.log file none

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