Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1388134 - --upgrade-puppet option will re-run installer even if system is already on puppet 4
Summary: --upgrade-puppet option will re-run installer even if system is already on pu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-24 14:45 UTC by Chris Duryee
Modified: 2019-09-26 14:48 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-katello-3.4.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17073 0 None None None 2016-10-24 14:45:14 UTC
Foreman Issue Tracker 20593 0 None None None 2017-08-14 16:07:29 UTC

Description Chris Duryee 2016-10-24 14:45:15 UTC
Description of problem:


If a katello system is already running puppet 4, the --upgrade-puppet script should bail out with an error message instead of shutting down services and re-running the installer.

to repro:

    run foreman-installer --upgrade-puppet
    run foreman-installer --upgrade-puppet again

The second command should not restart services or perform any other upgrade steps.

Comment 4 Satellite Program 2017-07-11 14:10:22 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17073 has been resolved.

Comment 5 Satellite Program 2017-08-03 22:12:02 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17073 has been resolved.

Comment 6 Lukas Pramuk 2017-08-08 18:49:58 UTC
VERIFIED.

@satellite-6.3.0-16.0.beta.el7sat.noarch
puppet-agent-1.8.2-2.el7sat.x86_64
puppetserver-2.7.2-2.el7sat.noarch
katello-installer-base-3.4.4-1.el7sat.noarch

by following manual reproducer

1. Install Satellite using Puppet3
# satellite-installer -S satellite

2. Upgrade to Puppet4
# satellite-installer --upgrade-puppet
Upgrading puppet...
...
Puppet upgrade completed!

3. Try to run puppet upgrade again
# satellite-installer --upgrade-puppet
Puppet already installed and upgraded. Skipping.

>>> if satellite is already running puppet4 then puppet upgrade is being skipped immediately

Comment 7 Lukas Pramuk 2017-08-08 19:37:04 UTC
FailedQA.

Unfortunately on non-upgraded Puppet4 Satellite puppet upgrade is not skipped.

The fix just brought that --upgrade-puppet cannot be run twice, but that's not really what we want.

We want if puppet4 is already present then it cannot be run, so it's for the first time on non-upgraded p4 install.

Comment 8 Lukas Pramuk 2017-08-08 19:48:18 UTC
Puppet4 installation shall create "/etc/foreman-installer/.puppet_4_upgrade" file to fix it for non-upgraded p4 install.

Comment 9 Eric Helms 2017-08-09 02:03:23 UTC
I am not sure we can safely detect the difference between a fresh install and an upgraded Puppet 4 that failed half way through. I like the spirit of your request, I just don't know how we pull this off safely.

Comment 10 Lukas Pramuk 2017-08-10 18:57:40 UTC
Eric,

The trouble is that the check is based on existence of some file, so --upgrade-puppet won't be simply run twice. But this fails for clean p4 installation.

Why the check is not about what puppet version is present? That would cover both, clean p4 and upgraded p4 installation.

"Is puppet_version < 4 ? then go for upgrade else skip"

Comment 11 Lukas Pramuk 2017-09-04 15:27:30 UTC
VERIFIED.

@satellite-6.3.0-17.0.beta.el7sat.noarch
katello-installer-base-3.4.5-1.el7sat.noarch
puppet-agent-1.8.2-2.el7sat.x86_64
puppetserver-2.7.2-2.el7sat.noarch

using manual reproducer described in comment#6:

3.  Try to run puppet upgrade again (upgraded install) or needlessly (fresh p4 install) 

@upgraded p4 install:
# satellite-installer --upgrade-puppet
Puppet already installed and upgraded. Skipping.

@clean p4 install:
# satellite-installer --upgrade-puppet
Puppet already installed and upgraded. Skipping.

>>> if system is already on puppet4 then the installer refuses to run puppet upgrade needlessly (possibly breaking things)

Comment 12 Satellite Program 2018-02-21 16:51:07 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.