Description of problem: I consistently have an error with the dmidecode section while trying to perform a fresh kickstart install of a client machine. Version-Release number of selected component (if applicable): Spacewalk 0.8 Server How reproducible: Use PXE Boot to install new system using Kickstart Steps to Reproduce: 1. Use CentOS 5.4 Install on Spacewalk 0.8 server 2. Kickstart using PXE Boot 3. Pertains to rhn-setup-0.8.12-1.el5 Actual results: FINISHED --2010-03-25 16:43:15-- Downloaded: 3 files, 900K in 0.8s (1.17 MB/s) Preparing... ################################################## pyOpenSSL ################################################## rhnlib ################################################## libxml2-python ################################################## cp: cannot stat `/tmp/ks-tree-copy/*': No such file or directory Stopping system message bus: [FAILED] Starting system message bus: [ OK ] Stopping HAL daemon: [FAILED] Starting HAL daemon: [ OK ] --2010-03-25 16:43:21-- http://atl.spacewalk.hidinc.com/pub/RHN-ORG-TRUSTED-SSL-CERT Resolving atl.spacewalk.hidinc.com... 192.168.1.147 Connecting to atl.spacewalk.hidinc.com|192.168.1.147|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5476 (5.3K) [text/plain] Saving to: `/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT' 0K ..... 100% 623K=0.009s 2010-03-25 16:43:21 (623 KB/s) - `/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT' saved [5476/5476] 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 21, in ? import hardware File "/usr/share/rhn/up2date_client/hardware.py", line 35, in ? import dmidecode ImportError: No module named dmidecode ERROR: unable to read system id. Expected results: The kickstart script fails to perform any of the post steps after the rhnreg_ks step fails. Additional info:
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.
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.