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

EmsRefresh.queue_refresh doesn't put_or_update correctly with multi-manager queue_names #20303

Closed
agrare opened this issue Jun 23, 2020 · 2 comments
Assignees

Comments

@agrare
Copy link
Member

agrare commented Jun 23, 2020

When you run EmsRefresh.queue_refresh more than once targeting a provider with consolidated managers leading to an array of queue names, MiqQueue.put_or_update doesn't properly find the previous record. The find_options[:queue_name] link is an array where the record has a string.

Steps to reproduce:

  1. Add a provider with multiple managers (Amazon, Azure, Openstack, etc...)
  2. Queue a refresh twice
>> MiqQueue.count
=> 0
>> ManageIQ::Providers::Amazon::CloudManager.first.queue_refresh
=> nil
>> MiqQueue.count
=> 1
>> ManageIQ::Providers::Amazon::CloudManager.first.queue_refresh
=> nil
>> MiqQueue.count
=> 2
@agrare agrare self-assigned this Jun 23, 2020
@Fryguy
Copy link
Member

Fryguy commented Jul 14, 2020

@agrare I think you recently got rid of the JSON bit for the queue_name, which I also assumed would need a data migration. Is that related or is this just part of the exercise of removing that.

@agrare
Copy link
Member Author

agrare commented Jul 14, 2020

Oh so I actually fixed this as part of #20302 but yes this was one of the issues that led me to want to get rid of the json queue_name array in #20345. #20307 was another bug that was due to the queue name array.

@agrare agrare closed this as completed Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants