Bug 577034
Summary: | rhnreg_ks error during kickstart install | ||
---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Rhett <rhett.gibson> |
Component: | Clients | Assignee: | Milan Zázrivec <mzazrivec> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 0.8 | CC: | gerad.coles, jpazdziora, rhett.gibson, tlestach |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-07-25 17:24:50 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 723481 |
Description
Rhett
2010-03-25 22:08:47 UTC
Any news on this, or workarounds? We are having the same issue as this, using Spacewalk 1.0 deployed on CentOS 5.4 x86. We are PXE booting/kickstarting CentOS 5.4 x86_64 with cobbler using Spacewalk to manage the kickstart. Some relevant snippets from kickstart file: repo --name=VT --baseurl=http://spacewalklab/ks/dist/CentOS-54-x86_64/VT key --skip repo --name=centos54-updates-x86_64 --baseurl=http://spacewalklab/ks/dist/child/centos54-updates-x86_64/CentOS-54-x86_64 repo --name=spacewalk-client-x86_64 --baseurl=http://spacewalklab/ks/dist/child/spacewalk-client-x86_64/CentOS-54-x86_64 repo --name=epel5-x86_64 --baseurl=http://spacewalklab/ks/dist/child/epel5-x86_64/CentOS-54-x86_64 %packages @ Base %post --nochroot mkdir /mnt/sysimage/tmp/ks-tree-copy if [ -d /oldtmp/ks-tree-shadow ]; then cp -fa /oldtmp/ks-tree-shadow/* /mnt/sysimage/tmp/ks-tree-copy elif [ -d /tmp/ks-tree-shadow ]; then cp -fa /tmp/ks-tree-shadow/* /mnt/sysimage/tmp/ks-tree-copy fi cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf cp -f /tmp/ks-pre.log /mnt/sysimage/root/ %post ( # Log %post errors # --Begin Spacewalk command section-- cat > /tmp/ssl-key-1 <<'EOF' Certificate: Data: ... EOF # ssl-key1 cat /tmp/ssl-key-* > /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT perl -npe 's/RHNS-CA-CERT/RHN-ORG-TRUSTED-SSL-CERT/g' -i /etc/sysconfig/rhn/* mkdir -p /tmp/rhn_rpms/optional cd /tmp/rhn_rpms/optional xml2-python-2.6.26-2.1.2.8.x86_64.rpm ional/libxml2-python* perl -npe 's|^(\s*serverURL\s*=\s*[^:]+://)[^/]*/|1spacewalklab/|' -i /etc/sysconfig/rhn/up2date mkdir -p /etc/sysconfig/rhn/allowed-actions/script touch /etc/sysconfig/rhn/allowed-actions/script/all mkdir -p /etc/sysconfig/rhn/allowed-actions/configfiles touch /etc/sysconfig/rhn/allowed-actions/configfiles/all # now copy from the ks-tree we saved in the non-chroot checkout cp -fav /tmp/ks-tree-copy/* / rm -Rf /tmp/ks-tree-copy # --End Spacewalk command section-- /etc/init.d/messagebus restart /etc/init.d/haldaemon restart # begin cobbler snippet # begin Red Hat management server registration mkdir -p /usr/share/rhn/ wget http://spacewalklab/pub/RHN-ORG-TRUSTED-SSL-CERT -O /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT perl -npe 's/RHNS-CA-CERT/RHN-ORG-TRUSTED-SSL-CERT/g' -i /etc/sysconfig/rhn/* a192f0c18438a2cfedb01bfb11418cbf # end Red Hat management server registration # end cobbler snippet rhn_check ) >> /root/ks-post.log 2>&1 In the ks-post.log file, we see this: ... cp: cannot stat `/tmp/ks-tree-copy/*': No such file or directory ... Traceback (most recent call last): File "/usr/sbin/rhnreg_ks", line 31, in ? from up2date_client import rhnreg File "/usr/share/rhn/up2date_client/rhnreg.py", line 20, in ? import hardware File "/usr/share/rhn/up2date_client/hardware.py", line 32, in ? import dmidecode ImportError: No module named dmidecode ERROR: unable to read system id. python-dmidecode is in the EPEL repo that is specified in the kickstart. If I try adding that package to the list of packages; however, Anaconda complains that the package is missing in the early part of the install, so I can't get that workaround working (I guess since python-dmidecode is not part of the cobbler CentOS ISO image). I also have tried installing python-dmidecode with a wget/rpm -Uhv combo in the post scripts, but the post scripts are added too late in the KS to get python-dmidecode installed before rhnreg_ks is run. And pre doesn't seem to be a working option since we aren't actually running in the installed OS yet. Any help or workarounds would be very appreciated. I managed to figure out a workaround for this. On the spacewalk server, I edited the file /var/lib/cobbler/snippets/redhat_register, adding the following to the beginning of the script: mkdir -p /tmp/rhn_rpms/optional cd /tmp/rhn_rpms/optional wget -P /tmp/rhn_rpms/optional http://$redhat_management_server/download/package/abe601bb2cffbd5ac574e6b567ae7183303a22bf/1273894368985/1/4534/python-dmidecode-3.10.7-3.el5.x86_64.rpm rpm -Uvh --replacepkgs --replacefiles /tmp/rhn_rpms/optional/python-dmidecode-3.10.7-3.el5.x86_64.rpm Thus, the python-dmidecode plugin would be installed prior to the rhnreg_ks command being run. This is a nasty hack but at least it works. Note that this solution is particularly bad since the URL that I supplied in the kickstart changes every time the EPEL repository updates (since the path is based on an md5sum). Could someone test this: mkdir -p /tmp/rhn_rpms/optional cd /tmp/rhn_rpms/optional wget -P /tmp/rhn_rpms/optional https://$redhat_management_server/pub/python-dmidecode-latest.el5.x86_64.rpm --no-check-certificate rpm -Uvh --replacepkgs --replacefiles /tmp/rhn_rpms/optional/python-dmidecode-latest.el5.x86_64.rpm Mass-aligning under space12, so that we don't lose track of this bugzilla. This however does not mean that we plan (will be able to) address this bug in Spacewalk 1.2. Mass-moving to space13. There's not the python-dmidecode dependency issue any more in current nightly. Moving to MODIFIED. We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5. We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5. Aligning under space16. The python-dmidecode is now required by rhn-client-tools, from version 0.8.1-1, and this change is also in RHEL, see bug 546312. Therefore, I believe the issue was address, and I'm closing this bugzilla as such. Please reopen if you disagree. |