Description of problem: when deleting an archived node using configure > remove a unknown method error is raised : 75973-[----] I, [2017-10-18T09:45:20.795251 #24655:110312c] INFO -- : MIQ(MiqTask#update_status) Task: [20000000113913] [Active] [Ok] [Deleting Ironic Node] 75974:[----] I, [2017-10-18T09:45:20.801908 #24655:110312c] INFO -- : MIQ(MiqTask#update_status) Task: [20000000113913] [Finished] [Error] [Delete Ironic node ManageIQ::Providers::Openstack::InfraManager::Host name: [00321723-9a4c-4890-a1d2-e3dc38b62ca9], id: [20000000000029] finished with undefined method `openstack_handle' for nil:NilClass] Version-Release number of selected component (if applicable): 5.8.1.5 How reproducible: customer environment Steps to Reproduce: 1.go to compute->infrastructure->nodes 2.click on one archived node (A), configuration -> remove item. 3. Actual results: error raised 75974:[----] I, [2017-10-18T09:45:20.801908 #24655:110312c] INFO -- : MIQ(MiqTask#update_status) Task: [20000000113913] [Finished] [Error] [Delete Ironic node ManageIQ::Providers::Openstack::InfraManager::Host name: [00321723-9a4c-4890-a1d2-e3dc38b62ca9], id: [20000000000029] finished with undefined method `openstack_handle' for nil:NilClass] Expected results: node deleted with no error Additional info: waiting for confirmation of the deletion of the node. If it's just raising an error I'll be lowering severity.
confirmed that the nodes do not get deleted. realigning severity with the case - this isn't the most urgent issue in the customer's environment.
The archived nodes are causing errors in metrics collection : [----] E, [2017-10-23T11:58:18.237562 #11488:c0713c] ERROR -- : MIQ(ManageIQ::Providers::Openstack::InfraManager::MetricsCapture#perf_collect_metrics) [hourly] for: [ManageIQ::Providers::Openstack::InfraManager::Host], [20000000000054], [fd9cd9c1-1405-4835-afa7-63b00c548100 (NovaCompute)] Unhandled exception during perf data collection: [undefined method `[]' for nil:NilClass], class: [NoMethodError]
A couple questions/comments: 1) The metrics collection related error looks like a different bug, although it's related -- both stem from the fact that archived nodes have no associated provider. In the reported bug here, we're trying to contact the (non-existent) OpenStack provider, and failing deletion as a result, and in the metrics case, we may be trying to access the provider there as well. The best thing for that may be to open a separate bug for the metrics errors, providing more log context. 2) I'm a bit confused on the comments about actual host deletion and priority. From the comments, I get the impression that this is a lower priority because the host isn't actually being deleted, but I may be misunderstanding. In any case, am I correct that the proper fix here is to a) make sure we don't trigger the error condition and b) make sure the host deletion proceeds to completion -- deleting it from the MIQ database only, since there is no external provider to contact to delete an actual node somewhere.
(In reply to Scott Seago from comment #5) > A couple questions/comments: > 1) The metrics collection related error looks like a different bug, although > it's related -- both stem from the fact that archived nodes have no > associated provider. In the reported bug here, we're trying to contact the > (non-existent) OpenStack provider, and failing deletion as a result, and in > the metrics case, we may be trying to access the provider there as well. The > best thing for that may be to open a separate bug for the metrics errors, > providing more log context. > > 2) I'm a bit confused on the comments about actual host deletion and > priority. From the comments, I get the impression that this is a lower > priority because the host isn't actually being deleted, but I may be > misunderstanding. In any case, am I correct that the proper fix here is to > a) make sure we don't trigger the error condition and b) make sure the host > deletion proceeds to completion -- deleting it from the MIQ database only, > since there is no external provider to contact to delete an actual node > somewhere. Hi, Regarding the first question/comment I've been told that the metrics collection error could be ignored, it wasn't related to the provider in use and metrics collection were working fine. Regarding the second one, the customer sees a medium priority in removing the archived nodes. I would agree that the proper fix would be to make sure we don't trigger the error on removal - or at least catch it and properly handle it. If able to, we'd like to have guidance over the removal of the providers from the vmdb from the ruby console as a workaround while addressing this bug.
https://github.com/ManageIQ/manageiq-providers-openstack/pull/165
New commit detected on ManageIQ/manageiq-providers-openstack/master: https://github.com/ManageIQ/manageiq-providers-openstack/commit/64f6d83700a03e5fda551022e438c0967cf702aa commit 64f6d83700a03e5fda551022e438c0967cf702aa Author: Scott Seago <sseago> AuthorDate: Mon Nov 27 13:57:30 2017 -0500 Commit: Scott Seago <sseago> CommitDate: Mon Nov 27 13:59:36 2017 -0500 bz 1504131: For archived nodes, just delete AR object on remove https://bugzilla.redhat.com/show_bug.cgi?id=1504131 Archived nodes have no ems, so don't try to contact the (nonexistent) provider. Just delete the AR object. .../providers/openstack/infra_manager/host.rb | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)