Author: mzugec Date: Mon Nov 23 13:31:03 2009 New Revision: 59698 URL: http://svn.opensuse.org/viewcvs/yast?rev=59698&view=rev Log: exclude nfsroot devices from bridged slaves (bnc#557688) Modified: trunk/network/VERSION trunk/network/package/yast2-network.changes trunk/network/src/lan/bridge.ycp trunk/network/src/modules/Lan.ycp Modified: trunk/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=59698&r1=59697&r2=59698&view=diff ============================================================================== --- trunk/network/VERSION (original) +++ trunk/network/VERSION Mon Nov 23 13:31:03 2009 @@ -1 +1 @@ -2.18.62 +2.18.63 Modified: trunk/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=59698&r1=59697&r2=59698&view=diff ============================================================================== --- trunk/network/package/yast2-network.changes (original) +++ trunk/network/package/yast2-network.changes Mon Nov 23 13:31:03 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Nov 23 13:32:59 CET 2009 - mzugec@suse.cz + +- exclude nfsroot devices from bridged slaves (bnc#557688) +- 2.18.63 + +------------------------------------------------------------------- Fri Nov 20 13:15:14 CET 2009 - mzugec@suse.de - fixed problem with not matching udev rule (bnc#551310) Modified: trunk/network/src/lan/bridge.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/bridge.ycp?rev=59698&r1=59697&r2=59698&view=diff ============================================================================== --- trunk/network/src/lan/bridge.ycp (original) +++ trunk/network/src/lan/bridge.ycp Mon Nov 23 13:31:03 2009 @@ -24,19 +24,23 @@ map <string, any> configurations = NetworkInterfaces::FilterDevices("netcard"); foreach(string devtype, splitstring(NetworkInterfaces::CardRegex["netcard"]:"", "|"), { // if (contains(["br", "vlan"], devtype)) continue; - if (contains(["br"], devtype)) continue; - if (contains(["tun", "tap"], devtype)) { - foreach(string devname, (list<string>) Map::Keys(configurations[devtype]:$[]), { + if (contains(["br"], devtype)) continue; + if (contains(["tun", "tap"], devtype)) { + foreach(string devname, (list<string>) Map::Keys(configurations[devtype]:$[]), { string description = NetworkInterfaces::GetDevTypeDescription(devtype, true); items = add (items, `item(`id(devname), sformat("%1 - %2",devname, description), contains(br_ports, devname)) ); - }); - continue; - } - foreach(string devname, (list<string>) Map::Keys(configurations[devtype]:$[]), { + }); + continue; + } + foreach(string devname, (list<string>) Map::Keys(configurations[devtype]:$[]), { + if ((string)configurations[devtype, devname, "STARTMODE"]:"" == "nfsroot") { + y2milestone("Exclude %1 from bridge slaves because of nfsroot.", devname); + continue; + } string description = sformat("%1%2", NetworkInterfaces::GetValue(devname, "NAME"), ((string)configurations[devtype, devname, "IPADDR"]:"" != "0.0.0.0") ? sformat(" (%1)", "configuration") : ""); items = add (items, `item(`id(devname), sformat("%1 - %2",devname, description), contains(br_ports, devname)) ); - }); + }); }); NetworkInterfaces::Select(old_name); UI::ChangeWidget(`id(key), `Items, items); Modified: trunk/network/src/modules/Lan.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/Lan.ycp?rev=59698&r1=59697&r2=59698&view=diff ============================================================================== --- trunk/network/src/modules/Lan.ycp (original) +++ trunk/network/src/modules/Lan.ycp Mon Nov 23 13:31:03 2009 @@ -762,24 +762,6 @@ { y2milestone("Virtualization [xen|kvm|qemu|virtualbox-ose] detected - will propose virtualization network"); // in case of virtualization use special proposal - // first configure all connected unconfigured devices with dhcp (with default parameters) - foreach (integer number, any lanitem, LanItems::Items, { - if (hasAnyValue(((map)lanitem)["hwinfo", "dev_name"]:"")) { - LanItems::current = number; - boolean valid = LanItems::getCurrentItem()["hwinfo", "link"]:false == true; - if (!valid) y2warning("item number %1 has link:false detected", number); - // don't propose WLAN interface (bnc#450670) - else if (LanItems::getCurrentItem()["hwinfo", "type"]:""=="wlan"){ - y2warning("not proposing WLAN interface"); - valid = false; - } - if (!LanItems::IsItemConfigured() && valid){ - y2milestone("Not configured - start proposing"); - LanItems::ProposeItem(); - } - } - }); - // collect all interfaces that will be skipped from bridged proposal list<string> skipped = []; foreach(integer current, any config, LanItems::Items, { @@ -800,9 +782,31 @@ if(size(slave)>0) skipped=add(skipped, slave); }); } + if (NetworkInterfaces::GetValue(ifcfg, "STARTMODE")=="nfsroot"){ + y2milestone("Skipped %1 interface from bridge slaves because of nfsroot.", ifcfg); + skipped=add(skipped, ifcfg); + } }); y2milestone("Skipped interfaces : %1", skipped); + // configure all connected unconfigured devices with dhcp (with default parameters) + foreach (integer number, any lanitem, LanItems::Items, { + if (hasAnyValue(((map)lanitem)["hwinfo", "dev_name"]:"")) { + LanItems::current = number; + boolean valid = LanItems::getCurrentItem()["hwinfo", "link"]:false == true; + if (!valid) y2warning("item number %1 has link:false detected", number); + // don't propose WLAN interface (bnc#450670) + else if (LanItems::getCurrentItem()["hwinfo", "type"]:""=="wlan"){ + y2warning("not proposing WLAN interface"); + valid = false; + } + if (!LanItems::IsItemConfigured() && valid && !contains(skipped, LanItems::getCurrentItem()["hwinfo", "dev_name"]:"")){ + y2milestone("Not configured - start proposing"); + LanItems::ProposeItem(); + } + } + }); + // then each configuration (except bridges) move to the bridge // and add old device name into bridge_ports foreach(integer current, any config, LanItems::Items, { @@ -858,10 +862,11 @@ // remove description - will be replaced by new (real) one NetworkInterfaces::Current=remove(NetworkInterfaces::Current, "NAME"); if( NetworkInterfaces::Commit() ){ + NetworkInterfaces::Add(); NetworkInterfaces::Edit(ifcfg); old_config["BOOTPROTO"]="static"; old_config["IPADDR"]="0.0.0.0/32"; - y2debug("Old Config with apllied changes %1\n%2", ifcfg, old_config); + y2milestone("Old Config with apllied changes %1\n%2", ifcfg, old_config); NetworkInterfaces::Current = old_config; NetworkInterfaces::Commit(); @@ -871,8 +876,6 @@ y2internal("List %1", NetworkInterfaces::List("")); // re-read configuration to see new items in UI LanItems::Read(); - } else y2error("error while porting bonding configuration for %1", ifcfg); - } } else y2warning("empty ifcfg"); }); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org