Project

General

Profile

Bug #29720

NoMethodError: undefined method `>’ for nil:NilClass when promoting to new environment after upgrade to Katello 3.15

Added by Jeremy Lenz about 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

See https://community.theforeman.org/t/cannot-promote-to-environments-after-upgrade-to-foreman-2-0-katello-3-15/18649

When puppet is set to false under content_types in katello.yaml, the content_types field on a content view version does not get a puppet_modules key. This causes the above error in the promote_puppet_environment? method in app/models/katello/content_view_version.rb.

Need to update to account for this.


Subtasks

Bug #30635: Content view version promotion failingDuplicate

Related issues

Is duplicate of Katello - Bug #29448: Skip puppet env import on cv publish/promote if smart proxy feature is not presentClosed

History

#1 Updated by Partha Aji about 2 years ago

The code here should handle case where PuppetModule::CONTENT_TYPE is not set

https://github.com/Katello/katello/blob/master/app/models/katello/content_view_version.rb#L164

    def promote_puppet_environment?
      (!content_counts.blank? && content_counts.dig(PuppetModule::CONTENT_TYPE) > 0) || self.content_view.force_puppet_environment?
    end

#2 Updated by James Jeffers about 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.16.0

#3 Updated by Samir Jha almost 2 years ago

This has been fixed by this change here by adding the puppet module key explicitly.
: https://github.com/Katello/katello/pull/8702/files#diff-806e40dd93ec377d04d685b9fc99ba73R317

#4 Updated by Samir Jha almost 2 years ago

  • Is duplicate of Bug #29448: Skip puppet env import on cv publish/promote if smart proxy feature is not present added

#5 Updated by Samir Jha almost 2 years ago

  • Triaged changed from Yes to No
  • Target version changed from Katello 3.16.0 to Katello Recycle Bin
  • Status changed from New to Duplicate

Untriaging to consider for 3.15 release..

#6 Updated by Samir Jha almost 2 years ago

  • Target version deleted (Katello Recycle Bin)
  • Status changed from Duplicate to New

#7 Updated by Jonathon Turel almost 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello Recycle Bin
  • Status changed from New to Rejected

This is resolved in 3.16 and there is a workaround provided in the above comments - so closing this out for 3.15

Also available in: Atom PDF