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

Fix for physical server alert bug #17829

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

skovic
Copy link

@skovic skovic commented Aug 9, 2018

When deleting a physical infra provider, the delete may appear to be successful due to a message saying that the delete was successfully initiated; however, the delete actually fails with the following error in evm.log:

[----] E, [2018-08-09T16:16:47.588619 #9030:2ac60f3b5114] ERROR -- : MIQ(MiqQueue#deliver) Message id: [248], Error: [Could not find the inverse association for miq_alert_statuses (:physical_servers in MiqAlertStatus)]
[----] E, [2018-08-09T16:16:47.588971 #9030:2ac60f3b5114] ERROR -- : [ActiveRecord::InverseOfAssociationNotFoundError]: Could not find the inverse association for miq_alert_statuses (:physical_servers in MiqAlertStatus)  Method:[block (2 levels) in <class:LogProxy>]
[----] E, [2018-08-09T16:16:47.589098 #9030:2ac60f3b5114] ERROR -- : /usr/local/share/gems/gems/activerecord-5.0.7/lib/active_record/reflection.rb:202:in `check_validity_of_inverse!'

This PR fixes the bug by correcting the inverse_of specified in the PhysicalServer model's miq_alert_statuses relationship.

Fixes #17832

@skovic
Copy link
Author

skovic commented Aug 9, 2018

@miq-bot add_label bug

@miq-bot miq-bot added the bug label Aug 9, 2018
@skovic
Copy link
Author

skovic commented Aug 9, 2018

@agrare I found a bug related to the new physical server alert that was recently added. It actually causes the delete of a physical infra provider to fail. Can you take a look at this PR when you get a chance? Thanks

@miq-bot
Copy link
Member

miq-bot commented Aug 9, 2018

Checked commit skovic@694f304 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@agrare agrare closed this Aug 10, 2018
@agrare agrare reopened this Aug 10, 2018
@agrare agrare self-assigned this Aug 10, 2018
@agrare
Copy link
Member

agrare commented Aug 10, 2018

Thanks @skovic, FTR introduced by #17728

agrare added a commit to agrare/manageiq that referenced this pull request Aug 10, 2018
@agrare agrare merged commit 694f304 into ManageIQ:master Aug 10, 2018
@agrare agrare added this to the Sprint 92 Ending Aug 13, 2018 milestone Aug 10, 2018
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.

Cannot delete physical infrastructure provider
3 participants