-
Notifications
You must be signed in to change notification settings - Fork 897
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
Queue reporting work for any zone #18041
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,8 +164,8 @@ def queue_generate_table(options = {}) | |
if sync | ||
_async_generate_table(task.id, options) | ||
else | ||
MiqQueue.put( | ||
:queue_name => "reporting", | ||
MiqQueue.submit_job( | ||
:service => "reporting", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be clear, |
||
:class_name => self.class.name, | ||
:instance_id => id, | ||
:method_name => "_async_generate_table", | ||
|
@@ -792,9 +792,8 @@ def queue_report_result(options, res_opts) | |
_log.info("Adding generate report task to the message queue...") | ||
task = MiqTask.create(:name => "Generate Report: '#{name}'", :userid => options[:userid]) | ||
|
||
MiqQueue.put( | ||
:queue_name => "reporting", | ||
:role => "reporting", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, this was probably not causing the issue seen above because it specified the role as reporting, which should set the zone to nil. To simplify things, I moved this code to use the |
||
MiqQueue.submit_job( | ||
:service => "reporting", | ||
:class_name => self.class.name, | ||
:instance_id => id, | ||
:method_name => "build_report_result", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,6 +108,7 @@ def queue_generate_content_for_users_or_group(*args) | |
MiqQueue.create_with(callback).put_unless_exists( | ||
:queue_name => "reporting", | ||
:role => "reporting", | ||
:zone => nil, # any zone | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, I didn't change this to use |
||
:class_name => self.class.to_s, | ||
:instance_id => id, | ||
:msg_timeout => 3600, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was most likely the cause of the reporting bug where reporting work would be enqueued for a zone without a reporting role. The absence of the
:role => "reporting"
and:zone => nil
causes this message to be queued for:zone => Zone.my_zone
(the current server's zone)