From: Renier M. <re...@us...> - 2006-08-17 20:00:03
|
Thanks. I'll take a look and patch this up. Saludos, --Renier ope...@li... wrote on 08/17/2006 01:31:37 AM: > I found another (non serious) bug in the event processing code. When > the daemon is running, but nobody is listening for events, > process_resource_event will be run > MAX_TIMES_REQUEUED +1 times. > > If a FRU is hotswapped out it will attempt to remove the resource each > time it does this. The equivalent add resource section of the code > only does it on the first pass through the function. > > Here is the patch to fix it: > > --- src/event.c 2006-08-10 15:16:18.000000000 +1200 > +++ /openhpi-2.6.0/src/event.c 2006-08-17 17:29:01.000000000 +1200 > @@ -290,7 +290,8 @@ > } > } else if (e->event.EventType == SAHPI_ET_HOTSWAP) { > state = e->event.EventDataUnion.HotSwapEvent.HotSwapState; > - if (state == SAHPI_HS_STATE_NOT_PRESENT) { > + if (state == SAHPI_HS_STATE_NOT_PRESENT && > + e->times_requeued < 1) { > oh_remove_resource(rpt, e->resource.ResourceId); > } > } else { > > Regards, > Luuk > > On 8/15/06, Renier Morales <re...@us...> wrote: > > There is a bug in the code. > > SAHPI_ET_RESOURCE events should be accepted whether the rptentry has the > > FRU capability set or not. Need to fix this. > > SAHPI_ET_HOTSWAP events which come with an rptentry whose FRU capability > > is not set should be dropped. This is already how it works, > > > > During first discovery, not all events for discovered resources have to be > > SAHPI_ET_RESOURCE. If the resource is a FRU, then the event can be a > > SAHPI_ET_HOTSWAP event. The infrastructure will take the resource and add > > it (or update it) into the RPT in the same way that it would process a > > Non-FRU resource for the first time. That means that all RDRs for the > > first-timer FRU resource will also be added to the RPT. > > The current and previous hotswap states for such first-time FRU resources > > can be the same (e.g. both ACTIVE). That is, to my understanding, > > perfectly valid. > > > > To update the rptentry information of a resource (FRU or Non-FRU), as when > > there has been a tag change or severity change, you can send a > > SAHPI_ET_RESOURCE (ADDED state) with the updated rptentry. The RPT will be > > updated accordingly, but the SAHPI_ET_RESOURCE event will not be sent to > > the sessions as the resource already is in the RPT. > > > > Saludos, > > > > --Renier > > > > Renier Morales > > OpenHPI Team > > > > ope...@li... wrote on 08/12/2006 09:57:42 > > AM: > > > > > Renier, > > > > > > This code segment in event.c line 337 > > > > > > switch (e->event.EventType) { > > > case SAHPI_ET_RESOURCE: > > > trace("Event Type = Resource"); > > > if (e->resource.ResourceCapabilities > > > & SAHPI_CAPABILITY_FRU) { > > > dbg("Invalid event. Dropping."); > > > } else { > > > process_resource_event(e); > > > } > > > break; > > > > > > At time T0 discovery, I have understood that all my events are > > > RESOURCE events for all discoverred resources regardless of > > > resource's SAHPI_CAPABILITY_FRU. The above test discards all my T0 > > > resources found at discovery. > > > > > > To clarify the design of new oh_event, the **follow** is my > > understanding > > > (a) At time T0 discovery, all events for discovered resources are > > > SAHPI_ET_RESOURCE regardless of resource's SAHPI_CAPABILITY_FRU. > > > (b) During operation, SAHPI_ET_HOTSWAP events are required for FRU > > > resources for hotswap removal and installation of FRU resources. > > > (c)During operation, SAHPI_ET_RESOURCE events are for NON-FRU > > > resource failure and recovery. > > > (d) During operation, SAHPI_ET_HOTSWAP events for NON-FRU resources > > > are dropped. > > > (e) During operation, SAHPI_ET_RESOURCE events for FRU resources are > > dropped. > > > > > > ** Questions ** > > > (a) Would you clarify the new oh_event implementation relating ot my > > > understanding above. > > > (b) Would you clarify event types for rpt state change events for > > > FRU and NON-FRU resources, hpi APIs saHpiResourceSeveritySet() and > > > saHpiResourceTagSet(). > > > > > > Peter, > > > Regards, > > > > > > -------------------------------------------------------------------------------------------- > > > P. D. Phan > > > IBM Austin > > > > > > -------------------------------------------------------------------------------------------- > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > Openhpi-devel mailing list > > > Ope...@li... > > > https://lists.sourceforge.net/lists/listinfo/openhpi-devel > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make yourjob easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Openhpi-devel mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openhpi-devel > > > > > -- > Luuk Paulussen > http://bl00dnu7.net > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Openhpi-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openhpi-devel |