- The cluster upgrade / installation fails with the message:
[worker-X] Error downloading packages: <date> [worker-X] lsof-4.87-4.el7.x86_64: [Errno 256] No more mirrors to try.
- CloudBees Jenkins Enterprise (CJE) 1.6.x
- RedHat Enterprise Linux
- TIGER-2677 (Fixed in CJE 1.7.0)
When using RHEL, CJE 1.6.0+ requires Red Hat Subscription Manager credentials. This can cause operations to fail as CJE cannot install new Operations System modules without these credentials.
The solution is to upgrade to CJE 1.7.0 or later. This version offers a feature to provide scripts handling the registration / unregistration via the attributes
For existing installation, the operation
cje prepare registration-update can be used. Then you can provide the path to registration / unregistration scripts in the
registration-update.config. For example:
[tiger] ## OS Registration script # # If the OS requires a registration (e.g. RHEL), provide here the path to script handling the registration. # This script will be copied to machines and executed on init and upgrades and must succeed even if the machine is already registered. # # Example of script content for RHEL: # #!/bin/bash # subscription-manager register --username <rhel_username> --password <rhel_password> --auto-attach --force # # register_script = $CJE_PROJECT_HOME/scripts/rhel-sm-reg-script.sh ## OS Unregistration script # # The unregister script is run on machine shutdown. It allows to free the registration if it part of a pool. # Provide here the path to a script handling machine unregistration. # # Example of script content for RHEL: # #!/bin/bash # subscription-manager unregister # # unregister_script = $CJE_PROJECT_HOME/scripts/rhel-sm-ureg-script.sh
This is documented in Administrate CJE - Configuration Reference - Common Configuration Attributes
A workaround is to manually register the RHEL instances (in other words each controller and worker).
1) SSH onto controller / worker
dna connect [controller|worker]
2) Log on to Red Hat subscription manager (credentials of your RHEL account):
subscription-manager register –username