Re: [PATCH] Write ARP=0 to ifcfg file when VSWITCH=1 is set on s390x (#561926).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 4 Feb 2010, Steffen Maier wrote:

Objection.

[Assuming ARP=0 means ARP=no]

If it's interpreted by /sbin/ip that way.  The $ARP value is used in
/etc/sysconfig/network-scripts/ifup-eth

For a long time I have been fighting to convince not to mess with the
ARP flag for qeth devices (or probably any s390 network device type in
general):
https://www.redhat.com/archives/anaconda-devel-list/2009-July/msg00062.html

AFAIK, VSWITCH has always been an option only understood by
linuxrc.s390, i.e. for parm/conf files but NOT for ifcfg. It was just a
hack with regard to the MAC address question for layer2 devices. If
these are virtual devices provided by z/VM, then the hypervisor assigns
unique virtual MAC addresses and the user does not need to provide his
own MAC.

I know VSWITCH is not used in the ifcfg files.  I know it was only used by
linuxrc.s390, however I was keying on VSWITCH=1 to determine whether or not to
write ARP=0 because that was the thing that changed between the working and
non-working configurations I was shown.

Also VSWITCH is neither a required nor a sufficient indicator that such
device is really and only virtual, since the user can set VSWITCH more
or less as he likes.

Then what is?  It's read in linuxrc.s390 and used there.

BTW, we are about to post an update to bug 546005 that for s390 network
devices we should never write HWADDR to ifcfg since there are device
types besides layer2 real OSA, which can come up with different MACs on
boot and thus HWADDR matching breaks, as mentioned in the initial
comment there.

This sort of information would be nice to know rather than dealing with it in
a reactive/damage-control manner.

I would like to see more information about bug 561926 in order to come
up with a real fix.

Then take ownership of the bug.  The patch below was tested by the original
reporter using the latest nightly and network came up on reboot after
installation.

ifup-eth would have run:
    /sbin/ip link set dev eth0

With ARP=0 because toggle_value() in network-functions throws out the 0 value
and drops the 'arp' $1 parameter in the call.  So what actually happens from
that ip call is probably what really needs to happen, and it's a side effect
of ARP=0.  I imagine ARP=no would have be invalid.


On another note, there are a lot of s390 bugs open for RHEL-6 and it would be
helpful to have you actually contribute more than huge email replies to these
things.  You rewrote linuxrc.s390 and then your contributions went to lengthy
email replies and Bugzilla posts.  If you're posting these replies, patch
contributions would be far more useful.

On 02/04/2010 06:44 PM, David Cantrell wrote:
When using LAYER2=1 VSWITCH=1 in your CMS conf file on s390x, the ifcfg
file written by anaconda will result in a non-working network connection
on reboot after installation.  When LAYER2=1, we already prevent writing
of the HWADDR to the ifcfg file, but when VSWITCH=1, we need to write
ARP=0 to the ifcfg file as well.

Make sure to carry over VSWITCH in linuxrc.s390, but also make sure we
don't write it to the final ifcfg file on the target system.
---
 loader/linuxrc.s390 |    1 +
 network.py          |   13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index c862a84..82a741c 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -3040,6 +3040,7 @@ fi
 [ "$PORTNAME" != "" ] && echo "PORTNAME=$PORTNAME" >> $IFCFGFILE
 [ "$CTCPROT" != "" ] && echo "CTCPROT=$CTCPROT" >> $IFCFGFILE
 [ "$MACADDR" != "" ] && echo "MACADDR=$MACADDR" >> $IFCFGFILE
+[ "$VSWITCH" != "" ] && echo "VSWITCH=$VSWITCH" >> $IFCFGFILE
 optstr=""
 for option in LAYER2 PORTNO; do
     [ -z "${!option}" ] && continue
diff --git a/network.py b/network.py
index 2fabff1..bb8ca09 100644
--- a/network.py
+++ b/network.py
@@ -244,9 +244,16 @@ class NetworkDevice(SimpleConfigFile):
             keys.remove("DESC")
         if "KEY" in keys:
             keys.remove("KEY")
-        if iutil.isS390() and ("OPTIONS" in keys) and ("HWADDR" in keys) and \
-           (self.info["OPTIONS"].find("layer2=1") != -1):
-            keys.remove("HWADDR")
+        if iutil.isS390() and ("OPTIONS" in keys):
+            if self.info["OPTIONS"].find("layer2=1") != -1:
+                if "HWADDR" in keys:
+                    keys.remove("HWADDR")
+
+                if ("VSWITCH" in keys) and (self.info["VSWITCH"] == "1"):
+                    keys.append("ARP")
+                    self.info["ARP"] = "0"
+        if "VSWITCH" in keys:
+            keys.remove("VSWITCH")

         for key in keys:
             if (key == 'NAME') or \

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAktrK4AACgkQ5hsjjIy1Vkk7UwCfVCnJJHe3pnVj7kg6dQoJ8Fn/
N2AAoMqy5DOiF8GZB2hg4ONt/JLZ90jI
=W09S
-----END PGP SIGNATURE-----
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux