Hello community, here is the log from the commit of package yast2-fcoe-client for openSUSE:Factory checked in at Mon Jun 27 11:55:44 CEST 2011.
-------- --- yast2-fcoe-client/yast2-fcoe-client.changes 2011-06-07 13:33:21.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-fcoe-client/yast2-fcoe-client.changes 2011-06-16 12:22:28.000000000 +0200 @@ -1,0 +2,8 @@ +Tue Jun 7 13:39:51 CEST 2011 - [email protected] + +- Bug-fixes for installation workflow (reset network cards, only + show tabs 'interfaces' and 'configuration', reset modified flag), + stop services fcoe or lldpad on 'Abort' (if started here) +- V 2.21.3 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-fcoe-client-2.21.2.tar.bz2 New: ---- yast2-fcoe-client-2.21.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-fcoe-client.spec ++++++ --- /var/tmp/diff_new_pack.Gz7iyV/_old 2011-06-27 11:55:18.000000000 +0200 +++ /var/tmp/diff_new_pack.Gz7iyV/_new 2011-06-27 11:55:18.000000000 +0200 @@ -19,12 +19,12 @@ Name: yast2-fcoe-client -Version: 2.21.2 +Version: 2.21.3 Release: 1 License: GPL Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-fcoe-client-2.21.2.tar.bz2 +Source0: yast2-fcoe-client-2.21.3.tar.bz2 Prefix: /usr @@ -40,7 +40,7 @@ Ethernet (FCoE) configuration. %prep -%setup -n yast2-fcoe-client-2.21.2 +%setup -n yast2-fcoe-client-2.21.3 %build %{prefix}/bin/y2tool y2autoconf ++++++ yast2-fcoe-client-2.21.2.tar.bz2 -> yast2-fcoe-client-2.21.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.2/configure new/yast2-fcoe-client-2.21.3/configure --- old/yast2-fcoe-client-2.21.2/configure 2011-05-31 12:25:13.000000000 +0200 +++ new/yast2-fcoe-client-2.21.3/configure 2011-06-16 12:22:03.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.2. +# Generated by GNU Autoconf 2.68 for yast2-fcoe-client 2.21.3. # # 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.2' -PACKAGE_STRING='yast2-fcoe-client 2.21.2' +PACKAGE_VERSION='2.21.3' +PACKAGE_STRING='yast2-fcoe-client 2.21.3' 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.2 to adapt to many kinds of systems. +\`configure' configures yast2-fcoe-client 2.21.3 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.2:";; + short | recursive ) echo "Configuration of yast2-fcoe-client 2.21.3:";; 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.2 +yast2-fcoe-client configure 2.21.3 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.2, which was +It was created by yast2-fcoe-client $as_me 2.21.3, 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.2' + VERSION='2.21.3' cat >>confdefs.h <<_ACEOF @@ -2450,7 +2450,7 @@ -VERSION="2.21.2" +VERSION="2.21.3" 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.2, which was +This file was extended by yast2-fcoe-client $as_me 2.21.3, 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.2 +yast2-fcoe-client config.status 2.21.3 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.2/configure.in new/yast2-fcoe-client-2.21.3/configure.in --- old/yast2-fcoe-client-2.21.2/configure.in 2011-05-31 12:25:11.000000000 +0200 +++ new/yast2-fcoe-client-2.21.3/configure.in 2011-06-16 12:22:01.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-fcoe-client, 2.21.2, http://bugs.opensuse.org/, yast2-fcoe-client) +AC_INIT(yast2-fcoe-client, 2.21.3, 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.2" +VERSION="2.21.3" 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.2/src/complex.ycp new/yast2-fcoe-client-2.21.3/src/complex.ycp --- old/yast2-fcoe-client-2.21.2/src/complex.ycp 2011-05-30 12:38:16.000000000 +0200 +++ new/yast2-fcoe-client-2.21.3/src/complex.ycp 2011-06-16 11:50:38.000000000 +0200 @@ -45,10 +45,23 @@ /** * Show a popup on abort if data are modified and - * check redo list/execute redo commands. + * check list of commands to revert changes done to the system. + * This function is also called during installation if user aborts + * the 'FCoE client configuration', i.e. commands from revert list + * are executed and list is reset. * @return true if users aborts installation */ boolean ReallyAbort() { + // revert start of 'fcoe' or 'lldpad' + if ( FcoeClient::fcoe_started ) + { + Service::Stop( "fcoe" ); + } + if ( FcoeClient::lldpad_started ) + { + Service::Stop( "lldpad" ); + } + if ( !FcoeClient::Modified() ) return true; @@ -56,20 +69,21 @@ if ( abort ) { - // check redo list - list redo_list = FcoeClient::GetRedoCommands(); - if ( redo_list == [] ) + // check revert list + list revert_list = FcoeClient::GetRevertCommands(); + if ( revert_list == [] ) { - y2milestone( "Nothing to redo"); + y2milestone( "Nothing to revert"); } else { - foreach ( string command, (list<string>)redo_list, { + foreach ( string command, (list<string>)revert_list, { y2milestone( "Calling %1", command ); map output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); } ); + FcoeClient::ResetRevertCommands(); // important during installation } } return abort; @@ -106,7 +120,7 @@ **/ void InitServicesDialog (string id) { y2milestone( "Init services dialog" ); - + y2milestone( "Modified: %1", FcoeClient::Modified() ); map status_map = FcoeClient::GetStartStatus(); if ( status_map["fcoe"]:false == true ) @@ -359,9 +373,9 @@ y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface ); status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface ); - // store command to be able to redo the creation of FCoE VLAN interface in case of abort + // 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::AddRedoCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) ); + FcoeClient::AddRevertCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) ); if ( create_ifcfg ) { string config = sformat( "BOOTPROTO=\"static\"\nSTARTMODE=\"onboot\" @@ -369,7 +383,7 @@ 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::AddRedoCommand( sformat( "rm %1", ifcfg_file ) ); + FcoeClient::AddRevertCommand( sformat( "rm %1", ifcfg_file ) ); } } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.2/src/FcoeClient.ycp new/yast2-fcoe-client-2.21.3/src/FcoeClient.ycp --- old/yast2-fcoe-client-2.21.2/src/FcoeClient.ycp 2011-05-31 11:00:29.000000000 +0200 +++ new/yast2-fcoe-client-2.21.3/src/FcoeClient.ycp 2011-06-16 11:50:07.000000000 +0200 @@ -87,7 +87,7 @@ * @return true if modified */ global boolean Modified() { - y2debug("modified=%1",modified); + y2debug( "get modified = %1", modified ); return modified; } @@ -95,8 +95,9 @@ * Mark as modified, for Autoyast. */ global void SetModified(boolean value) { - modified = true; - } + y2debug( "set modified to %1", value ); + modified = value; +} global boolean ProposalValid() { return proposal_valid; @@ -120,7 +121,6 @@ write_only = value; } - global void SetAbortFunction(boolean() function) { AbortFunction = function; } @@ -155,9 +155,6 @@ */ - -// Settings: Define all variables needed for configuration of fcoe-client - // Define all the variables necessary to hold global integer current_card = 0; // currently selected card, means row in list of cards @@ -165,20 +162,81 @@ global string NOT_CONFIGURED = "not configured"; global string NOT_AVAILABLE = "not available"; -// map containing information about networks cards and VLAN, FCoE and DCB status -list <map> network_interfaces = []; +global boolean lldpad_started = false; // service fcoe was started +global boolean fcoe_started = false; // service lldpad was started + + +// Settings: Define all variables needed for configuration of fcoe-client // map containing information about values in /etc/fcoe/config map <string, string> fcoe_general_config = $[ "DEBUG":"no", "USE_SYSLOG":"yes" ]; -// list containing information about 'redo' commands -list <string> redo_list = []; +// Set value in fcoe_general_config +global void SetFcoeConfigValue( string param, string value ) +{ + fcoe_general_config[ param ] = value; +} + +// Returns the map containing general FCoE configuration +global map <string, string> GetFcoeConfig() +{ + return fcoe_general_config; +} + +// list containing information about commands to revert changes +list <string> revert_list = []; + +// Add a command to the list of revert commands +global void AddRevertCommand( string command ) +{ + revert_list = add( revert_list, command ); + y2milestone( "Adding revert command: %1", command ); +} + +// Get the list of revert commands +global list GetRevertCommands() +{ + return revert_list; +} -// map containing information about start of services +// Reset list of revert commands +global void ResetRevertCommands() +{ + revert_list = []; +} + +// map containing information about start of services at boot map <string, boolean> service_start = $[ "fcoe":false, "lldpad":false ]; +// map containing information about networks cards and VLAN, FCoE and DCB status +list <map> network_interfaces = []; + +// Returns the map containing all detected interfaces including +global list <map> GetNetworkCards() +{ + return network_interfaces; +} + +// Get currently selected network card +global map GetCurrentNetworkCard() +{ + return network_interfaces[current_card]:$[]; +} + +// Set network card values for given row +global void SetNetworkCardsValue( integer row, map card ) +{ + network_interfaces[row] = card; +} + +// Reset list of detected cards +global void ResetNetworkCards() +{ + network_interfaces = []; +} + // // Check whether open-fcoe is installed and do installation if user agrees // (dependencies: 'lldpad', 'libhbalinux2' and 'libHBAAPI2') @@ -437,6 +495,9 @@ return service_start; } +// +// Check status of services 'fcoe' and 'lldpad' and start them if required +// global boolean ServiceStatus() { // TODO - check whether loading any modules in Stage::initial() is required @@ -450,6 +511,7 @@ if ( success ) { y2milestone( "FCoE started (/etc/init.d/fcoe start)"); + fcoe_started = true;; } else { @@ -470,6 +532,7 @@ if ( success ) { y2milestone( "Lldpad started (/etc/init.d/lldpad start)"); + lldpad_started = true; } else { @@ -515,7 +578,7 @@ // FCoE isn't enabled on the switch - we can't do anything here // TODO - check link map from .probe.network and distinguish between // no cable attached and interface not up, Steffen: cannot be used, "no" - // can stand for 'noe cable' or 'not up' + // can stand for 'no cable connected' or 'interface not up' fcoe_vlan_interface = NOT_AVAILABLE; } else @@ -554,25 +617,6 @@ } // -// Returns the map containing all detected interfaces including -// configuration status of VLAN, FCoE and DCB -// -global list <map> GetNetworkCards() -{ - return network_interfaces; -} - -global map GetCurrentNetworkCard() -{ - return network_interfaces[current_card]:$[]; -} - -global void SetNetworkCardsValue( integer row, map card ) -{ - network_interfaces[row] = card; -} - -// // Read /etc/fcoe/config // global boolean ReadFcoeConfig() @@ -593,38 +637,8 @@ } // -// Set value in fcoe_general_config -// -global void SetFcoeConfigValue( string param, string value ) -{ - fcoe_general_config[ param ] = value; -} - -// -// Returns the map containing general FCoE configuration -// -global map <string, string> GetFcoeConfig() -{ - return fcoe_general_config; -} - -// -// Add a command to the list of redo commands +// Write /etc/fcoe/config using SCR agent // -global void AddRedoCommand( string command ) -{ - redo_list = add( redo_list, command ); - y2milestone( "Adding redo command: %1", command ); -} - -// -// Get the list of redo commands -// -global list GetRedoCommands() -{ - return redo_list; -} - global boolean WriteFcoeConfig() { boolean ret = true; @@ -643,6 +657,9 @@ return ret; } +// +// Write /etc/fcoe/cfg-ethx files +// global boolean WriteCfgFiles() { list <map> netcards = GetNetworkCards(); @@ -789,6 +806,7 @@ Progress::Finish(); if(PollAbort()) return false; + // modified = false is from CWM template modified = false; return true; @@ -840,7 +858,7 @@ // write settings if(PollAbort()) return false; Progress::NextStage(); - + boolean success = WriteFcoeConfig(); /* Error message */ if( !success ) Report::Error (_("Cannot write settings to /etc/fcoe/config.")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.2/src/inst_fcoe-client.ycp new/yast2-fcoe-client-2.21.3/src/inst_fcoe-client.ycp --- old/yast2-fcoe-client-2.21.2/src/inst_fcoe-client.ycp 2011-05-31 11:03:39.000000000 +0200 +++ new/yast2-fcoe-client-2.21.3/src/inst_fcoe-client.ycp 2011-06-07 13:39:04.000000000 +0200 @@ -24,7 +24,7 @@ import "Report"; import "Summary"; import "ModuleLoading"; -import "Packages"; +import "PackagesProposal"; import "Installation"; import "String"; import "FcoeClient"; @@ -41,20 +41,22 @@ // 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 -// TODO: check for running network - makes sense here ??? +// check for running network if( !NetworkService::RunningNetworkPopup() ) { y2error( "Network NOT set up" ); return nil; } +// reset global values +FcoeClient::ResetNetworkCards(); + // start services fcoe and lldpad success = FcoeClient::ServiceStatus(); if ( !success ) @@ -83,16 +85,21 @@ ret = MainSequence(); y2milestone("MainSequence ret=%1", ret); -// add package open-fcoe to installed system -Packages::addAdditionalPackage("open-fcoe"); - // workflow not aborted if ( ret == `next ) { + // add package open-fcoe to the pool that is used by software proposal + y2milestone( "Adding package open-fcoe to pool" ); + PackagesProposal::AddResolvables( "fcoe", `package, ["open-fcoe"] ); // write changes to config files + y2milestone( "Writing config files"); FcoeClient::WriteFcoeConfig(); FcoeClient::WriteCfgFiles(); + // restart fcoemon + y2milestone( "Restarting FCoE" ); FcoeClient::RestartServiceFcoe(); + // reset modified flag + FcoeClient::SetModified( false ); } /* Finish */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.2/src/wizards.ycp new/yast2-fcoe-client-2.21.3/src/wizards.ycp --- old/yast2-fcoe-client-2.21.2/src/wizards.ycp 2011-05-31 10:56:36.000000000 +0200 +++ new/yast2-fcoe-client-2.21.3/src/wizards.ycp 2011-06-08 13:13:38.000000000 +0200 @@ -74,42 +74,65 @@ "store" : StoreConfigurationDialog, ], ]; - map <string, any> tabs = - $[ - "services" : $[ - // Header of tab in tab widget - "header" : _("&Services"), - "widget_names" : ["serv"], - "contents" : ServicesDialogContent(), - ], - "interfaces" : $[ - // Header of tab in tab widget - "header" : _("&Interfaces"), - "widget_names" : ["inter"], - "contents" : InterfacesDialogContent(), - ], - "configuration" : $[ - // Header of tab in tab widget - "header" : _("&Configuration"), - "widget_names" : ["config"], - "contents" : ConfigurationDialogContent(), - ], - ]; - + map <string, any> tabs = $[]; + list tab_order = []; string ini_tab = ""; - map <string, boolean> status_map = FcoeClient::GetStartStatus(); - - if ( status_map["fcoe"]:false == true || status_map["lldpad"]:false == true ) + if ( Stage::initial() ) + { + tabs = $[ + "interfaces" : $[ + // Header of tab in tab widget + "header" : _("&Interfaces"), + "widget_names" : ["inter"], + "contents" : InterfacesDialogContent(), + ], + "configuration" : $[ + // Header of tab in tab widget + "header" : _("&Configuration"), + "widget_names" : ["config"], + "contents" : ConfigurationDialogContent(), + ], + ]; ini_tab = "interfaces"; + tab_order = [ "interfaces", "configuration"]; + } else - ini_tab = "services"; + { + tabs = $[ + "services" : $[ + // Header of tab in tab widget + "header" : _("&Services"), + "widget_names" : ["serv"], + "contents" : ServicesDialogContent(), + ], + "interfaces" : $[ + // Header of tab in tab widget + "header" : _("&Interfaces"), + "widget_names" : ["inter"], + "contents" : InterfacesDialogContent(), + ], + "configuration" : $[ + // Header of tab in tab widget + "header" : _("&Configuration"), + "widget_names" : ["config"], + "contents" : ConfigurationDialogContent(), + ], + ]; + + map <string, boolean> status_map = FcoeClient::GetStartStatus(); + if ( status_map["fcoe"]:false == true || status_map["lldpad"]:false == true ) + ini_tab = "interfaces"; + else + ini_tab = "services"; + tab_order = ["services", "interfaces", "configuration"]; + } map <string, any> wd = $[ "tab" : CWMTab::CreateWidget ( $[ - "tab_order" : ["services", "interfaces", "configuration"], + "tab_order" : tab_order, "tabs" : tabs, "widget_descr" : widgets, "initial_tab" : ini_tab, @@ -194,7 +217,7 @@ Wizard::CreateDialog(); any ret = Sequencer::Run(aliases, sequence); - y2milestone( "**** RETURN of MainSequence ****: %1", ret ); + UI::CloseDialog(); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.2/VERSION new/yast2-fcoe-client-2.21.3/VERSION --- old/yast2-fcoe-client-2.21.2/VERSION 2011-05-31 12:24:12.000000000 +0200 +++ new/yast2-fcoe-client-2.21.3/VERSION 2011-06-16 12:20:35.000000000 +0200 @@ -1 +1 @@ -2.21.2 +2.21.3 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
