Satellite - bootstraping client without major package upgrade ?

Latest response

Hi,

I am going to register a few hundreds of RH servers to our internal Satellite.
So far I did just test / dev hosts using bootstrap script and all went well.
The next long list of servers is the production one. For obvious reason
I don't want them to install any other package that needed to register to Satellite.
Some of them are really old (RH 4.* / 5.*, etc) so I am afraid that on some of them
it might be that rhncfg* packages being installed require kernel upgrade (or any another
core package ...). Can anybody suggest any way to verify that installing rhncfg* packages
won't involve any major package change ?

Regards
Przemek

Responses

It sounds as though you have already done the following, but for others that might benefit:
If you are using the bootstrap that is created by the Satellite, there is an option/flag in the script
FULLY_UPDATE_THIS_BOX=0
set that to 0 to prevent the box from updating.

NOTE: this is a COMPLETE HACK and I'm not 100% certain this proves or disproves what you are looking for
You could schedule a job to run:

echo n | yum install rhncfg rhncfg-actions yum-rhn-plugin rhn-profile-sync

and review the output.

I selected those packages from doing the following (and reviewing)

# egrep -i 'yum|wget|rpm' /var/www/html/pub/bootstrap/bootstrap.sh
ORG_CA_CERT_IS_RPM_YN=0
if [ -x /usr/bin/wget ] ; then
    output=`LANG=en_US /usr/bin/wget --no-check-certificate 2>&1`
        FETCH="/usr/bin/wget -q -r -nd --no-check-certificate"
        FETCH="/usr/bin/wget -q -r -nd"
YUM=up2date
if [ -x /usr/bin/yum ] ; then
    YUM=yum
    res=$(LC_ALL=C rpm -q --queryformat '%{version}' up2date | sed -e 's/\..*//g')
        rpm --import $ORG_GPG_KEY
    if [ $ORG_CA_CERT_IS_RPM_YN -eq 1 ] ; then
        rpm -Uvh ${HTTP_PUB_DIRECTORY}/${ORG_CA_CERT}
    if [ "$YUM" == yum ] ; then
        echo "        channel and yum upgrade rhncfg-actions"
        if [ "$YUM" == yum ] ; then
            echo "    system to the tools channel and yum updates rhncfg-actions."
    if [ "$YUM" == yum ] ; then
        echo "        channel and yum upgrade rhncfg-actions"
        if [ "$YUM" == yum ] ; then
            echo "    system to the tools channel and yum updates rhncfg-actions."
    if [ "$YUM" == yum ] ; then
        echo "yum -y upgrade yum yum-rhn-plugin; rhn-profile-sync; yum upgrade (conditional)"
    if [ "$YUM" == yum ] ; then
        echo "yum -y upgrade yum yum-rhn-plugin; rhn-profile-sync"
    echo "* ensuring $YUM itself is updated"
if [ "$YUM" == yum ] ; then
    /usr/bin/yum -y upgrade yum yum-rhn-plugin
        /usr/bin/yum -y upgrade 

Hello James,

this is interesting idea - I quite like it :-)

By the way when I compare list of your packages (rhncfg rhncfg-actions yum-rhn-plugin rhn-profile-sync) to our list (taken from Satellite bootstrap script) we have a different list:
rhncfg
rhncfg-actions
rhncfg-client

I wonder why is that ?

My suspicion is that we are possibly running different versions of Satellite (or we each had a different version when the bootstrap was created). Which is interesting, now tha that you mention it. I don't know what version our satellite was when the bootstrap was created and I bet 5.5 and especially 5.6 will handle the process a bit differently. Also - we tweak our bootstrap file (quite a bit). I try to encourage folks NOT to modify things in the middle section - but sometimes it happens ;-)

That is true - our bootstrap was created during 5.5 deployment. Now we have 5.6 but I didn't modify it since the very begin (except Activation Key of course). Am I reading correctly that it would be good to recreate it having 5.6 on board ?

If your /var/www/html/pub is not very large, I would tar the whole thing up (just to be safe). I would also do

 find /var/www/html/pub -mtime -2

just to see if any files have changed (for comparison later).
make a simple copy of the existing bootstrap.sh file
create a new bootstrap and then run the find again to what changed.

I -believe- the only thing that changes will be in /var/www/html/pub/bootstrap - but I am not positive.

This is diff between the new and old one:

2c2
< echo "Red Hat Satellite Server Client bootstrap script v4.0"
---
> echo "RHN Satellite Server Client bootstrap script v4.0"
9,10c9,10
< #   (1) centrally, from the Red Hat Satellite Server via ssh (i.e., from the
< #       Red Hat Satellite Server):
---
> #   (1) centrally, from the RHN Satellite Server via ssh (i.e., from the
> #       RHN Satellite Server):
23c23
< #   way to register machines to your Red Hat Satellite Server. Since "wget" is used
---
> #   way to register machines to your RHN Satellite Server. Since "wget" is used
35c35
< #   Red Hat Satellite or hosted web user interface).
---
> #   RHN Satellite or hosted web user interface).
47c47
< echo "of an Red Hat Satellite, the ACTIVATION_KEYS, and ORG_GPG_KEY values will"
---
> echo "of an RHN Satellite, the ACTIVATION_KEYS, and ORG_GPG_KEY values will"
71c71
< exit 1
---
> #exit 1
75c75
< ACTIVATION_KEYS=
---
> ACTIVATION_KEYS=1-ourkey
93c93
< FULLY_UPDATE_THIS_BOX=1
---
> FULLY_UPDATE_THIS_BOX=0
195c195
<     rpm -Uvh --force --replacefiles --replacepkgs ${HTTP_PUB_DIRECTORY}/${ORG_CA_CERT}
---
>     rpm -Uvh --force --replacefiles --replacepkgs ${HTTPS_PUB_DIRECTORY}/${ORG_CA_CERT}
198c198
<     $FETCH ${HTTP_PUB_DIRECTORY}/${ORG_CA_CERT}
---
>     $FETCH ${HTTPS_PUB_DIRECTORY}/${ORG_CA_CERT}
217c217
< # Should have created an activation key or keys on the Red Hat Satellite Server's
---
> # Should have created an activation key or keys on the RHN Satellite Server's
353c353
<         echo "Error updating system info in Red Hat Satellite."
---
>         echo "Error updating system info in RHN Satellite."
364c364
<         echo "Error updating system info in Red Hat Satellite."
---
>         echo "Error updating system info in RHN Satellite."

It seems that it doesn't change a lot ...

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.