----- [email protected] wrote: > > -----Original Message----- > > From: Mathivanan Naickan Palanivelu > [mailto:[email protected]] > > Sent: den 25 juni 2014 15:40 > > To: Anders Björnerstedt > > Cc: Hans Feldt; [email protected] > > Subject: Re: [devel] [PATCH 1 of 1] smf: update campaign state > before restoring pbe in the completed state [#944] > > > > Hi Hans, > > > > SMF retries for about ~ 3.5 minutes on the IMM apis. > > immutilWrapperProfile.nTries = 500; /* Times */ > > immutilWrapperProfile.retryInterval = 400; /* MS */ > > > > > > If PBE generation can take a long time, then i think > > the patch does addresses the issue. i.e. the patch first updates the > IMM > > about the campaign state and subsequently enables the PBE. > [Hans] this just push the problem somewhere else (below called "higher > level SW management" i.e. the user of SMF). The event change is the > trigger for the SMF user. I don't see much value in the proposed > patch. If instead SMF enables PBE and then changed the state and > waited for it to complete, the SMF user would not need any changes. > You are suggesting SMF to wait forever till the IMM API succeeds? I thought the basic problem is that this (prolonged wait) behaviour is causing some problems with the application written on top of opensaf.
> The problem starts in smfd_campaign_oi.cc function updateImmAttr where > SMF silently ignores the fact that updating IMM failed. What should we > do here? Log the failure and exit would be a good start. That is early > error detection and would have save us a lot of time. The SMF states > (read from IMM) are an interface to SMF users and SMF can't just go on > if it fails to update the states. With this patch, obviously the SMF state update will succeed(if it fails we should ofcourse log, but we seem to understand that 3.5 minutes is good enough for the pbe activation). 1) User runs the command - campaign EXECUTE 2) Command returns to the prompt and Campaign is in EXECUTION COMPLETED state 3) Admin verifies the upgrade Note: Here an application built on top of OpenSAF may wait to access the IMM data(probably to check the status of an SMF attribute), but that is still a valid behaviour to wait. I am not sure if we can define a threshold for PBE activation, because that seems to be dependent of the file system and if so it cannot be deemed an error. 4) Admin then runs the command - Campaign COMMIT The pbe activation is done as the last activity of campaign completion. The campaign EXECUTE command will succeed and the actual pbe activation can go on in the background(by IMM) till the commit happenes. Mathi. > > This obviously needs more understanding of the whole picture. If the user of SMF(application written on top of OpenSAF) is not timebound or can wait forever for the upgrade status, then the patch can be changed instead to wait forever in a loop for the API to succeed. Are you okay with that? Thanks, Mathi. > > Thanks, > Hans > > > > > > So, i thought there is no necessity to infinitely retry on the IMM > APIs > > except only if the IMM maintainers would suggest that an IMM API > call can > > be blocked for minutes (till ~ 3.5 minutes) at a stretch (both > during a pbe-enabled > > or disabled scenario)! > > > > Thanks, > > Mathi. > > > > ----- [email protected] wrote: > > > > > Below it refers to "immutil waittime". > > > I dont know exactly what that is but the default timeout in the > imma > > > API is 10 seconds. > > > > > > So if tou here anticipate to get blocked by the PBE regenerating > its > > > file, which is what happens > > > when you enable the PBE, then that is a way way too low a timeout. > How > > > long the PBE takes to > > > generate the file depends on the file system. But even for sync > (the > > > other blocker of ccb writes) > > > we say 60 seconds is the max allowed time. > > > > > > /AndersBj > > > > > > > > > -----Original Message----- > > > From: Hans Feldt [mailto:[email protected]] > > > Sent: den 25 juni 2014 13:34 > > > To: [email protected] > > > Cc: [email protected] > > > Subject: Re: [devel] [PATCH 1 of 1] smf: update campaign state > before > > > restoring pbe in the completed state [#944] > > > > > > Mathi, Ingvar is on vacation. > > > > > > We have our doubts about this patch. We would like to see SMF > retry > > > setting the campaign state to COMPLETED until it succeeds. This > state > > > change is a trigger for higher level SW management functionality. > With > > > the proposed change in SMF the next level is also affected and > needs > > > to cater for a non-writeable IMM. > > > > > > Is it possible for SMF to retry until it succeeds instead? > > > > > > Thanks, > > > Hans > > > > > > > -----Original Message----- > > > > From: [email protected] > [mailto:[email protected]] > > > > Sent: den 24 juni 2014 03:16 > > > > To: Ingvar Bergström > > > > Cc: [email protected] > > > > Subject: [devel] [PATCH 1 of 1] smf: update campaign state > before > > > > restoring pbe in the completed state [#944] > > > > > > > > osaf/services/saf/smfsv/smfd/SmfCampState.cc | 7 ++++--- > > > > 1 files changed, 4 insertions(+), 3 deletions(-) > > > > > > > > > > > > By way of ticket #677 we restore the pbe in the campaign > completed > > > state itself. > > > > i.e. > > > > In SmfCampStateExecuting::executeWrapup() > > > > { > > > > > > > > a) we first restore the pbe > > > > i.e. i_camp->restorePbe(); > > > > > > > > b) And, then subsequently update the campaign state, i.e. > > > > changeState(i_camp, SmfCampStateExecCompleted::instance()); > > > > > > > > } > > > > However, it is possible that when the pbe is restored, the pbe > could > > > > > > > take more time (than the immutil wait time) to become > functionally > > > ready. And in such sitautions, the updation to the campaign state > will > > > not succeed until the PBE is really ready. > > > > The patch updates the campaign state first (to imm) inthe > completed > > > > > > > state and subsequently restores the pbe. > > > > > > > > diff --git a/osaf/services/saf/smfsv/smfd/SmfCampState.cc > > > > b/osaf/services/saf/smfsv/smfd/SmfCampState.cc > > > > --- a/osaf/services/saf/smfsv/smfd/SmfCampState.cc > > > > +++ b/osaf/services/saf/smfsv/smfd/SmfCampState.cc > > > > @@ -838,9 +838,6 @@ SmfCampStateExecuting::executeWrapup(Smf > > > > return SMF_CAMP_FAILED; > > > > } > > > > > > > > - //Activate IMM BPE if active when campaign was started. > > > > - i_camp->restorePbe(); > > > > - > > > > // TODO Start wait to complete timer > > > > LOG_NO("CAMP: Start wait to complete timer (not implemented > > > yet)"); > > > > > > > > @@ -848,6 +845,10 @@ SmfCampStateExecuting::executeWrapup(Smf > > > > changeState(i_camp, SmfCampStateExecCompleted::instance()); > > > > > > > > LOG_NO("CAMP: Upgrade campaign completed %s", > > > > i_camp->getCampaignName().c_str()); > > > > + > > > > + //Activate IMM BPE if active when campaign was started. > > > > + i_camp->restorePbe(); > > > > + > > > > TRACE_LEAVE(); > > > > return SMF_CAMP_COMPLETED; > > > > } > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > -------- HPCC Systems Open Source Big Data Platform from > LexisNexis > > > > > > > Risk Solutions Find What Matters Most in Your Big Data with > HPCC > > > > Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty > Data. > > > > Leverages Graph Analysis for Fast Processing & Easy Data > Exploration > > > > > > > http://p.sf.net/sfu/hpccsystems > > > > _______________________________________________ > > > > Opensaf-devel mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/opensaf-devel > > > > > > > ------------------------------------------------------------------------------ > > > Open source business process management suite built on Java and > > > Eclipse Turn processes into business applications with Bonita BPM > > > Community Edition Quickly connect people, data, and systems into > > > organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner > awards > > > http://p.sf.net/sfu/Bonitasoft > > > _______________________________________________ > > > Opensaf-devel mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
