Bug 1733587 - Unable to delete container provider
Summary: Unable to delete container provider
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.10.6
Hardware: All
OS: All
Target Milestone: GA
: 5.11.0
Assignee: Yaacov Zamir
QA Contact: juwatts
Red Hat CloudForms Documentation
Depends On:
Blocks: 1763857
TreeView+ depends on / blocked
Reported: 2019-07-26 16:20 UTC by Felix Dewaleyne
Modified: 2019-12-13 14:55 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1763857 (view as bug list)
Last Closed: 2019-12-13 14:55:11 UTC
Category: Bug
Cloudforms Team: Container Management
Target Upstream Version:

Attachments (Terms of Use)

Description Felix Dewaleyne 2019-07-26 16:20:14 UTC
Description of problem:
After initiating the removal from inventory of a container provider, the deletion seems stopped

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

How reproducible:
all the time in the customer environment

Steps to Reproduce:
1. go to compute > containers > provider
2. select provider
3. use "remove from inventory"

Actual results:
a trace appears in the logs after the operation starts :
[----] I, [2019-07-26T12:09:50.859273 #14217:c12f50]  INFO -- : MIQ(MiqQueue#deliver) Message id: [1000006083418], Delivering...
[----] I, [2019-07-26T12:09:50.863051 #14217:c12f50]  INFO -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager#disable!) Disabling EMS [RefContainer] id [1000000000003].
[----] E, [2019-07-26T12:09:50.883910 #14217:c12f50] ERROR -- : MIQ(MiqQueue#deliver) Message id: [1000006083418], Error: [undefined method `ipaddress?' for nil:NilClass]
[----] E, [2019-07-26T12:09:50.884502 #14217:c12f50] ERROR -- : [NoMethodError]: undefined method `ipaddress?' for nil:NilClass  Method:[block (2 levels) in <class:LogProxy>]
[----] E, [2019-07-26T12:09:50.884672 #14217:c12f50] ERROR -- : /var/www/miq/vmdb/app/models/ext_management_system.rb:111:in `hostname_format_valid?'
/opt/rh/cfme-gemset/gems/activesupport- `block in make_lambda'
/opt/rh/cfme-gemset/gems/activesupport- `block (2 levels) in halting_and_conditional'
/opt/rh/cfme-gemset/gems/activesupport- `block (2 levels) in default_terminator'
/opt/rh/cfme-gemset/gems/activesupport- `catch'
/opt/rh/cfme-gemset/gems/activesupport- `block in default_terminator'
/opt/rh/cfme-gemset/gems/activesupport- `block in halting_and_conditional'
/opt/rh/cfme-gemset/gems/activesupport- `block in call'
/opt/rh/cfme-gemset/gems/activesupport- `each'
/opt/rh/cfme-gemset/gems/activesupport- `call'
/opt/rh/cfme-gemset/gems/activesupport- `__run_callbacks__'

Expected results:
the deletion from inventory goes through

Additional info:
a reproducer is available

Comment 3 Adam Grare 2019-07-29 13:03:06 UTC
Hey Felix, it looks like somehow this provided ended up without a default endpoint which is where we get the hostname/ipaddress from for the EMS...the only endpoint I see is for hawkular.

We will have to set a default endpoint before deleting it, when I try to do this through the UI I just get a blank page so we'll have to do it from the rails console.

I don't know how the default endpoint got deleted, or why the UI won't let us edit the provider in thise case.  Both should be investigated.

Comment 6 Yaacov Zamir 2019-07-30 12:59:28 UTC
submitted upstream:

Comment 9 Yaacov Zamir 2019-07-31 11:26:39 UTC
Waiting for feedback about fix

Comment 10 CFME Bot 2019-08-06 16:15:34 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

commit 1dd63780d70590671376547848420d53999e80d6
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Tue Jul 30 09:20:52 2019 -0400
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Tue Jul 30 09:20:52 2019 -0400

    Merge pull request #19077 from yaacov/do-not-get-stuck-on-destroy

    Do not get stuck on destroy

    (cherry picked from commit 23750927bd53c88c249dd0c7f0abc0bc2155afaf)


 app/models/ext_management_system.rb | 7 +-
 1 file changed, 4 insertions(+), 3 deletions(-)

Comment 11 juwatts 2019-09-04 19:38:08 UTC
Verified in

Successfully added and removed a container provider multiple times.

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