[devel] [PATCH 1 of 1] smfd: campaign can be committed after cluster reboot in state completed [#906]

2014-05-15 Thread Ingvar Bergstrom
 osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc |  10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)


Without this patch a cluster reboot in state "execution completed" will put
the upgrade campaign in a fail state if the old unused versioned types are
removed in the campaign wrapup "campCompleteAction" portion of the campaign.
A campaign in fail state can not be committed.

diff --git a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc 
b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
--- a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
@@ -1315,11 +1315,19 @@ SmfUpgradeProcedure::addStepModification
  std::multimap &i_objects)
 {
//This method is called for each calculated step. The purpose is to 
find out and add the modifications 
-   //which shold be carried out for this step. The targetEntityTemplate 
parent/type part of the procedure (in the campaign) 
+   //which should be carried out for this step. The targetEntityTemplate 
parent/type part of the procedure (in the campaign) 
//is used to match the steps activation/deactivation units. 
//If a match is found the modifications associated with this 
parent/type shall be added to the step.
 TRACE_ENTER();
 
+//Skip this for procedures in state completed, modifications will not 
be needed if completed.
+//This can happend if the cluster is rebooted and will fail if the 
reboot is performed when the 
+//versioned types are removed i.e. during test traffic, if the types 
was removed in campaign wrapup/complete section.
+if (getState() == SA_SMF_PROC_COMPLETED) {
+TRACE_LEAVE();
+return true;
+}
+
std::list < SmfTargetEntityTemplate * >::const_iterator it;
 
//For each targetEntityTemplate in the procedure

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1 of 1] smfd: campaign can be committed after cluster reboot in state completed [#906]

2014-05-16 Thread Anders Widell
Ack.

/ Anders Widell

On 05/15/2014 03:16 PM, Ingvar Bergstrom wrote:
>   osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc |  10 +-
>   1 files changed, 9 insertions(+), 1 deletions(-)
>
>
> Without this patch a cluster reboot in state "execution completed" will put
> the upgrade campaign in a fail state if the old unused versioned types are
> removed in the campaign wrapup "campCompleteAction" portion of the campaign.
> A campaign in fail state can not be committed.
>
> diff --git a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc 
> b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
> --- a/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
> +++ b/osaf/services/saf/smfsv/smfd/SmfUpgradeProcedure.cc
> @@ -1315,11 +1315,19 @@ SmfUpgradeProcedure::addStepModification
> std::multimap objectInst> &i_objects)
>   {
>   //This method is called for each calculated step. The purpose is to 
> find out and add the modifications
> - //which shold be carried out for this step. The targetEntityTemplate 
> parent/type part of the procedure (in the campaign)
> + //which should be carried out for this step. The targetEntityTemplate 
> parent/type part of the procedure (in the campaign)
>   //is used to match the steps activation/deactivation units.
>   //If a match is found the modifications associated with this 
> parent/type shall be added to the step.
>   TRACE_ENTER();
>   
> +//Skip this for procedures in state completed, modifications will 
> not be needed if completed.
> +//This can happend if the cluster is rebooted and will fail if the 
> reboot is performed when the
> +//versioned types are removed i.e. during test traffic, if the types 
> was removed in campaign wrapup/complete section.
> +if (getState() == SA_SMF_PROC_COMPLETED) {
> +TRACE_LEAVE();
> +return true;
> +}
> +
>   std::list < SmfTargetEntityTemplate * >::const_iterator it;
>   
>   //For each targetEntityTemplate in the procedure


--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel