[Openais] More ACTIVE units than the number defined in group.conf exist

Steven Dake scd at broked.org
Sat Sep 4 16:55:37 PDT 2004


Miyotaka-san

I have applied your patches.

Thanks for the contributions.

Regards
-steve


On Sat, 2004-09-04 at 10:42, SAKAI MIYOTAKA wrote:
> Steve ,
> 
> I made the patch attached to this message .
> 
> I did  another  changes to  this patch.
> 
> 1.  eliminate compile warning of lib/evs.c
> 2.   addtion  "evsbench"  to  make  clean  target
> 
> Regards
> - Miyotaka sakai
> 
> SAKAI MIYOTAKA wrote:
> 
> >Steve,
> >
> >  
> >
> >>Could you use the diff -uNr command to make a patch with your change,
> >>and I'll merge the patch?
> >>
> >>    
> >>
> >It is OK with me .
> >Please gime me a time , because amf.c in may laptop has some printfs for
> >log .
> >
> >  
> >
> >>The current distributed state machine (this is
> >>why the code begins with dsm*)
> >>
> >>    
> >>
> >I would have liked to know what dsm stands for . It's a good name .
> >
> >Thanks .
> >Miyotaka sakai .
> >
> >Steven Dake wrote:
> >
> >  
> >
> >>Sakai-san,
> >>
> >>Great catch your right.  The current distributed state machine (this is
> >>why the code begins with dsm*) expects out of service to be entered from
> >>in_service/active, but this isn't a correct assumption.  The out of
> >>service state can also be entered in in_service/standby.
> >>
> >>Over the long term we need a reanalysis of the state machine with a
> >>clear documentation and testing approach.. Its a 3rd generation state
> >>machine, but I am not totally comfortable with it yet.
> >>
> >>Could you use the diff -uNr command to make a patch with your change,
> >>and I'll merge the patch?
> >>
> >>Regards
> >>-steve
> >>
> >>On Fri, 2004-09-03 at 17:59, SAKAI MIYOTAKA wrote:
> >>    
> >>
> >>>Hi ,
> >>>
> >>>It is the first time to send a message to this mailing-list.
> >>>
> >>>I am trying to execute the test programs in the openais package.
> >>>But the programs does not work as expected.
> >>>
> >>>Please take a look at the followings
> >>>
> >>>./aisexec
> >>>./testamf4
> >>>./testamf3
> >>> => both HA status are Active
> >>>./testamf5
> >>>./testamf6
> >>> => both are Standby
> >>>./testamf1
> >>>./testamf2
> >>> => both are Standby
> >>>
> >>>The component in the testamf2 calls a saAmfComponentUnregister function
> >>>after calling a saAmfComponentregister.
> >>>After that ,testamf5 and testamf6 change status as Active.
> >>>But I exepect that both keep Stanby.
> >>>It seems that more ACTIVE units than the number defined in group.conf
> >>>exist.
> >>>
> >>>If dsmDisabledUnlockedOutOfServiceCompleted funciton in amf.c
> >>>  is changed as following ,programs does work as expected.
> >>>
> >>>dsmDisabledUnlockedOutOfServiceCompleted( )
> >>>{
> >>>     .
> >>>     .
> >>>   group = unit->saAmfGroup;
> >>>
> >>>   /* add 3 lines */
> >>>   if ( activeServiceUnitsCount(group) >=
> >>>group->saAmfActiveUnitsDesired ) {
> >>>          retrun;
> >>>   }
> >>>
> >>>   if (servide UnitOutOfService == 1 ) {
> >>>           log_printf ( LOG ......
> >>>      .
> >>>      .
> >>>}
> >>>
> >>>If my idea isn't correct ,please tell me what is wrong.
> >>>
> >>>Thanks.
> >>>Miyotaka Sakai
> >>>      
> >>>
> 
> ______________________________________________________________________
> diff -Nur openais.2004-08-31.21.30/exec/amf.c openais/exec/amf.c
> --- openais.2004-08-31.21.30/exec/amf.c	2004-09-01 13:30:02.000000000 +0900
> +++ openais/exec/amf.c	2004-09-05 02:07:11.000000000 +0900
> @@ -961,6 +961,7 @@
>  	struct list_head *comp_list = 0;
>  	struct list_head *unit_list = 0;
>  	int serviceUnitInStandby = 0;
> +	int activeServiceUnits = 0;
>  
>  	/*
>  	 * Once all components of a service unit are out of service,
> @@ -988,6 +989,11 @@
>  	}
>  
>  	group = unit->saAmfGroup;
> +	activeServiceUnits = activeServiceUnitsCount(group);
> +	if (activeServiceUnits>=group->saAmfActiveUnitsDesired) {
> +		return;
> +	}
> +
>  	if (serviceUnitOutOfService == 1) {
>  		log_printf (LOG_LEVEL_DEBUG, "SU has gone out of service.\n");
>  		/*
> diff -Nur openais.2004-08-31.21.30/lib/evs.c openais/lib/evs.c
> --- openais.2004-08-31.21.30/lib/evs.c	2004-09-01 13:30:02.000000000 +0900
> +++ openais/lib/evs.c	2004-09-05 01:26:15.000000000 +0900
> @@ -184,7 +184,7 @@
>  	struct message_overlay *dispatch_data;
>  	int empty;
>  	struct res_header **queue_msg;
> -	struct res_header *msg;
> +	struct res_header *msg = NULL;
>  	int ignore_dispatch = 0;
>  
>  	error = saHandleInstanceGet (&evs_handle_t_db, *handle, (void *)&evs_inst);
> diff -Nur openais.2004-08-31.21.30/test/Makefile openais/test/Makefile
> --- openais.2004-08-31.21.30/test/Makefile	2004-09-01 13:30:02.000000000 +0900
> +++ openais/test/Makefile	2004-09-05 02:01:52.000000000 +0900
> @@ -106,7 +106,7 @@
>  	$(CC) $(LDFLAGS) -o ckptstress ckptstress.o $(LIBS)
>  
>  clean:
> -	rm -f *.o testclm testamf testamf1 testamf2 testamf3 testamf4 testamf5 testamf6 testamfth testckpt ckptstress testparse testtimer ckptbench ckptbenchth testevt testevs
> +	rm -f *.o testclm testamf testamf1 testamf2 testamf3 testamf4 testamf5 testamf6 testamfth testckpt ckptstress testparse testtimer ckptbench ckptbenchth testevt testevs evsbench
>  
>  %.o: %.c
>  	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
> 
> ______________________________________________________________________
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> http://lists.osdl.org/mailman/listinfo/openais




More information about the Openais mailing list