[Spacewalk-list] Issues with kickstarted systems.

William H. ten Bensel WHTENBEN at up.com
Thu Jun 8 17:29:12 UTC 2017


The registration issues, during kickstart and manual, are related... The 
registration failure is caused by the kickstart script, "Registration and 
server actions"  as it does not do dependency checks when doing the 
following command:
rpm -Uvh --replacepkgs --replacefiles /tmp/rhn_rpms/optional/pyOpenSSL* 
/tmp/rhn_rpms/optional/rhnlib* /tmp/rhn_rpms/optional/libxml2-python* 
/tmp/rhn_rpms/optional/libxml2* 

I had the same exact problem (
https://www.redhat.com/archives/spacewalk-list/2015-November/msg00130.html
) and the following scripts were the only way that I could figure it out.  
 

Hope this helps...

- Thanks and good luck


Systems -> kickstart -> profile -> name -> Scripts -> 

The following script needs to come BEFORE "Registration and server actions
"

Script Name: FIX_REGISTRATION_BUG
Script Execution Time: Post Script
nochroot (YES, checked)
Template(YES, checked)

Script Contents:  ( I created a snippet, because I use it in ALL of my 
kickstarts).
$SNIPPET('spacewalk/1/FIX_REGISTRATION_BUG')

Contents of snippet:

if [ -f /mnt/sysimage/bin/rpm ]; then
                 mv -f /mnt/sysimage/bin/rpm /mnt/sysimage/bin/origrpm
                 echo '#!/bin/bash' > /mnt/sysimage/bin/rpm
                 echo '#This script is to prevent newer versions of rhn, 
libxml, pyOpenSSL from being installed' >> /mnt/sysimage/bin/rpm
                 echo '#Hack around 
https://bugzilla.redhat.com/show_bug.cgi?id=1280167' >> 
/mnt/sysimage/bin/rpm
                 echo '#The post nochroot script, will mv 
/mnt/sysimage/bin/rpm to /mnt/sysimage/bin/origrpm and add the following 
to rpm' >> /mnt/sysimage/bin/rpm
                 echo '#Then in the first post snippet, mv -f /bin/origrpm 
/bin/rpm.' >> /mnt/sysimage/bin/rpm
                 echo ' ' >> /mnt/sysimage/bin/rpm
                 echo 'if [[ "$@" =~ "Uvh" ]]; then' >> 
/mnt/sysimage/bin/rpm
                 echo '    echo "Not installing \"$@\""' >> 
/mnt/sysimage/bin/rpm
                 echo 'else' >> /mnt/sysimage/bin/rpm
                 echo '    isLinux7=`grep "release 7" 
/etc/redhat-release`' >> /mnt/sysimage/bin/rpm
                 echo '    if [[ "$@" =~ "--import" ]] && [[ -n 
"$isLinux7" ]]; then' >> /mnt/sysimage/bin/rpm
                 echo '            /bin/rpmkeys "$@"' >> 
/mnt/sysimage/bin/rpm
                 echo '    else' >> /mnt/sysimage/bin/rpm
                 echo '        /bin/origrpm "$@"' >> /mnt/sysimage/bin/rpm
                 echo '    fi' >> /mnt/sysimage/bin/rpm
                 echo 'fi' >> /mnt/sysimage/bin/rpm
                 chmod 755 /mnt/sysimage/bin/rpm
                 which rpm
fi


The following script needs to come AFTER "Registration and server actions"

Script Name: RESTORE_RPM
Script Execution Time: Post Script
Template(YES, checked)

Script Contents:  ( I created a snippet, because I use it in ALL of my 
kickstarts).
$SNIPPET('spacewalk/1/RESTORE_RPM')


Contents of snippet:

# https://bugzilla.redhat.com/show_bug.cgi?id=1280167
# changing back from FIX_REGISTRATION_BUG Snippet
if [ -f /bin/origrpm ]; then
    mv -f /bin/origrpm /bin/rpm
    echo "moved rpm back"
fi







From:   "Ames, Justin" <james at guardianresearch.org>
To:     "'spacewalk-list at redhat.com'" <spacewalk-list at redhat.com>
Date:   06/08/2017 11:48 AM
Subject:        [Spacewalk-list] Issues with kickstarted systems.
Sent by:        spacewalk-list-bounces at redhat.com



This email originated from outside of the company. Please use discretion 
if opening attachments or clicking on links. 
I am having issues with my kickstarted CentOS systems. First they do not 
register due to the change from pune to puny between the rhntools in the 
CentOS 7.3 base. Then when I do register them, I get:
Could not retrieve action item from server <RetryServer for 
spacewalk.grn.lan/XMLRPC>
Error code: 1While running 'queue.get': caught
<type 'exceptions.TypeError'> : ipaddr() takes exactly 1 argument (2 
given)
 
After that I also get it when I run rhn_check.
 
Anyone have any ideas were to look to see what is happening?
 
Thanks,
 
Justin Ames, RHCSA
 
 This email originated from outside of the company.  Please use discretion 
if opening attachments or clicking on links.

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list



**

This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20170608/7534e48d/attachment.htm>


More information about the Spacewalk-list mailing list