Actions
Bug #36811
closedApplied Errata report download fails with undefined method `value' for nil:NilClass error
Status:
Closed
Priority:
Normal
Assignee:
Category:
Errata Management
Target version:
Difficulty:
trivial
Triaged:
Yes
Bugzilla link:
Pull request:
Description
Applied Errata report download fails with undefined method `value' for nil:NilClass error.
This might happen when the Template Invocation input or the value itself is null.
irb(main):034:0> job_id = RemoteExecutionFeature.feature('katello_errata_install').job_template_id
160
irb(main):035:0> ids = ForemanTasks::Task.find_by_sql("select foreman_tasks_tasks.id,template_invocations.id AS template_invocation_id from foreman_tasks_tasks LEFT OUTER JOIN template_invocations ON foreman_tasks_tasks.id = template_invocations.run_host_job_task_id LEFT OUTER JOIN templates ON template_invocations.template_id = templates.id where state = 'stopped' AND ((label = 'Actions::RemoteExecution::RunHostJob' AND templates.id = #{job_id}) OR label = 'Actions::Katello::Host::Erratum::Install' OR label = 'Actions::Katello::Host::Erratum::ApplicableErrataInstall');")
irb(main):036:1> ids.each do |id|
irb(main):037:1* puts("TASK ID: #{id['id']}")
irb(main):038:1* template_id = TemplateInvocation.find_by_sql("select template_invocations.id from template_invocations inner join f
oreman_tasks_tasks on foreman_tasks_tasks.id = template_invocations.run_host_job_task_id where foreman_tasks_tasks.id = '#{id['id']}';
")[0]
irb(main):039:1* a = TemplateInvocationInputValue.joins(:template_input).where("template_invocation_id = ? AND template_inputs.name
= 'errata'", template_id).first
irb(main):040:1* puts("TP: #{a}")
irb(main):041:0> end
TASK ID: 2227c1f8-0d7d-43a5-9e73-ed6c18c23ce3
TP:
TASK ID: 6662e585-f573-4d4c-b171-2f44c2f1861e
TP:
TASK ID: d7d7c6a8-3f27-4abf-a370-f53408b3b00d
TP:
TASK ID: f979ac0f-b56f-4f3f-8ea9-cccf75e6bcd0
TP:
TASK ID: 234f232a-a33e-4aec-a0c2-acc27ef29733
TP:
TASK ID: c8144f56-4f2c-4aa7-bfc0-f1d4cf8970ad
TP:
TASK ID: a42c3ace-8b44-46fb-824f-42bce653aac1
TP:
Updated by The Foreman Bot about 1 year ago
- Status changed from New to Ready For Testing
- Assignee set to Nagoor Shaik
- Pull request https://github.com/Katello/katello/pull/10763 added
Updated by Jeremy Lenz about 1 year ago
- Category set to Errata Management
- Target version set to Katello 4.11.0
- Triaged changed from No to Yes
Updated by The Foreman Bot about 1 year ago
- Fixed in Releases Katello 4.11.0 added
Updated by Ian Ballou about 1 year ago
- Status changed from Ready For Testing to Closed
Actions