Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credential validation was not successful: undefined method 'raw_connect_v' #103

Closed
himdel opened this issue Oct 9, 2017 · 4 comments
Closed
Assignees

Comments

@himdel
Copy link
Contributor

himdel commented Oct 9, 2017

On current master (d6e2ab3), trying to add a RHEV provider in the UI...

==> ../manageiq/log/evm.log <==
[----] I, [2017-10-09T11:48:51.281287 #22331:2b1d8b29ba0c]  INFO -- : MIQ(ManageIQ::Providers::Redhat::InfraManager#with_provider_connection) Connecting through ManageIQ::Providers::Redhat::InfraManager: [dev-rhev36.yada.yada]
[----] E, [2017-10-09T11:48:51.886892 #22331:2b1d8b29ba0c] ERROR -- : MIQ(ManageIQ::Providers::Redhat::InfraManager#supported_api_versions_from_sdk) Error while probing supported api versions Unauthorized
[----] E, [2017-10-09T11:48:51.921184 #22331:2b1d8b29ba0c] ERROR -- : MIQ(ManageIQ::Providers::Redhat::InfraManager#verify_credentials_for_rhevm) Error while verifying credentials undefined method `raw_connect_v' for #<Class:0x007f6f7bcc56b8>
Did you mean?  raw_connect_v3
               raw_connect_v4
               raw_connect
[----] W, [2017-10-09T11:48:51.921936 #22331:2b1d8b29ba0c]  WARN -- : MIQ(ManageIQ::Providers::Redhat::InfraManager#authentication_check_no_validation) type: ["default"] for [] [dev-rhev36.yada.yada] Validation failed: invalid, undefined method `raw_connect_v' for #<Class:0x007f6f7bcc56b8>
Did you mean?  raw_connect_v3
               raw_connect_v4
               raw_connect

What seems to happen is that the connect does connect_method = "raw_connect_v#{version}".to_sym while version is nil.

version comes from version = options[:version] || highest_allowed_api_version, but options is just..

{:save=>false,                                                                        
 :database=>"ovirt_engine_history",
 :skip_supported_api_validation=>true}

and highest_allowed_api_version returns nil.

For me, use_ovirt_sdk? returns true, which means it just calls highest_supported_api_version .. which returns nil because supported_api_versions returns [].

Indeed, supported_api_versions_from_sdk returns [] ... only logging a simple

175034:[----] E, [2017-10-09T11:59:24.062447 #25248:2afcebd67e9c] ERROR -- : MIQ(ManageIQ::Providers::Redhat::InfraManager#supported_api_versions_from_sdk) Error while probing supported api versions Unauthorized

(IMHO this is a bug by itself, since it's just hiding errors from the server.).

When I fix my login info, it works :) .. but still, failing the validation with some message about the user not being authorized would be a better error than undefined method 'raw_connect_v'.

@juliancheal
Copy link
Member

@miq-bot assign @agrare

@pkliczewski
Copy link
Contributor

@himdel reproducing the issue

@pkliczewski
Copy link
Contributor

Here is the PR which attempts to fix the issue: #104

@durandom
Copy link
Member

fixed via #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants