Hide Forgot
Description of problem: When verifying bug 691417 I faced problem with spacewalk-koan after provisioning a system. I ran rhn_check -vv to apply kickstart and it failed when running find_ip(device) from /usr/share/rhn/spacewalkkoan/spacewalkkoan.py. It is caused due to supporting only english locale of system, so on all other localized systems this will fail. line 51: def find_ip(device): return execute("ifconfig %s | perl -lne '/inet addr:([\d.]+)/ and print $1'" % device)[0] ifconfig on english system: inet addr:xxx.xxx.xxx.xxx ifconfig on german system: inet Adresse:xxx.xxx.xxx.xxx ifconfig on czech system: inet adr:xxx.xxx.xxx.xxx line 48: def find_netmask(device): return execute("ifconfig %s | perl -lne '/Mask:([\d.]+)/ and print $1'" % device)[0] ifconfig on english system: Mask:xxx.xxx.xxx.xxx ifconfig on german system: Maske:xxx.xxx.xxx.xxx ifconfig on czech system: Maska:xxx.xxx.xxx.xxx Version-Release number of selected component (if applicable): spacewalk-koan-0.2.7-7 How reproducible: always (on lozalized systems) Steps to Reproduce: 1. in RHN Satellite: Systems -> [select system] -> Provisioning -> [select kickstart] -> Advanced Configuration -> Network Connection: Use static interface [select interface] -> Schedule Kickstart and Finish 2. on client machine: rhn_check -vv to apply this kickstart 3. kickstart applying failed Actual results: initiating spacewalkkoan kickstart Preserve files! : [] exceptions.IndexError list index out of range File "/usr/share/rhn/spacewalkkoan/spacewalkkoan.py", line 100, in initiate update_static_device_records(kickstart_host, static_device) File "/usr/share/rhn/spacewalkkoan/spacewalkkoan.py", line 74, in update_static_device_records data = {"gateway": find_gateway(),\ File "/usr/share/rhn/spacewalkkoan/spacewalkkoan.py", line 52, in find_ip return execute("ifconfig %s | perl -lne '/inet addr:([\d.]+)/ and print $1'" % device)[0] Expected results: kickstart is applied Additional info:
rhn_check -vv should be ran on localized system For example: LC_ALL=de_DE.utf8 LANG=de_DE rhn_check -vv
spacewalk.git master: 316724c82f28664057581b816e4a0422a927855b satellite.git SATELLITE-5.4: 25d95f018e9b96c5a6a4dc3d4cdf6ecbf384e1eb
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: A bug in spacewalk-koan code. Consequence: spacewalk-koan would incorrectly determine IP address of a system using other than English locale. Fix: Simple. Result: With non English locale, IP address is parsed and determined correctly.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,7 +1 @@ -Cause: A bug in spacewalk-koan code. +Prior to this update, the spacewalk-koan package was unable to determine the IP address of a system that was using a non-English locale. Consequent to this, an attempt to perform kickstart installation on such a system would fail with a traceback. This update applies a patch that ensures that IP addresses can now be determined on all systems regardless of their current locale.- -Consequence: spacewalk-koan would incorrectly determine IP address of a system using other than English locale. - -Fix: Simple. - -Result: With non English locale, IP address is parsed and determined correctly.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1331.html
*** Bug 686702 has been marked as a duplicate of this bug. ***