Bug 1538825

Summary: [RFE] Add further checks when validating OpenStack Platform Director providers
Product: Red Hat CloudForms Management Engine Reporter: Brandon Squizzato <bsquizza>
Component: UI - OPSAssignee: Scott Seago <sseago>
Status: CLOSED ERRATA QA Contact: Ido Ovadia <iovadia>
Severity: low Docs Contact:
Priority: low    
Version: 5.9.0CC: bsquizza, hkataria, iovadia, lavenel, maufart, mpovolny, obarenbo, simaishi, slucidi, smallamp, sseago
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.10.0Flags: bsquizza: automate_bug-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: provider:validation
Fixed In Version: 5.10.0.22 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:01:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:

Description Brandon Squizzato 2018-01-25 22:36:57 UTC
Description of problem:

An admin can un-intentionally add a "standard" OpenStack deployment (i.e. overcloud) as an infrastructure provider (i.e., when it should be added as a cloud provider). The 'validate' button simply checks credentials and passes, so the provider is then added. A refresh can be successfully kicked off against the provider, but of course errors will be thrown -- in my case since Ironic service was missing this is thrown:

[EmsRefresh::Refreshers::EmsRefresherMixin::PartialRefreshError]: Required service Ironic is missing in the catalog.  Method:[block in method_missing]


To prevent people from making this mistake, it may be ideal if CFME does more validation to ensure it really is interacting with an undercloud deployment -- and if the checks then a helpful error is thrown either during provider validation, or if not there then during a refresh attempt. My two thoughts were the validation process could check for a) presence of all expected undercloud services, and b) presence of 'overcloud' images in glance -- there may be better ways to be certain it is an undercloud deployment that I'm not aware of.


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

5.9.0.17

How reproducible:

100%

Steps to Reproduce:

1. Configure OpenStack overcloud deployment
2. Add an infrastructure provider of type "OpenStack Platform Director" pointing to the above deployment's keystone service

Comment 1 Dave Johnson 2018-01-25 22:44:13 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 5 Scott Seago 2018-10-17 02:46:11 UTC
PR posted: https://github.com/ManageIQ/manageiq-providers-openstack/pull/379

Comment 6 CFME Bot 2018-10-25 20:06:57 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/master:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/d6415b3635b04d463ca919205b1ffc489cbf52a6
commit d6415b3635b04d463ca919205b1ffc489cbf52a6
Author:     Scott Seago <sseago>
AuthorDate: Tue Oct 16 22:42:42 2018 -0400
Commit:     Scott Seago <sseago>
CommitDate: Tue Oct 16 22:42:42 2018 -0400

    bz 1538825: For OpenStack infra validation, validate presence of Ironic

    fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538825

    For OpenStack infra providers, validate credentials also checks for Baremetal service.

 app/models/manageiq/providers/openstack/infra_manager.rb | 39 +
 app/models/manageiq/providers/openstack/manager_mixin.rb | 2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

Comment 7 CFME Bot 2018-10-26 12:16:59 UTC
New commit detected on ManageIQ/manageiq-providers-openstack/hammer:

https://github.com/ManageIQ/manageiq-providers-openstack/commit/aa43c1411ca48bc46d32451ef6d6c24e963f51fd
commit aa43c1411ca48bc46d32451ef6d6c24e963f51fd
Author:     Samuel Lucidi <mansam.edu>
AuthorDate: Thu Oct 25 16:03:29 2018 -0400
Commit:     Samuel Lucidi <mansam.edu>
CommitDate: Thu Oct 25 16:03:29 2018 -0400

    Merge pull request #379 from sseago/validate_undercloud

    bz 1538825: For OpenStack infra validation, validate presence of Ironic

    (cherry picked from commit fd158fcea2ccfb66e52293d4b265e5c3c52d75fa)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538825

 app/models/manageiq/providers/openstack/infra_manager.rb | 39 +
 app/models/manageiq/providers/openstack/manager_mixin.rb | 2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

Comment 8 Ido Ovadia 2018-12-17 10:13:18 UTC
Verified
========
5.10.0.28

Comment 9 errata-xmlrpc 2019-02-07 23:01:05 UTC
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.

https://access.redhat.com/errata/RHSA-2019:0212