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

Send oVirt metrics details to raw_connect #2651

Merged
merged 1 commit into from
Nov 8, 2017
Merged

Send oVirt metrics details to raw_connect #2651

merged 1 commit into from
Nov 8, 2017

Conversation

jhernand
Copy link
Contributor

@jhernand jhernand commented Nov 7, 2017

A recent patch changed the UI worker in order to perform authentication
validation of infrastructure providers using a queued task. This had the
side effect of not sending to the oVirt provider the metrics connection
details and. Without this these providers will not be validated.

This patch partially solves the following bug:

RHV provider metrics validation is broken
https://bugzilla.redhat.com/1510533

@jhernand
Copy link
Contributor Author

jhernand commented Nov 7, 2017

:version => 4,
:verify_ssl => params[:default_tls_verify] == 'on' ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE,
:ca_certs => params[:default_tls_ca_certs],
:metrics_userid => metrics_user,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when the metrics credentials are empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the metrics credentials are empty this will just send nil or a blank strings.

Note that this is just the first step. Second step is to modify the raw_connect method of the provider so that it takes these values and does something useful with them.

@jhernand jhernand changed the title Send oVirt metrics details raw_connect Send oVirt metrics details to raw_connect Nov 7, 2017
@jhernand
Copy link
Contributor Author

jhernand commented Nov 7, 2017

@oourfali
Copy link

oourfali commented Nov 7, 2017

@miq-bot add_label gaprindashvili/yes

@@ -116,6 +116,7 @@ def create

def get_task_args(ems)
user, password = params[:default_userid], MiqPassword.encrypt(params[:default_password])
metrics_user, metrics_password = params[:metrics_userid], MiqPassword.encrypt(params[:metrics_password])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do any other providers use metrics_ auth type? We might want to move these provider specific ones down into the respective case statements otherwise this list can grow quickly (add hawkular and prometheus for containers at least)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't know if other providers use metrics_. Anyhow, moving this to the case statement doesn't hurt, so I will do it.

A recent patch changed the UI worker in order to perform authentication
validation of infrastructure providers using a queued task. This had the
side effect of not sending to the oVirt provider the metrics connection
details and. Without this these providers will not be validated.

This patch partially solves the following bug:

  Failed validation when adding RHV provider
  https://bugzilla.redhat.com/1509432
@miq-bot
Copy link
Member

miq-bot commented Nov 7, 2017

Checked commit https://github.com/jhernand/manageiq-ui-classic/commit/7a676fc5bf66fab0c7db957b7f1e9098019b0b5c with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@agrare
Copy link
Member

agrare commented Nov 7, 2017

@miq-bot add-label bug
@miq-bot assign @dclarizio

@miq-bot miq-bot added the bug label Nov 7, 2017
@dclarizio dclarizio assigned martinpovolny and unassigned dclarizio Nov 7, 2017
@martinpovolny martinpovolny merged commit 30cd822 into ManageIQ:master Nov 8, 2017
@martinpovolny martinpovolny added this to the Sprint 73 Ending Nov 13, 2017 milestone Nov 8, 2017
simaishi pushed a commit that referenced this pull request Nov 15, 2017
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit a3e75c3137c4c750da549c9b8c935e018d584cdd
Author: Martin Povolny <mpovolny@redhat.com>
Date:   Wed Nov 8 12:07:54 2017 +0100

    Merge pull request #2651 from jhernand/send_ovirt_metrics_to_raw_connect
    
    Send oVirt metrics details to `raw_connect`
    (cherry picked from commit 30cd8225bf5177463b08311406c2442fc0094d6b)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1511079

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

Successfully merging this pull request may close these issues.

9 participants