[Satellite 6] How to regenerate a corrupted/deleted bootstrap RPM?
Environment
- Red Hat Satellite v 6.2
- Red Hat Capsule v 6.2
Issue
- Accidentally removed the bootstrap RPM from the satellite/capsule server.
- Need to recreate a corrupted
/var/www/html/pub/katello-ca-consumer-HOSTNAME-x.0-x.noarch.rpm
file - Bootstrap RPM got overwritten
Resolution
- Generate the
rhsm-katello-reconfigure
script using the below command:
# sed -n '/^KATELLO_SERVER/,$p' /var/www/html/pub/katello-rhsm-consumer > /var/www/html/pub/rhsm-katello-reconfigure
- Generate the
katello-ca-consumer
RPM manually using the below command
# /usr/bin/katello-certs-gen-rpm --name katello-ca-consumer-$(hostname -f) --version 1.0 --release 11 --packager None --vendor None --group Applications/System --summary "Subscription-manager consumer certificate for Katello instance $(hostname -f)" --description "Consumer certificate and post installation script that configures rhsm." --requires subscription-manager --post /var/www/html/pub/rhsm-katello-reconfigure /usr/bin/katello-rhsm-consumer:755=/var/www/html/pub/katello-rhsm-consumer
Note: In the above command release number is set to 11, change it according to the environment. If its trying to replace the old RPM, take a back up of that file in question before executing the above command.
- Remove the katello-ca-consumer-latest.noarch.rpm symlink and re-point to the newly generated RPM
Root Cause
- Bootstrap RPM is created using the rhsm-katello-reconfigure script while the satellite installer is executed.
Diagnostic Steps
- Verify the installer logs to get the exact command to generate the bootstrap RPM:
[DEBUG 2017-05-05 21:58:49 main] Executing '/usr/bin/katello-certs-gen-rpm --name katello-ca-consumer-satellite6.example.com--version 1.0 --release 1 --packager None --vendor None --group Applications/System --summary Subscription-manager consumer certificate for Katello instance satellite6.example.com --description Consumer certificate and post installation script that configures rhsm. --requires subscription-manager --post /var/www/html/pub/rhsm-katello-reconfigure /usr/bin/katello-rhsm-consumer:755=/var/www/html/pub/katello-rhsm-consumer'
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments