Project

General

Profile

Actions

Bug #29720

closed

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

Added by Jeremy Lenz over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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 1 (0 open1 closed)

Bug #30635: Content view version promotion failingDuplicateActions

Related issues 1 (0 open1 closed)

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

Updated by Partha Aji over 4 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

Actions #2

Updated by James Jeffers over 4 years ago

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

Updated by Samir Jha over 4 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

Actions #4

Updated by Samir Jha over 4 years ago

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

Updated by Samir Jha over 4 years ago

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

Untriaging to consider for 3.15 release..

Actions #6

Updated by Samir Jha over 4 years ago

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

Updated by Jonathon Turel over 4 years ago

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

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

Actions

Also available in: Atom PDF