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 1517729 - Ensure Satellite isn't installed before starting clone process
Summary: Ensure Satellite isn't installed before starting clone process
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Clone
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: John Mitsch
QA Contact: sthirugn@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1353215 1533259
TreeView+ depends on / blocked
 
Reported: 2017-11-27 10:29 UTC by Tomer Brisker
Modified: 2019-09-26 18:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-19 17:23:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0330 0 normal SHIPPED_LIVE Satellite Maintenance bug fix update 2018-02-19 22:22:51 UTC

Description Tomer Brisker 2017-11-27 10:29:43 UTC
If satellite-clone is run on a system that already has satellite installed, it could lead to unexpected results. 
Additionally, since satellite-clone is designed to be run on a clean RHEL host, having an existing satellite installed may indicate the user is accidentally attempting to run clone on a production system, which could lead to service disruption.

Before starting the clone process, satellite-clone should verify there is no Satellite package installed on the server.

Comment 3 John Mitsch 2017-11-30 18:21:17 UTC
This was merged upstream https://github.com/RedHatSatellite/satellite-clone/pull/278

Comment 4 John Mitsch 2017-12-18 14:44:25 UTC
This didn't make it into 1.2.0, but will be in 1.2.1+

Comment 6 sthirugn@redhat.com 2018-02-01 19:43:04 UTC
Failed in satellite-clone-1.2.1-1.el7sat.noarch

Test steps:
1. Run satellite-clone. Completed successfully.
2. Run satellite-clone again. This proceeded without satellite check. I was expecting to see an error that satellite is already installed.

output:
<snip>
TASK [satellite-clone : Check if satellite is already installed] *****************
Thursday 01 February 2018  14:33:49 -0500 (0:00:00.039)       0:00:00.150 ***** 
skipping: [localhost]

TASK [satellite-clone : Fail if satellite is already installed] ******************
Thursday 01 February 2018  14:33:50 -0500 (0:00:00.038)       0:00:00.189 ***** 
skipping: [localhost]

TASK [satellite-clone : set fact - satellite_installed] **************************
Thursday 01 February 2018  14:33:50 -0500 (0:00:00.034)       0:00:00.224 ***** 
ok: [localhost]
</snip>

vars file:
# cat /etc/satellite-clone/satellite-clone-vars.yml | grep skip_satellite_rpm_check
#skip_satellite_rpm_check: false

Comment 7 John Mitsch 2018-02-01 21:08:08 UTC
We discussed this off thread, the check is only meant to be run on the first run of the clone tool. The reason for this is if you can sat-clone, it installs the rpm, but satellite-installer fails. Then you go to re-run and you hit the satellite rpm check and the playbook errors out with "satellite rpm already installed". This is why the check will be skipped on subsequent runs after the first one.

Comment 8 sthirugn@redhat.com 2018-02-01 21:16:24 UTC
As John mentioned this check is a precautionary measure so the users doesn't install and run satellite-clone on a box which already has satellite.

Test steps:
1. Run satellite-clone. Completed successfully.
2. Run satellite-clone again. This proceeded without satellite check as expected.  To enforce the check I cleared ansible cache.
   - satellite-clone --flush-cache
3. Now I received an error as expected.

TASK [satellite-clone : Check if satellite is already installed] *****************
Thursday 01 February 2018  15:58:17 -0500 (0:00:00.035)       0:00:04.761 ***** 
changed: [localhost]

cmd: rpm -q satellite

start: 2018-02-01 15:58:18.094218

end: 2018-02-01 15:58:18.135561

delta: 0:00:00.041343

stdout: satellite-6.2.13-4.0.el7sat.noarch

TASK [satellite-clone : Fail if satellite is already installed] ******************
Thursday 01 February 2018  15:58:18 -0500 (0:00:00.271)       0:00:05.032 ***** 
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Satellite is already installed. Satellite-clone should be run on a clean RHEL7 machine. If you would like to force a skip of this check, please set skip_satellite_rpm_check to true in satellite-clone-vars.yml"}.

Comment 11 errata-xmlrpc 2018-02-19 17:23:12 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/RHBA-2018:0330


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