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):
all the time in the customer environment
Steps to Reproduce:
1. go to compute > containers > provider
2. select provider
3. use "remove from inventory"
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: , Delivering...
[----] I, [2019-07-26T12:09:50.863051 #14217:c12f50] INFO -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager#disable!) Disabling EMS [RefContainer] id .
[----] E, [2019-07-26T12:09:50.883910 #14217:c12f50] ERROR -- : MIQ(MiqQueue#deliver) Message id: , 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-126.96.36.199/lib/active_support/callbacks.rb:382:in `block in make_lambda'
/opt/rh/cfme-gemset/gems/activesupport-188.8.131.52/lib/active_support/callbacks.rb:150:in `block (2 levels) in halting_and_conditional'
/opt/rh/cfme-gemset/gems/activesupport-184.108.40.206/lib/active_support/callbacks.rb:547:in `block (2 levels) in default_terminator'
/opt/rh/cfme-gemset/gems/activesupport-220.127.116.11/lib/active_support/callbacks.rb:546:in `block in default_terminator'
/opt/rh/cfme-gemset/gems/activesupport-18.104.22.168/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
/opt/rh/cfme-gemset/gems/activesupport-22.214.171.124/lib/active_support/callbacks.rb:454:in `block in call'
the deletion from inventory goes through
a reproducer is available
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.
Waiting for feedback about fix
New commit detected on ManageIQ/manageiq/ivanchuk:
Author: Adam Grare <firstname.lastname@example.org>
AuthorDate: Tue Jul 30 09:20:52 2019 -0400
Commit: Adam Grare <email@example.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(-)
Verified in 126.96.36.199.20190827200559_e618ece
Successfully added and removed a container provider multiple times.