|
Bugzilla – Full Text Bug Listing |
| Summary: | YaST2 iscsi-client: iscsi initiator uses deprecated ifconfig | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Distribution | Reporter: | Per Jessen <per> |
| Component: | YaST2 | Assignee: | YaST Team <yast-internal> |
| Status: | CONFIRMED --- | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | lduncan |
| Version: | Leap 15.5 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| URL: | https://trello.com/c/gdwdXHCg | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Per Jessen
2023-09-22 15:03:01 UTC
AFAIK it doesn't do much with the 'ifconfig' command, it just uses it to figure out the interface device name and maybe the current IP address. It should be fairly easy to migrate that to the 'ip' command. Moving to our Trello task queue. Relevant code: https://github.com/yast/yast-iscsi-client/blob/SLE-15-SP6/src/modules/IscsiClientLib.rb#L1784-L1807 This comes down to calling 'ifconfig <interface-name>' and then filtering out a line with 'inet addr:', i.e. the equivalent of ifconfig eth0 | grep 'inet addr:' which on every not-too-ancient SUSE Linux always returns nothing because the output format changed long ago: > %ifconfig br0 > br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > inet 192.168.178.2 netmask 255.255.255.0 broadcast 192.168.178.255 > inet6 fe80::1e6f:65ff:fe2c:92f7 prefixlen 64 scopeid 0x20<link> > inet6 2003:eb:af1d:f00:1e6f:65ff:fe2c:92f7 prefixlen 64 scopeid 0x0<global> > inet6 2003:eb:af1d:f00:366c:e49d:8ed5:af6e prefixlen 64 scopeid 0x0<global> > ether 1c:6f:65:2c:92:f7 txqueuelen 1000 (Ethernet) > RX packets 1165279 bytes 1484299539 (1.3 GiB) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 560775 bytes 77258742 (73.6 MiB) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 (On my Leap 15.5 where that interface is /dev/br0) It works on SLE-12 SP5, though: > eth0 Link encap:Ethernet HWaddr 00:16:3E:48:17:FF > inet addr:10.160.0.1 Bcast:10.160.255.255 Mask:255.255.0.0 > inet6 addr: fe80::216:3eff:fe48:17ff/64 Scope:Link > inet6 addr: fec0:0:0:ffff::2/64 Scope:Site > inet6 addr: 2620:113:80c0:8080:10:160:0:1/64 Scope:Global > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:1032577881 errors:0 dropped:54 overruns:0 frame:0 > TX packets:980188178 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:2198620121319 (2096767.5 Mb) TX bytes:370757248357 (353581.6 Mb) > % ifconfig eth0 | grep 'inet addr' > inet addr:10.160.0.1 Bcast:10.160.255.255 Mask:255.255.0.0 So either that information is not really needed (which I believe), or it never worked with any recent SLE-15 SPx / Leap 15.x (unlikely). And I guess there is no test-case or description in the code :) Cool (In reply to Stefan Hundhammer from comment #3) > So either that information is not really needed (which I believe), or it > never worked with any recent SLE-15 SPx / Leap 15.x (unlikely). I have not yet had any luck getting my offload interfaces to work - I keep getting told "Please set the iface.ipaddress for iface eth4-bnx2i, then retry the login command.". I have so far just edited /etc/iscsi/iface/eth4-bnx2i to set that address, but then I get stuck again. The issue with iscsiuio in bug#1215622 is the same in Leap 15.0, so I don't think this has worked since 15.0 at least. (In reply to Per Jessen from comment #5) > (In reply to Stefan Hundhammer from comment #3) > > So either that information is not really needed (which I believe), or it > > never worked with any recent SLE-15 SPx / Leap 15.x (unlikely). > > I have not yet had any luck getting my offload interfaces to work - I keep > getting told "Please set the iface.ipaddress for iface eth4-bnx2i, then > retry the login command.". Just a quick update - after having installed net-tools-deprecated and fixed the yast code, then cleared out my config and started over - now it works fine. I would suggest changing the code to use ip instead of ifconfig. Installing deprecated tools sounds like a good work around but not a solution. It could simply run: > ip addr show dev <NICNAME> | grep 'inet ' And remove the "/24" (width) from the IP address. Normal output looks like: > # ip addr show dev eth0 > 5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP > group default qlen 1000 > link/ether 10:65:30:bf:77:7d brd ff:ff:ff:ff:ff:ff > altname enp14s0u1u2 > inet 192.168.20.3/24 brd 192.168.20.255 scope global eth0 > valid_lft forever preferred_lft forever > inet6 fe80::1265:30ff:febf:777d/64 scope link > valid_lft forever preferred_lft forever And let's hope NICs continue to have an IPv4 address. :) |