[Pkg-iscsi-maintainers] Bug#698757: python-rtslib: list_eth_names fails with 32-bit userland on 64-bit kernel

Rogier rogier777 at gmail.com
Thu Jan 24 10:28:31 UTC 2013


Package: python-rtslib
Severity: normal

Dear Maintainer,

My nas is running a 64-bit kernel with a 32-bit userland environment.
When trying to add an IP address to a portal, it fails with a python
traceback, and the complaint that I should specify a valid interface name.

I have done some investigation, and I traced the problem to the fact
that list_eth_names uses the architecture from uname to determine
the kind of kernel interface, and that uname reports x86_64, because
the kernel is 64 bit.

Below is a the targetcli output. It includes output from some instrumentation
I added to aid in diagnosing the problem.

Kind regards,

Rogier.

targetcli output:
------------------------------------------------------------
/iscsi/iqn.20...tpgt1/portals> create 192.168.4.96
Using default IP port 3260
list_eth_ips: interfaces requested:None
list_eth_names: uname: x86_64; offset is: 40
list_eth_names: interface list assuming a 32-bit environment: ['lo', 'eth0', 'eth1']
list_eth_names: interface list assuming a 64-bit environment: ['lo', '', '\x02']
list_eth_ips: interface list:['', '\x02']
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 983, in run_interactive
    self._cli_loop()
  File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 806, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 927, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line 902, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_node.py", line 85, in execute_command
    pparams, kparams)
  File "/usr/lib/python2.7/dist-packages/configshell/node.py", line 1405, in execute_command
    result = method(*pparams, **kparams)
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_target.py", line 918, in ui_command_create
    elif ip_address not in utils.list_eth_ips():
  File "/usr/lib/python2.7/dist-packages/rtslib/utils.py", line 706, in list_eth_ips
    ifaddresses = netifaces.ifaddresses(iface)
ValueError: You must specify a valid interface name.
/iscsi/iqn.20...tpgt1/portals> 

------------------------------------------------------------

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



More information about the Pkg-iscsi-maintainers mailing list