Project

General

Profile

Bug #32725

katello-change-hostname should handle --no-enable-puppet properly

Added by Ian Ballou 6 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
RPMs
Target version:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1967974

Description of problem:

katello-change-hostname will error out if @scenario_answers['puppet'] is false (https://github.com/theforeman/foreman-packaging/blob/rpm/1.24/packages/katello/katello/hostname-change.rb#L170). We should skip `delete_puppet_certs` if this is the case.

Version-Release number of selected component (if applicable):

Katello 3.14

How reproducible:

Always

Steps to Reproduce:
1. Remove the puppet configuration from katello-answers.yaml
2. Run katello-change-hostname
3.

Actual results:

deleting old certs
/usr/share/katello/hostname-change.rb:217:in `delete_puppet_certs': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/share/katello/hostname-change.rb:488:in `run'
from /sbin/katello-change-hostname:23:in `<main>'

Expected results:

hostname changed successfully

Additional info:

Associated revisions

Revision ee14227e (diff)
Added by Ewoud Kohl van Wijngaarden 6 months ago

Fixes #32725 - Make delete_puppet_certs handle all input

If a user runs the installer with --no-enable-puppet the value of
@scenario_answers['puppet'] becomes false. false['ssldir'] raises an
exception. By returning early, it's handled safely.

History

#1 Updated by Ian Ballou 6 months ago

  • Subject changed from katello-change-hostname should handle --no-enable-puppet properly to katello-change-hostname should handle --no-enable-puppet properly
  • Pull request https://github.com/theforeman/foreman-packaging/pull/6749 added

#2 Updated by The Foreman Bot 6 months ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Status changed from New to Ready For Testing

#3 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases 3.0.0 added

#4 Updated by Ewoud Kohl van Wijngaarden 6 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by The Foreman Bot 6 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/6774 added

#6 Updated by Evgeni Golov 6 months ago

  • Fixed in Releases 2.5.1 added

#7 Updated by Evgeni Golov 6 months ago

  • Target version set to 2.5.1

#8 Updated by Amit Upadhye 4 months ago

  • Category set to RPMs

Also available in: Atom PDF