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 1343546 - Bootstrap script should run commands with --force
Summary: Bootstrap script should run commands with --force
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootstrap
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Rich Jerrido
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-07 12:43 UTC by Lukas Pramuk
Modified: 2019-09-26 14:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-07 15:27:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lukas Pramuk 2016-06-07 12:43:42 UTC
Description of problem:
Bootstrap script should run commands with --force to successfully handle situation when you re-run script or you have already registerred host

Version-Release number of selected component (if applicable):
@Sat6.2.0-Snap14
katello-client-bootstrap-1.1.0-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1a. Have a host regged to CDN
2a. Run ./bootstrap.py and watch it fail with "subscription-manager register..."
[ERROR], [2016-06-07 06:28:08], EXITING: [/usr/sbin/subscription-manager register --org 'Default_Organization' --name '<CLIENT_FQDN>' --activationkey 'My Activation Key'  --serverurl=https://<SAT_FQDN>:443/rhsm --baseurl=https://<SAT_FQDN>/pulp/repos] failed to execute properly.
This system is already registered. Use --force to override

1b. Have a host that ha bootstrap ca certs installed
2b. Run ./bootstrap.py and watch it fail with "rpm -Uvh <bootstrap-ca-certs>..."
[ERROR], [2016-06-06 08:49:13], EXITING: [rpm -Uvh http://<SAT_FQDN>/pub/katello-ca-consumer-latest.noarch.rpm] failed to execute properly.
Retrieving http://<SAT_FQDN>/pub/katello-ca-consumer-latest.noarch.rpm
Preparing...                ##################################################
	package katello-ca-consumer-<SAT_FQDN>-1.0-1.noarch is already installed

Actual results:
failure 

Expected results:
success

Additional info:
rpm -Uvh --force http://<SAT_FQDN>/pub/katello-ca-consumer-latest.noarch.rpm would handle situation when rpm is already installed, RC=0

Comment 2 Evgeni Golov 2016-06-07 14:55:32 UTC
Why aren't you passing --force to the bootstrap script?
That should clean up all existing subs and rpms.

Comment 3 Lukas Pramuk 2016-06-07 15:27:19 UTC
Ooops, I had to miss it.


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