Hello community, here is the log from the commit of package yast2-fcoe-client for openSUSE:Factory checked in at Tue Sep 27 16:15:31 CEST 2011.
-------- --- yast2-fcoe-client/yast2-fcoe-client.changes 2011-09-19 14:35:07.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-fcoe-client/yast2-fcoe-client.changes 2011-09-22 14:02:15.000000000 +0200 @@ -1,0 +2,8 @@ +Thu Sep 22 13:48:10 CEST 2011 - [email protected] + +- Several improvements (add 'Remove Interface', allow to change + settings before creating FCoE interface, respect AUTO_VLAN) and + bug-fixes (bnc #705171, bnc #705610, bnc #692403, bnc #710390) +- 2.21.7 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-fcoe-client-2.21.6.tar.bz2 New: ---- yast2-fcoe-client-2.21.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-fcoe-client.spec ++++++ --- /var/tmp/diff_new_pack.9jh9rE/_old 2011-09-27 16:15:27.000000000 +0200 +++ /var/tmp/diff_new_pack.9jh9rE/_new 2011-09-27 16:15:27.000000000 +0200 @@ -19,19 +19,20 @@ Name: yast2-fcoe-client -Version: 2.21.6 +Version: 2.21.7 Release: 0 License: GPL Group: System/YaST + BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-fcoe-client-2.21.6.tar.bz2 +Source0: yast2-fcoe-client-%{version}.tar.bz2 Prefix: /usr Requires: yast2 BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite -BuildArch: noarch +BuildArchitectures: noarch Summary: Configuration of fcoe-client @@ -40,7 +41,7 @@ Ethernet (FCoE) configuration. %prep -%setup -n yast2-fcoe-client-2.21.6 +%setup -n yast2-fcoe-client-%{version} %build %{prefix}/bin/y2tool y2autoconf @@ -64,6 +65,7 @@ %suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop} done + %clean rm -rf "$RPM_BUILD_ROOT" @@ -79,5 +81,3 @@ %dir /usr/share/YaST2/scrconf /usr/share/YaST2/scrconf/*.scr %doc %{prefix}/share/doc/packages/yast2-fcoe-client - -%changelog ++++++ yast2-fcoe-client-2.21.6.tar.bz2 -> yast2-fcoe-client-2.21.7.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/VERSION new/yast2-fcoe-client-2.21.7/VERSION --- old/yast2-fcoe-client-2.21.6/VERSION 2011-09-19 14:34:28.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/VERSION 2011-09-22 13:57:06.000000000 +0200 @@ -1 +1 @@ -2.21.6 +2.21.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/configure new/yast2-fcoe-client-2.21.7/configure --- old/yast2-fcoe-client-2.21.6/configure 2011-09-19 15:07:24.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/configure 2011-09-27 10:02:52.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for yast2-fcoe-client 2.21.6. +# Generated by GNU Autoconf 2.68 for yast2-fcoe-client 2.21.7. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -559,8 +559,8 @@ # Identity of this package. PACKAGE_NAME='yast2-fcoe-client' PACKAGE_TARNAME='yast2-fcoe-client' -PACKAGE_VERSION='2.21.6' -PACKAGE_STRING='yast2-fcoe-client 2.21.6' +PACKAGE_VERSION='2.21.7' +PACKAGE_STRING='yast2-fcoe-client 2.21.7' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1229,7 +1229,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-fcoe-client 2.21.6 to adapt to many kinds of systems. +\`configure' configures yast2-fcoe-client 2.21.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1301,7 +1301,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-fcoe-client 2.21.6:";; + short | recursive ) echo "Configuration of yast2-fcoe-client 2.21.7:";; esac cat <<\_ACEOF @@ -1381,7 +1381,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-fcoe-client configure 2.21.6 +yast2-fcoe-client configure 2.21.7 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1398,7 +1398,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-fcoe-client $as_me 2.21.6, which was +It was created by yast2-fcoe-client $as_me 2.21.7, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2328,7 +2328,7 @@ # Define the identity of the package. PACKAGE='yast2-fcoe-client' - VERSION='2.21.6' + VERSION='2.21.7' cat >>confdefs.h <<_ACEOF @@ -2450,7 +2450,7 @@ -VERSION="2.21.6" +VERSION="2.21.7" RPMNAME="yast2-fcoe-client" MAINTAINER="Gabriele Mohr <[email protected]>" @@ -3380,7 +3380,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-fcoe-client $as_me 2.21.6, which was +This file was extended by yast2-fcoe-client $as_me 2.21.7, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3433,7 +3433,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-fcoe-client config.status 2.21.6 +yast2-fcoe-client config.status 2.21.7 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/configure.in new/yast2-fcoe-client-2.21.7/configure.in --- old/yast2-fcoe-client-2.21.6/configure.in 2011-09-19 15:07:22.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/configure.in 2011-09-27 10:02:50.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-fcoe-client dnl -dnl -- This file is generated by y2autoconf 2.21.0 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.21.2 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-fcoe-client, 2.21.6, http://bugs.opensuse.org/, yast2-fcoe-client) +AC_INIT(yast2-fcoe-client, 2.21.7, http://bugs.opensuse.org/, yast2-fcoe-client) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.21.6" +VERSION="2.21.7" RPMNAME="yast2-fcoe-client" MAINTAINER="Gabriele Mohr <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/FcoeClient.ycp new/yast2-fcoe-client-2.21.7/src/FcoeClient.ycp --- old/yast2-fcoe-client-2.21.6/src/FcoeClient.ycp 2011-09-15 17:20:26.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/FcoeClient.ycp 2011-09-22 13:44:05.000000000 +0200 @@ -44,6 +44,7 @@ import "Popup"; import "Service"; import "NetworkService"; +import "String"; /** * Prototypes @@ -166,6 +167,7 @@ global boolean lldpad_started = false; // service fcoe was started global boolean fcoe_started = false; // service lldpad was started +global string ifcfg_file = ""; // Settings: Define all variables needed for configuration of fcoe-client @@ -286,11 +288,12 @@ global string GetVlanInterface( string interface ) { string vlan_interface = ""; - + map output = $[]; + // check whether there is a VLAN interface which is configured for FCoE string cmd_fcoe = sformat( "LANG=POSIX fipvlan %1", interface ); y2milestone( "Executing command: %1", cmd_fcoe ); - map output = (map)SCR::Execute( .target.bash_output, cmd_fcoe ); + output = (map)SCR::Execute( .target.bash_output, cmd_fcoe ); y2milestone( "Output: %1", output ); list <string> lines = splitstring( output["stdout"]:"", "\n" ); @@ -298,9 +301,9 @@ // check whether there is a line for the given interface, e.g. // eth3 | 200 | 00:0d:ec:a2:ef:00\n // and extract name/number of VLAN channel. - if ( regexpmatch( line, sformat( "^%1", interface) ) ) + if ( String::StartsWith( line, interface ) ) { - line = deletechars( line, " " ); + line = deletechars( line, " \t" ); vlan_interface = substring( line, findfirstof( line, "|" )+1, findlastof( line, "|" )-findfirstof( line, "|")-1 ); y2milestone( "VLAN: %1", vlan_interface ); @@ -345,77 +348,124 @@ } // -// Get status of FCoE and DCB from /etc/fcoe/cfg-eth<vlan_device_name> +// Create /etc/fcoe/cfg-<if> or /etc/fcoe/cfg-<if>.<vlan> +// (depending on AUTO_VLAN setting) // -global map <string, string> GetFCoEStatus( string vlan_device_name ) +global void CreateFcoeConfig( string vlan_device_name, map netcard ) { - map <string, string> status_map = $[]; - string content = ""; + string file_name = ""; + boolean file_exists = false; - if ( vlan_device_name != "") + // if AUTO_VLAN is set to "yes" + if ( netcard["auto_vlan"]:"no" == "yes" ) { - // fcoemon reads values from /etc/fcoe/cfg-<vlan-interface> - string file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name ); - y2milestone( "VLAN channel %1 found, reading %2", vlan_device_name, file_name ); - content = (string)SCR::Read(.target.string, file_name); - - if ( content == "" || content == nil ) - { - y2milestone( "Cannot read cfg-file - creating %1 with default values from /etc/fcoe/cfg-ethx", - file_name ); - string def_values = (string)SCR::Read( .target.string, "/etc/fcoe/cfg-ethx" ); + // set file name to cfg-<interface>, e.g. /etc/fcoe/eth3 + file_name = sformat( "/etc/fcoe/cfg-%1", netcard["dev_name"]:"" ); + } + else + { + // set file name to cfg-<vlan_device_name>, e.g. /etc/fcoe/eth3.200 + file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name ); + } + + // read default values + string content = (string)SCR::Read( .target.string, "/etc/fcoe/cfg-ethx" ); - if ( def_values != "" && def_values != nil ) - { - boolean ret = SCR::Write( .target.string, file_name, def_values ); - if ( ret == true ) + // and prepare content + if ( content != "" && content != nil ) + { + list <string> lines = (list<string>)splitstring( content, "\n" ); + lines = maplist( string line, lines, { + if ( !String::StartsWith( line, "#" ) ) line = deletechars( line, " \t" ); + + if ( String::StartsWith( line, "AUTO_VLAN" ) ) { - list <string> lines = splitstring( def_values, "\n" ); - foreach( string line, (list<string>)lines, { - if ( regexpmatch( line, "^FCOE_ENABLE" ) ) - { - status_map = add( status_map, "FCOE_ENABLE", deletechars( substring(line, 12), "\"") ); - } - if ( regexpmatch( line, "^DCB_REQUIRED" ) ) - { - status_map = add( status_map, "DCB_REQUIRED", deletechars( substring( line, 13 ),"\"") ); - } - }); - status_map = add( status_map, "Filename", file_name ); - AddRevertCommand( sformat( "rm %1", file_name ) ); + return sformat( "AUTO_VLAN=\"%1\"", netcard["auto_vlan"]:"no" ); + } + else if ( String::StartsWith( line, "DCB_REQUIRED" ) ) + { + return sformat( "DCB_REQUIRED=\"%1\"", netcard["dcb_required"]:"no" ); + } + else if ( String::StartsWith( line, "FCOE_ENABLE" ) ) + { + return sformat( "FCOE_ENABLE=\"%1\"", netcard["fcoe_enable"]:"yes" ); } else { - y2error( "Cannot create %1", file_name ); + return line; } - } - else - { - y2error( "Cannot read /etc/fcoe/cfg-ethx" ); - } - return status_map; + }); + content = mergestring( lines, "\n" ); + y2milestone( "Writing content: %1", content ); + + file_exists = SCR::Write( .target.string, file_name, content ); + + if ( file_exists ) + { + AddRevertCommand( sformat( "rm %1", file_name ) ); } else { - y2milestone( "Content: %1", content ); + y2error( "Cannot create %1", file_name ); } - + } + else + { + y2error( "Cannot read /etc/fcoe/cfg-ethx" ); + } +} + +// +// Get status of FCoE config from /etc/fcoe/cfg-<if>.<vlan> or /etc/fcoe/cfg-<if> +// +global map <string, string> GetFcoeStatus( string vlan_device_name, map netcard ) +{ + map <string, string> status_map = $[]; + string content = ""; + boolean file_exists = false; + string file_name = ""; + + if ( vlan_device_name == "" ) + { + y2error( "Interface not valid" ); + return $[]; + } + + y2milestone( "VLAN channel %1 found", vlan_device_name ); + + file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name ); + y2milestone( "Reading %1", file_name ); + content = (string)SCR::Read(.target.string, file_name); + + if ( content == "" || content == nil ) + { + // try to read /etc/fcoe/cfg-<interface> (interface was automatically created) + file_name = sformat( "/etc/fcoe/cfg-%1", netcard["dev_name"]:"" ); + y2milestone( "Reading %1", file_name ); + content = (string)SCR::Read(.target.string, file_name); + } + + if ( content != "" ) + { list <string> lines = splitstring( content, "\n" ); foreach( string line, (list<string>)lines, { - if ( regexpmatch( line, "^FCOE_ENABLE" ) ) - { - status_map = add( status_map, "FCOE_ENABLE", deletechars( substring(line, 12), "\"") ); - } - if ( regexpmatch( line, "^DCB_REQUIRED" ) ) - { - status_map = add( status_map, "DCB_REQUIRED", deletechars( substring( line, 13 ),"\"") ); - } + line = deletechars( line, " \t" ); + foreach( string var, ["FCOE_ENABLE", "DCB_REQUIRED", "AUTO_VLAN"], { + if ( String::StartsWith(line, var) ) + { + status_map = add( status_map, var, + deletechars( substring(line, size(var) + 1), "\"") ); + } + }); + }); status_map = add( status_map, "Filename", file_name ); + y2milestone( "Returning: %1", status_map ); } else { - y2error( "Interface not valid" ); + y2warning( "Cannot read /etc/fcoe/%1", file_name ); + Popup::Warning( sformat(_("Cannot read /etc/fcoe/cfg-file for %1"), vlan_device_name) ); } return status_map; @@ -441,7 +491,7 @@ { list <string> lines = splitstring( output["stdout"]:"", "\n" ); foreach( string line, (list<string>)lines, { - if ( regexpmatch( line, "^Status" ) ) + if ( String::StartsWith( line, "Status" ) ) { // Status: Failed interface not DCB capable // Status: Successful @@ -457,7 +507,6 @@ else { y2error( "Exit code: %1 Error: %2", output["exit"]:255, output["stderr"]:"" ); - // if ( output["stderr"]:"" != "" ) Popup::Error ( output["stderr"]:"" ); } return ret; @@ -468,17 +517,17 @@ // global void AdjustStartStatus( ) { - y2milestone( "Setting start of /etc/init.d/fcoe to %1", service_start["fcoe"]:false ); + y2milestone( "Setting start of /etc/init.d/boot.fcoe to %1", service_start["fcoe"]:false ); if ( service_start["fcoe"]:false == true ) - Service::Enable("fcoe"); + Service::Enable("boot.fcoe"); else - Service::Disable("open-fcoe"); + Service::Disable("boot.fcoe"); y2milestone( "Setting start of /etc/init.d/lldpad to %1", service_start["lldpad"]:false ); if ( service_start["lldpad"]:false == true ) - Service::Enable("lldpad"); + Service::Enable("boot.lldpad"); else - Service::Disable("lldpad"); + Service::Disable("boot.lldpad"); } @@ -495,11 +544,11 @@ { boolean status = false; - status = Service::Enabled( "fcoe" ); + status = Service::Enabled( "boot.fcoe" ); y2milestone( "Start status of fcoe: %1", status ); service_start = add( service_start, "fcoe", status ); - status = Service::Enabled( "lldpad" ); + status = Service::Enabled( "boot.lldpad" ); y2milestone( "Start status of lldpad: %1", status ); service_start = add( service_start, "lldpad", status ); } @@ -518,19 +567,19 @@ // see /etc/init.d/fcoe, line 85 (modprobe fcoe > /dev/null 2>&1) boolean ret = true; - if ( Service::Status( "fcoe" ) != 0 ) + if ( Service::Status( "boot.fcoe" ) != 0 ) { - boolean success = Service::Start( "fcoe" ); + boolean success = Service::Start( "boot.fcoe" ); if ( success ) { - y2milestone( "FCoE started (/etc/init.d/fcoe start)"); + y2milestone( "FCoE started (/etc/init.d/boot.fcoe start)"); fcoe_started = true;; } else { - y2error( "Cannot start FCoE service - '/etc/init.d/fcoe start' failed" ); + y2error( "Cannot start FCoE service - '/etc/init.d/boot.fcoe start' failed" ); Popup::Error( "Cannot start FCoE service. -'/etc/init.d/fcoe start' failed" ); +'/etc/init.d/boot.fcoe start' failed" ); ret = false; } } @@ -539,19 +588,19 @@ y2milestone( "FCoE service is running"); } - if ( Service::Status( "lldpad" ) != 0 ) + if ( Service::Status( "boot.lldpad" ) != 0 ) { - boolean success = Service::Start( "lldpad" ); + boolean success = Service::Start( "boot.lldpad" ); if ( success ) { - y2milestone( "Lldpad started (/etc/init.d/lldpad start)"); + y2milestone( "Lldpad started (/etc/init.d/boot.lldpad start)"); lldpad_started = true; } else { - y2error( "Cannot start service lldpad - '/etc/init.d/lldpad start' failed" ); + y2error( "Cannot start service lldpad - '/etc/init.d/boot.lldpad start' failed" ); Popup::Error( "Cannot start service lldpad. -'/etc/init.d/lldpad start' failed" ); +'/etc/init.d/boot.lldpad start' failed" ); ret = false; } } @@ -563,8 +612,8 @@ } // -// dev_name device fcoe_vlan fcoe_enable dcb_required dcb_capable vlan_interface cfg_file -// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no 200 /etc/fcoe/cfg-eth3.200 +// dev_name device fcoe_vlan fcoe_enable dcb_required auto_vlan dcb_capable vlan_interface cfg_file +// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no yes/no 200 /etc/fcoe/cfg-eth3.200 // // Detect network interface cards (hardware probe) and get status // @@ -579,20 +628,39 @@ if ( netcards == [] || netcards == nil ) return false; - + foreach ( map card, netcards, { + // get first state map from link list in resource map + map state_map = card["resource", "link", 0 ]:$[]; + + if ( state_map["state"]:false == false ) + { + // call 'ifconfig <interface> up' here because it's not yet + // clear who configures the interfaces (fipvlan command itself?) + // -> see bnc #705171 (this applies also to installed system) + string cmd_ifup = sformat( "ifconfig %1 up", card["dev_name"]:"" ); + y2milestone( "Executing command: %1", cmd_ifup ); + SCR::Execute( .target.bash_output, cmd_ifup ); + + // ifconfig up always returns 0 -> no error message can be made + } + } ); + // call .probe.netcard again + netcards = (list<map>)SCR::Read(.probe.netcard); + + foreach ( map card, netcards, { + map state_map = card["resource", "link", 0]:$[]; map info_map = $[]; map <string, string> status_map = $[]; - // It's not possible to distinguish between no cable attached - // and interface not up in 'link' map got from .probe.network - // (according to snwint), so we have to check every interface. - // This may take a while! - vlan_interface = GetVlanInterface( card["dev_name"]:"" ); - + // only call fipvlan <interface> for configured interfaces + if ( state_map["state"]:false == true ) + { + vlan_interface = GetVlanInterface( card["dev_name"]:"" ); + } if ( vlan_interface == "" ) { - // FCoE isn't enabled on the switch - we can't do anything here. + // Interface down or FCoE not enabled on the switch - we can't do anything here. fcoe_vlan_interface = NOT_AVAILABLE; } else @@ -601,24 +669,41 @@ if ( fcoe_vlan_interface != "" ) { - status_map = GetFCoEStatus( fcoe_vlan_interface ); + status_map = GetFcoeStatus( fcoe_vlan_interface, card ); } else { - // FCoE VLAN interface not yet configured + // FCoE VLAN interface not yet configured (status_map remains empty) fcoe_vlan_interface = NOT_CONFIGURED; } } dcb_capable = DCBCapable( card["dev_name"]:"" ); info_map = add( info_map, "dev_name", card["dev_name"]:""); // network card, e.g. eth3 - info_map = add( info_map, "device", card["device"]:""); // description + if ( card["device"]:"" != "" ) + { + info_map = add( info_map, "device", card["device"]:""); // device name + } + else + { + info_map = add( info_map, "device", card["model"]:""); // model + } + info_map = add( info_map, "fcoe_vlan", fcoe_vlan_interface ); // FCoE VLAN interface, e.g. eth3.200 - info_map = add( info_map, "fcoe_enable", status_map["FCOE_ENABLE"]:""); // FCOE_ENABLE - info_map = add( info_map, "dcb_required", status_map["DCB_REQUIRED"]:""); // DCB_REQUIRED - info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable - info_map = add( info_map, "vlan_interface", vlan_interface ); // VLAN interface, e.g. 200 - info_map = add( info_map, "cfg_file", status_map["Filename"]:"" ); // cfg file name, e.g. /etc/fcoe/cfg-eth3.200 + + if ( fcoe_vlan_interface != NOT_AVAILABLE ) + { + // default for FCoE enable is yes + info_map = add( info_map, "fcoe_enable", status_map["FCOE_ENABLE"]:"yes" ); // FCOE_ENABLE + // default for DCB required is yes unless the interface is not dcb capable + info_map = add( info_map, "dcb_required", status_map["DCB_REQUIRED"]:( (dcb_capable=="yes")?"yes":"no" ) ); + // default is to create /etc/fcoe/cfg-ethx file with VLAN device in name + // (e.g. cfg-eth3.200), set AUTO_VLAN to "no" then (see bnc #692403) + info_map = add( info_map, "auto_vlan", status_map["AUTO_VLAN"]:"no"); // AUTO_VLAN + } + info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable + info_map = add( info_map, "vlan_interface", vlan_interface ); // VLAN interface, e.g. 200 + info_map = add( info_map, "cfg_file", status_map["Filename"]:"" ); // cfg file name, e.g. /etc/fcoe/cfg-eth3.200 network_interfaces = add( network_interfaces, info_map ); } ); @@ -635,7 +720,7 @@ global boolean ReadFcoeConfig() { list <string> options = (list<string>) SCR::Dir(.fcoe); - y2milestone( "List of options: %1", options ); + y2milestone( "List of options in /etc/fcoe/config: %1", options ); if ( options == [] || options == nil ) return false; @@ -646,7 +731,7 @@ string syslog_val = (string)SCR::Read(add(.fcoe, "USE_SYSLOG")); fcoe_general_config = add( fcoe_general_config, "USE_SYSLOG", syslog_val ); - y2milestone( "/etc/fcoe/config read - DEBUG: %1, USE_SYSLOG: %2", debug_val, syslog_val ); + y2milestone( "/etc/fcoe/config read: DEBUG: %1, USE_SYSLOG: %2", debug_val, syslog_val ); return true; } @@ -679,6 +764,9 @@ { list <map> netcards = GetNetworkCards(); boolean success = true; + string command = ""; + map output = $[]; + y2milestone( "Writing /etc/fcoe/cfg-ethx files" ); foreach ( map card, (list<map>)netcards, { @@ -690,14 +778,20 @@ list <string> lines = (list<string>)splitstring( content, "\n" ); lines = maplist( string line, lines, { - if ( regexpmatch( line, "^FCOE_ENABLE" ) ) + if ( !String::StartsWith( line, "#" ) ) line = deletechars( line, " \t" ); + + if ( String::StartsWith( line, "FCOE_ENABLE" ) ) { return sformat( "FCOE_ENABLE=\"%1\"", card["fcoe_enable"]:"no" ); } - else if ( regexpmatch( line, "^DCB_REQUIRED" ) ) + else if ( String::StartsWith( line, "DCB_REQUIRED" ) ) { return sformat( "DCB_REQUIRED=\"%1\"", card["dcb_required"]:"no" ); } + else if ( String::StartsWith( line, "AUTO_VLAN" ) ) + { + return sformat( "AUTO_VLAN=\"%1\"", card["auto_vlan"]:"no" ); + } else { return line; @@ -716,6 +810,20 @@ { y2milestone( "%1 written", card["cfg_file"]:"" ); } + // enable DCB app fcoe (app:0) + if ( card["dcb_required"]:"no" == "yes" ) + { + command = sformat( "dcbtool sc %1 app:0 e:1 a:1 w:1", card["dev_name"]:"" ); + y2milestone( "Executing command: %1", command ); + + output = (map)SCR::Execute( .target.bash_output, command ); + y2milestone( "Output: %1", output ); + if ( output["exit"]:255 != 0 ) + { + Popup::Error( sformat( _("Command: %1 failed"), command ) ); + y2error( "Command: %1 failed", command); + } + } } } ); @@ -728,7 +836,7 @@ if ( FcoeClient::Modified() ) { y2milestone( "Restarting fcoe"); - ret = Service::Restart("fcoe"); + ret = Service::Restart("boot.fcoe"); } return ret; } @@ -774,8 +882,8 @@ "" ); - // check if network services are running - if(!NetworkService::RunningNetworkPopup()) return false; + // a check for running network services doesn't make sense (is not needed), the + // interfaces are set up in FcoeClient::GetVlanInterfaces() if(PollAbort()) return false; Progress::NextStage(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/complex.ycp new/yast2-fcoe-client-2.21.7/src/complex.ycp --- old/yast2-fcoe-client-2.21.6/src/complex.ycp 2011-09-15 17:31:31.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/complex.ycp 2011-09-22 13:44:26.000000000 +0200 @@ -51,14 +51,16 @@ * @return true if users aborts installation */ boolean ReallyAbort() { + y2milestone( "Aborting FCoE configuration" ); + // revert start of 'fcoe' or 'lldpad' if ( FcoeClient::fcoe_started ) { - Service::Stop( "fcoe" ); + Service::Stop( "boot.fcoe" ); } if ( FcoeClient::lldpad_started ) { - Service::Stop( "lldpad" ); + Service::Stop( "boot.lldpad" ); } if ( !FcoeClient::Modified() ) @@ -112,14 +114,12 @@ return ret ? `next : `abort; } -// TODO - check whether a 'validate' is required - /** * Init **/ void InitServicesDialog (string id) { y2milestone( "Init services dialog" ); - y2milestone( "Modified: %1", FcoeClient::Modified() ); + y2milestone( "Data modified: %1", FcoeClient::Modified() ); map status_map = FcoeClient::GetStartStatus(); if ( status_map["fcoe"]:false == true ) @@ -155,18 +155,21 @@ // check VLAN status if ( card["fcoe_vlan"]:"" == FcoeClient::NOT_CONFIGURED ) { - UI::ChangeWidget( `id(`edit), `Enabled, false ); + UI::ChangeWidget( `id(`edit), `Enabled, true ); UI::ChangeWidget( `id(`create), `Enabled, true ); + UI::ChangeWidget( `id(`remove), `Enabled, false ); } else if ( card["fcoe_vlan"]:"" == FcoeClient::NOT_AVAILABLE ) { UI::ChangeWidget( `id(`edit), `Enabled, false ); - UI::ChangeWidget( `id(`create), `Enabled, false ); + UI::ChangeWidget( `id(`create), `Enabled, false ); + UI::ChangeWidget( `id(`remove), `Enabled, false ); } else { UI::ChangeWidget( `id(`edit), `Enabled, true ); UI::ChangeWidget( `id(`create), `Enabled, false ); + UI::ChangeWidget( `id(`remove), `Enabled, true ); } } @@ -184,7 +187,7 @@ foreach ( map card, (list<map>)netcards, { table_items = add( table_items, `item(`id(row), card["dev_name"]:"", card["device"]:"", card["fcoe_vlan"]:"", - card["fcoe_enable"]:"", card["dcb_required"]:"", card["dcb_capable"]:"" ) + card["fcoe_enable"]:"", card["dcb_required"]:"", card["auto_vlan"]:"", card["dcb_capable"]:"" ) ); row = row + 1; }); @@ -232,6 +235,8 @@ // set values for 'FCoE Enabled' and 'DCB Required' UI::ChangeWidget( `id(`fcoe), `Value, card["fcoe_enable"]:"" ); UI::ChangeWidget( `id(`dcb), `Value, card["dcb_required"]:"" ); + UI::ChangeWidget( `id(`auto), `Value, card["auto_vlan"]:"" ); + // headline of the edit dialog - configuration of values for a certain network interface UI::ChangeWidget( `id(`heading), `Value, sformat( _("Configuration of Interface %1"), card["fcoe_vlan"]:"" ) ); } @@ -262,6 +267,14 @@ } else if ( action == `create ) { + // haendel:~/:[0]# fipvlan -c -s eth3 + // Fibre Channel Forwarders Discovered + // interface | VLAN | FCF MAC + // ------------------------------------------ + // eth3 | 200 | 00:0d:ec:a2:ef:00 + // Created VLAN device eth3.200 + // Starting FCoE on interface eth3.200 + map card = FcoeClient::GetCurrentNetworkCard(); string dev_name = card["dev_name"]:""; @@ -270,10 +283,11 @@ string vlan_interface = ""; string fcoe_vlan_interface = ""; map status_map = $[]; - boolean create_ifcfg = false; - string ifcfg_file = ""; + boolean create_ifcfg = true; + + FcoeClient::ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1\.%2", dev_name, card["vlan_interface"]:"" ); - if ( Stage::initial() ) // first stage - create and start FCoE VLAN interface + if ( Stage::initial() ) // first stage of installation - create and start FCoE VLAN interface { // headline of a popup: creating and starting Fibre Channel over Ethernet boolean ret = Popup::YesNoHeadline( _("Creating and starting FCoE on detected VLAN device"), @@ -312,11 +326,9 @@ on discovered FCoE VLAN interface on %1?"), dev_name ) ); if ( ret == true ) { - ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1\.%2", dev_name, card["vlan_interface"]:"" ); - // if /etc/sysconfig/network/ifcfg-<vlan-interface> already exists // call 'ifup' for the interface (creates /proc/net/vlan/<vlan-interface>) - if ( FileUtils::Exists( ifcfg_file ) ) + if ( FileUtils::Exists( FcoeClient::ifcfg_file ) ) { command = sformat( "ifup %1\.%2", dev_name, card["vlan_interface"]:"" ); y2milestone( "Executing command: %1", command ); @@ -331,13 +343,11 @@ else { command = sformat( "fipvlan -c -s %1", dev_name ); // create and start FCoE - // create_ifcfg = true; } } else { command = sformat( "fipvlan -c -s %1", dev_name ); - // create_ifcfg = true; } y2milestone( "Executing command: %1", command ); @@ -370,19 +380,19 @@ if ( fcoe_vlan_interface != "" ) { y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface ); - status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface ); - - // store command to be able to revert the creation of FCoE VLAN interface in case of abort - // TODO: is this also OK if only 'fipvlan -s <interface>' is called? + FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card ); + status_map = FcoeClient::GetFcoeStatus ( fcoe_vlan_interface, card ); + // store command to be able to revert the creation of FCoE VLAN interface in case of 'Abort' + // (also if only 'fipvlan -s <interface>' is called) FcoeClient::AddRevertCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) ); if ( create_ifcfg ) { - string config = sformat( "BOOTPROTO=\"static\"\nSTARTMODE=\"onboot\" -ETHERDEVICE=\"%1\"\nUSERCONTROL=\"no\"\nINTERFACETYPE=\"vlan\"\n", dev_name ); - ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1", fcoe_vlan_interface ); - SCR::Write(.target.string, ifcfg_file, config); - y2milestone( "Writing config: %1 to %2", config, ifcfg_file ); - FcoeClient::AddRevertCommand( sformat( "rm %1", ifcfg_file ) ); + string config = sformat( "BOOTPROTO=\"static\"\nSTARTMODE=\"nfsroot\" +ETHERDEVICE=\"%1\"\nUSERCONTROL=\"no\"\n", dev_name ); + FcoeClient::ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1", fcoe_vlan_interface ); + SCR::Write(.target.string, FcoeClient::ifcfg_file, config); + y2milestone( "Writing config: %1 to %2", config, FcoeClient::ifcfg_file ); + FcoeClient::AddRevertCommand( sformat( "rm %1", FcoeClient::ifcfg_file ) ); } } else @@ -395,6 +405,7 @@ card["fcoe_vlan"] = fcoe_vlan_interface; card["fcoe_enable"] = status_map["FCOE_ENABLE"]:""; card["dcb_required"] = status_map["DCB_REQUIRED"]:""; + card["auto_vlan"] = status_map["AUTO_VLAN"]:""; card["cfg_file"] = status_map["Filename"]:""; FcoeClient::SetModified( true ); @@ -405,8 +416,73 @@ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), fcoe_vlan_interface ); UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 3), status_map["FCOE_ENABLE"]:"" ); UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), status_map["DCB_REQUIRED"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), status_map["AUTO_VLAN"]:"" ); AdjustButtons(); } + else if ( action == `remove ) + { + map card = FcoeClient::GetCurrentNetworkCard(); + map output = $[]; + string command = ""; + // popup text: really remove FCoE VLAN interface + string popup_text = sformat( _("Do you really want to remove the FCoE VLAN device %1?"), + card["fcoe_vlan"]:"" ); + + if ( !Stage::initial() ) + { + // popup text continues + popup_text = popup_text + "\n" + _( "Please note: The device won't be restored on 'Cancel'." ); + } + + // headline of a popup + boolean ret = Popup::YesNoHeadline( _("Removing FCoE VLAN device"), + popup_text ); + + if ( ret == true ) + { + y2milestone( "Removing %1", card["fcoe_vlan"]:"" ); + + command = sformat( "vconfig rem %1", card["fcoe_vlan"]:"") ; + y2milestone( "Calling %1", command ); + output = (map)SCR::Execute( .target.bash_output, command ); + y2milestone( "Output: %1", output ); + + if ( output["exit"]:255 == 0 ) + { + command = sformat( "rm %1", card["cfg_file"]:"" ); + y2milestone( "Calling %1", command ); + output = (map)SCR::Execute( .target.bash_output, command ); + y2milestone( "Output: %1", output ); + command = sformat( "rm /etc/sysconfig/network/ifcfg-%1", card["fcoe_vlan"]:"" ); + y2milestone( "Calling %1", command ); + output = (map)SCR::Execute( .target.bash_output, command ); + y2milestone( "Output: %1", output ); + + // set new values in global map network_interfaces + card["fcoe_vlan"] = FcoeClient::NOT_CONFIGURED; + card["fcoe_enable"] = ""; + card["dcb_required"] = ""; + card["auto_vlan"] = ""; + card["cfg_file"] = ""; + FcoeClient::SetModified( true ); + + FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card ); + y2milestone( "Current network interfaces: %1", FcoeClient::GetNetworkCards() ); + + // replace values in table + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), card["fcoe_vlan"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 3), card["fcoe_enable"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), card["dcb_required"]:"" ); + UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), card["auto_vlan"]:"" ); + AdjustButtons(); + } + else + { + Popup::Error( sformat( _("Removing of interface %1 failed"), card["fcoe_vlan"]:"") ); + y2error( "Removing of interface %1 failed", card["fcoe_vlan"]:"" ); + } + } + } return nil; } @@ -420,7 +496,19 @@ symbol HandleEditDialog( string id, map event ) { any action = event["ID"]:nil; - return nil; + map card = FcoeClient::GetCurrentNetworkCard(); + + if ( action == `dcb ) + { + string dcb_required = (string)UI::QueryWidget( `id(`dcb), `Value ); + if ( dcb_required == "yes" && card["dcb_capable"]:"" != "yes" ) + { + // text of a warning popup + Popup::Warning( _("DCB Required is set to \"yes\" but the +interface isn't DCB capable") ); + y2warning( "DCB_REQUIRED is set to yes but the interface isn't DCB capable" ); + } + } } /** @@ -430,21 +518,16 @@ void StoreServicesDialog (string id, map event) { y2milestone( "Store services dialog" ); - boolean fcoe_auto = (boolean)UI::QueryWidget( `id ("fcoe_startup_auto"), `Value ); - if ( fcoe_auto ) - { - FcoeClient::SetStartStatus( "fcoe", true ); - y2milestone( "Setting auto start of FCoE to true"); - } + boolean fcoe_auto = (boolean)UI::QueryWidget( `id ("fcoe_startup_auto"), `Value ); + FcoeClient::SetStartStatus( "fcoe", fcoe_auto ); + y2milestone ("Setting auto start of service 'fcoe' to: %1", fcoe_auto ); + boolean lldpad_auto = (boolean)UI::QueryWidget( `id ("lldpad_startup_auto"), `Value ); - if ( lldpad_auto ) - { - FcoeClient::SetStartStatus( "lldpad", true ); - y2milestone( "Setting auto start of lldpad to true"); - } + FcoeClient::SetStartStatus( "lldpad", lldpad_auto ); + y2milestone( "Setting auto start of service 'lldpad' to: %1", lldpad_auto ); } void StoreInterfacesDialog (string id, map event) @@ -493,6 +576,13 @@ FcoeClient::SetModified( true ); } + string auto_vlan = (string)UI::QueryWidget( `id(`auto), `Value ); + if ( card["auto_vlan"]:"" != auto_vlan ) + { + card["auto_vlan"] = auto_vlan; + FcoeClient::SetModified( true ); + } + FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card ); y2milestone( "Current data: %1", FcoeClient::GetNetworkCards() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/dialogs.ycp new/yast2-fcoe-client-2.21.7/src/dialogs.ycp --- old/yast2-fcoe-client-2.21.6/src/dialogs.ycp 2011-08-19 09:47:26.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/dialogs.ycp 2011-09-22 13:44:05.000000000 +0200 @@ -64,23 +64,29 @@ return `VBox( `VStretch(), // heading is replaced later (InitEditDialog) - `Label( `id(`heading), ("Configuration of Interface ...................") ), + `Label( `id(`heading), ("Configuration of Interface .......................") ), + `VSpacing(2), `HBox ( `HStretch(), `Frame( (""), - `VBox( - `VSpacing(2), - `ComboBox( `id(`fcoe), _("FCoE Enable"), - [`item(`id("yes"), "yes" ), - `item(`id("no"), "no", true ) ] - ), - `VSpacing (2), - `ComboBox( `id(`dcb), _("DCB Required"), - [`item(`id("yes"), "yes" ), - `item(`id("no"), "no", true ) ] - ), - `VSpacing (2) - ) + `MarginBox( 10, 2, + `VBox( + `ComboBox( `id(`fcoe), _("FCoE Enable"), + [`item(`id("yes"), "yes" ), + `item(`id("no"), "no", true ) ] + ), + `VSpacing (1), + `ComboBox( `id(`dcb), `opt (`notify, `immediate), _("DCB Required"), + [`item(`id("yes"), "yes" ), + `item(`id("no"), "no", true ) ] + ), + `VSpacing (1), + `ComboBox( `id(`auto), _("AUTO_VLAN"), + [`item(`id("yes"), "yes" ), + `item(`id("no"), "no", true ) ] + ) + ) + ) ), `HStretch() ), @@ -98,11 +104,12 @@ return `MarginBox( mbox_x, mbox_y, `VBox ( `VSpacing(2.0), - // frame + // frame containing radio buttons for fcoe service start `Frame (_("FCoE Service Start"), `VBox (`RadioButtonGroup (`id ("fcoe_service_startup"), items_fcoe)) ), `VStretch(), + // frame containing radio buttons for lldpad service start `Frame (_("Lldpad Service Start"), `VBox (`RadioButtonGroup (`id ("lldpad_service_startup"), items_lldpad)) ), @@ -119,12 +126,16 @@ return `MarginBox( mbox_x, mbox_y, `VBox( `Table(`id(`interfaces), `opt(`notify, `immediate, `keepSorting ), + // column headers of a table with network interfaces (keep them short) `header(_("Device Name"), _("Model"), _("FCoE VLAN Interface"), - _("FCoE Enable"), _("DCB Required"), _("DCB capable") ), + // continue column headers + _("FCoE Enable"), _("DCB Required"), _("AUTO VLAN"), _("DCB capable") ), [] ), - `Left(`HBox( `PushButton(`id(`edit), _("Change &Settings") ), - `PushButton(`id(`create), _("Create FCoE &VLAN Interface")) ) + // button labels + `Left(`HBox( `PushButton(`id(`edit), _("Change &Settings")), + `PushButton(`id(`create), _("Create FCoE &VLAN Interface")), + `PushButton(`id(`remove), _("&Remove Interface")) ) ) ) ); @@ -148,6 +159,7 @@ `item(`id("no"), "no", true ) ]) ), + // ComboBox label `Left(`ComboBox(`id("syslog"), _("&Use syslog"), [`item(`id("yes"), "yes", true ), `item(`id("no"), "no" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/fcoe-client_auto.ycp new/yast2-fcoe-client-2.21.7/src/fcoe-client_auto.ycp --- old/yast2-fcoe-client-2.21.6/src/fcoe-client_auto.ycp 2011-09-15 17:20:26.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/fcoe-client_auto.ycp 2011-09-22 13:44:05.000000000 +0200 @@ -203,8 +203,9 @@ if ( fcoe_vlan_interface != "" ) { y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface ); - // read or create /etc/fcoe/ethx file - status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface ); + // create /etc/fcoe/ethx file and get values + FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card ); + status_map = FcoeClient::GetFcoeStatus( fcoe_vlan_interface, card ); // apply modified data detected_netcards[ index, "fcoe_vlan"] = fcoe_vlan_interface; detected_netcards[ index, "cfg_file"] = status_map["Filename"]:""; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/fcoe-client_finish.ycp new/yast2-fcoe-client-2.21.7/src/fcoe-client_finish.ycp --- old/yast2-fcoe-client-2.21.6/src/fcoe-client_finish.ycp 2011-09-15 17:20:26.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/fcoe-client_finish.ycp 2011-09-22 13:44:05.000000000 +0200 @@ -47,10 +47,19 @@ else if (func == "Write") { boolean start_services = false; + string command = ""; + y2milestone( "Copying files /etc/fcoe/* to destination" ); // copy fcoe config files to destdir WFM::Execute (.local.bash,"test -d /etc/fcoe/ && mkdir -p '" + String::Quote(Installation::destdir) + "/etc/fcoe' && cp -a /etc/fcoe/* '" + String::Quote(Installation::destdir) + "/etc/fcoe/'"); + // copy sysconfig file + command = sformat ( "cp -a %1 '%2/etc/sysconfig/network'", FcoeClient::ifcfg_file, + String::Quote(Installation::destdir) ); + y2milestone( "Executing command: %1", command ); + + WFM::Execute (.local.bash, command ); + // only enable services if any FCoE VLAN interface is enabled list <map> netcards = FcoeClient::GetNetworkCards(); @@ -66,8 +75,8 @@ if ( start_services ) { y2milestone( "Enabling service start of fcoe and lldpad" ); - Service::Enable("fcoe"); - Service::Enable("lldpad"); + Service::Enable("boot.fcoe"); + Service::Enable("boot.lldpad"); } } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/helps.ycp new/yast2-fcoe-client-2.21.7/src/helps.ycp --- old/yast2-fcoe-client-2.21.6/src/helps.ycp 2011-09-15 17:20:26.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/helps.ycp 2011-09-22 13:44:05.000000000 +0200 @@ -75,26 +75,29 @@ the configuration opens.</p> "), - /* Services dialog help 1/2 */ + /* Services dialog help 1/3 */ "services" : _("<p><b><big>Starting of services</big><br></b><br> -There is the possibility to enable/disable the start of the services -<b>fcoe</b> and <b>lldpad</b> at boot time.<br></p> +There is the possibility to enable or disable the start of the services +<b>fcoe</b> and <b>lldpad</b> at boot time.</p> ") + + /* Services dialog help 2/3 */ + _("<p>Starting the service <b>fcoe</b> means starting the <i>Fibre Channel over +Ethernet</i> service daemon <i>fcoemon</i> which controls the FCoE interfaces and +establishes a connection with the daemon <i>lldpad</i>.</p>" ) + - /* Services dialog help 2/2 */ -_("<p>Check the appropriate button, e.g. if you want to start FCoE automatically at -boot time click on 'When booting' in 'FcoE' frame.</p>"), - + /* Services dialog help 3/3 */ + _("<p>The <b>lldpad</b> service provides the <i>Link Layer Discovery Protocol</i> agent daemon <i>lldpad</i> which informs <i>fcoemon</i> about DCB (Data Center Bridging) features and configuration of the interfaces.</p>"), + /* Interfaces dialog help 1/4 */ "interfaces" : _("<p><b><big>Network interface overview</big></b><br></p>") + /* Interfaces dialog help 2/4 */ -_("<p>The interfaces dialog shows all detected netcards including the status of VLAN and FCoE configuration.<br>FCoE is possible if a VLAN interface is configured for FCoE on the switch. For every netcard (network interface) this is shown in column 'FCoE VLAN interface'.</p>") + +_("<p>The interfaces dialog shows all detected netcards including the status of VLAN and FCoE configuration.<br>FCoE is possible if a VLAN interface is configured for FCoE on the switch. For every netcard (network interface) this is shown in column <i>FCoE VLAN Interface</i>.</p>") + /* Interfaces dialog help 3/4 */ _("<p>The values for <i>FCoE VLAN Interface</i> in detail:<br> -<i>not available</i> means, FCoE isn't possible (must be enabled on the switch first)<br> -<i>not configured</i>: FCoE is possible but not yet activated, press <b>Create FCoE VLAN Interface</b> to do this.<br> +<b>not available</b>: Fibre Channel over Ethernet isn't possible (must be enabled on the switch first)<br> +<b>not configured</b>: FCoE is possible but not yet activated, press <b>Create FCoE VLAN Interface</b> to do this.<br> If the FCoE VLAN interface is already created the name is shown in the column, e.g. eth3.200.</p>") + /* Interfaces dialog help 3/4 */ @@ -108,21 +111,27 @@ /* Configuration dialog help 3/3 */ _("<p>The values are:<br> -<b>Debug</b>: <i>yes</i> or <i>no</i> is used to enable debugging messages from the fcoe service script and 'fcoemon'<br> -<b>Use syslog</b>: <i>yes</i> or <i>no</i> sends messages to the system log if set to <i>yes</i> (see /var/log/messages).</p>"), +<b>Debug</b>: <i>yes</i> or <i>no</i><br> +This is used to enable or disable debugging messages from the fcoe service script and <i>fcoemon</i>.<br> +<b>Use syslog</b>: <i>yes</i> or <i>no</i><br> +Messages are sent to the system log if set to <i>yes</i> (data are logged to /var/log/messages).</p>"), /* edit dialog help 1/3 */ "change" : _("<p>Edit settings in /etc/fcoe/ethx</p>" ) + /* Edit dialog help 2/3 */ - _( "<p>The daemon 'fcoemon' reads these configuration files on initialization. + _( "<p>The daemon <i>fcoemon</i> reads these configuration files on initialization. There is a file for every interface and the values indicate whether FCoE instances should be created and if DCB is required.</p>" ) + /* Edit dialog help 3/3 */ _( "<p>The values are:<br> - FCoE enable: <i>yes</i> or <i>no</i> Enable or disable creation of FCoE. <br> - DCB required: <i>yes</i> or <i>no</i> The default is <i>yes</i>, DCB is usually - required.</p>" ), +<b>FCoE Enable</b>: <i>yes</i> or <i>no</i><br> +Enable or disable the creation of FCoE instances.<br> +<b>DCB Required</b>: <i>yes</i> or <i>no</i><br> +The default is <i>yes</i>, DCB is usually required.<br> +<b>AUTO VLAN</b>: <i>yes</i> or <i>no</i><br> +If set to <i>yes</i> 'fcoemon' will create the VLAN +interfaces automatically.</p>" ), ]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/inst_fcoe-client.ycp new/yast2-fcoe-client-2.21.7/src/inst_fcoe-client.ycp --- old/yast2-fcoe-client-2.21.6/src/inst_fcoe-client.ycp 2011-09-15 17:20:26.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/inst_fcoe-client.ycp 2011-09-22 13:44:05.000000000 +0200 @@ -41,23 +41,16 @@ // create /etc/fcoe SCR::Execute(.target.bash, "mkdir -p /etc/fcoe" ); -// TODO: check what is additional needed -// - load any modules ? -// -// FcoeClient::CheckInstalledPackages() not needed in inst-sys -// FcoeClient::DetectStartStatus() doesn't make sense in inst-sys - -// check for running network -if( !NetworkService::RunningNetworkPopup() ) -{ - y2error( "Network NOT set up" ); - return nil; -} +// FcoeClient::CheckInstalledPackages() not needed in inst-sys +// FcoeClient::DetectStartStatus() doesn't make sense in inst-sys +// NetworkService::RunningNetworkPopup() do not check for running network, the +// interfaces are set up in FcoeClient::GetVlanInterface() // reset global values FcoeClient::ResetNetworkCards(); // start services fcoe and lldpad +// (modules for fcoe are loaded in /etc/init.d/fcoe) success = FcoeClient::ServiceStatus(); if ( !success ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.6/src/wizards.ycp new/yast2-fcoe-client-2.21.7/src/wizards.ycp --- old/yast2-fcoe-client-2.21.6/src/wizards.ycp 2011-08-19 09:47:26.000000000 +0200 +++ new/yast2-fcoe-client-2.21.7/src/wizards.ycp 2011-09-22 13:44:05.000000000 +0200 @@ -121,10 +121,23 @@ ]; map <string, boolean> status_map = FcoeClient::GetStartStatus(); - if ( status_map["fcoe"]:false == true || status_map["lldpad"]:false == true ) - ini_tab = "interfaces"; + + if ( CWMTab::LastTab() == nil || CWMTab::LastTab() == "" ) // first run + { + if ( status_map["fcoe"]:false == true && status_map["lldpad"]:false == true ) + { + ini_tab = "interfaces"; + } + else + { + ini_tab = "services"; + } + } else - ini_tab = "services"; + { + // get correct tab to return after 'Edit' + ini_tab = CWMTab::LastTab(); + } tab_order = ["services", "interfaces", "configuration"]; } @@ -154,7 +167,10 @@ Label::BackButton (), Label::FinishButton() ); - Wizard::DisableBackButton (); + Wizard::SetNextButton(`next, Label::OKButton()); + Wizard::SetAbortButton(`abort, Label::CancelButton()); + Wizard::HideBackButton(); + // TODO: rename icon to yast2-fcoe-client (yast2-theme package) Wizard::SetTitleIcon("fcoe"); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
