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

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



Objection.

[Assuming ARP=0 means ARP=no]
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.
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.

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.

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

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



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