Bug 736066 - spacewalk-koan fails on localized systems
spacewalk-koan fails on localized systems
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
541
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Milan Zazrivec
Jiří Mikulka
:
: 686702 (view as bug list)
Depends On:
Blocks: sat541-triage
  Show dependency treegraph
 
Reported: 2011-09-06 10:54 EDT by Jiří Mikulka
Modified: 2014-10-06 09:46 EDT (History)
3 users (show)

See Also:
Fixed In Version: spacewalk-koan-0.2.7-9
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-09-22 06:34:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jiří Mikulka 2011-09-06 10:54:58 EDT
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:
Comment 1 Jiří Mikulka 2011-09-06 10:56:29 EDT
rhn_check -vv should be ran on localized system

For example:
LC_ALL=de_DE.utf8
LANG=de_DE
rhn_check -vv
Comment 5 Milan Zazrivec 2011-09-07 04:57:34 EDT
spacewalk.git master: 316724c82f28664057581b816e4a0422a927855b
satellite.git SATELLITE-5.4: 25d95f018e9b96c5a6a4dc3d4cdf6ecbf384e1eb
Comment 7 Milan Zazrivec 2011-09-07 05:12:51 EDT
    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.
Comment 8 Jaromir Hradilek 2011-09-07 08:10:38 EDT
    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.
Comment 10 errata-xmlrpc 2011-09-22 06:34:42 EDT
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
Comment 11 Andreas Bleischwitz 2011-09-26 11:30:26 EDT
*** Bug 686702 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.