Ok, hanks for the review and comment. I guess it is the journal file in this case that is left behind. If it is a trivial fix then I will add it before pushing.
/AndersBj -----Original Message----- From: Neelakanta Reddy [mailto:[email protected]] Sent: den 20 maj 2014 16:29 To: Anders Björnerstedt; Zoran Milinkovic Cc: [email protected] Subject: Re: [PATCH 0 of 1] Review Request for immpbe: unlink any /tmp/imm.db.xxxx file and journal when exiting on error [#869] Hi AndersBj, Reviewed and tested the patch. Ack with following comments: immdump -p /tmp/dump.db In the immdump case, the temporary file created because of immdump is not unlinked. This is because "IMMSV_PBE_TMP_DIR" is not exported for immdump. If the defect scope is not immdump, then a new ticket has to be created. /Neel. On Friday 09 May 2014 06:09 PM, Anders Bjornerstedt wrote: > Summary: immpbe: unlink any /tmp/imm.db.xxxx file and journal when > exiting on error [#869] Review request for Trac Ticket(s): 869 Peer > Reviewer(s): Neel; Zoran Pull request to: > Affected branch(es): 4.3; 4.4; default(4.5) Development branch: > > -------------------------------- > Impacted area Impact y/n > -------------------------------- > Docs n > Build system n > RPM/packaging n > Configuration files n > Startup scripts n > SAF services n > OpenSAF services n > Core libraries n > Samples n > Tests n > Other n > > > Comments (indicate scope for each "y" above): > --------------------------------------------- > > changeset c71ace4de3807588089ad78ec00f5a9db1a9bca3 > Author: Anders Bjornerstedt <[email protected]> > Date: Fri, 09 May 2014 14:18:13 +0200 > > immpbe: unlink any /tmp/imm.db.xxxx file and journal when exiting on > error > [#869] > > Symptoms of the problem are dropped imm.db.xxxxxx files, mkstemp(3), and > imm.db.xxxxxx-journal files. The journal files are actually consistently > dropped as empty files even on successfull generation of imm.db. > > The cause is simply an omission to unlink the temp file when exiting on > error and the fact that that sqlite never unlinks the journal file when > journaling mode is TRUNCATE. The journaling mode was altered for PBE a > few > years ago. > > Solution is to catch all cases of controlled exit of PBE during the > generation of the temporary imm.db file and unlink these files before > exiting. This ticket does not take care of cleaning up files dropped by > an > uncontrolled crash of PBE. To solve that problem safely and reliably we > need > to create all temporary imm.db files in a sub directory to the > configured > IMMSV_PBE_TMP_DIR in immnd.conf. That is a change of file representation > that is more risky, needs more righorous sytem testing and will thus be > added as an enhancement. > > > Complete diffstat: > ------------------ > osaf/libs/common/immsv/immpbe_dump.cc | 66 > ++++++++++++++++++++++++++++++++++++++---------------------------- > osaf/libs/common/immsv/include/immpbe_dump.hh | 10 +++++----- > osaf/services/saf/immsv/immpbed/immpbe.cc | 32 > +++++++++++++++++++++++++++----- > osaf/services/saf/immsv/immpbed/immpbe_daemon.cc | 8 ++++++-- > osaf/tools/safimm/immdump/imm_dumper.cc | 19 +++++++++++++++---- > 5 files changed, 91 insertions(+), 44 deletions(-) > > > Testing Commands: > ----------------- > Actually testing dropped tmp files requires fault injection to the PBE. > The patch also fixes the removval of the droped empty journal file. > This is easy to check. > > > Testing, Expected Results: > -------------------------- > Without this patch, the empty imm.db.XXXXXX-journal file is always > droped in the /tmp direcotry (or the directory configured for tmp > files). Alaso on any case of controlledexit of PBE during generation > of imm.db.XXXXXX temprary file will drop that file in the sam tmp directory. > > With this patch, no imm.db files should be dropped in the tmp > directory except possibly after uncontrolled crash of PBE. > Implementation of cleanup of tmp files dropped after crash will be tracked > by a separate enhancement ticket. > This is a defect ticket. > > > Conditions of Submission: > ------------------------- > Ack from Neel and Zoran. > > > Arch Built Started Linux distro > ------------------------------------------- > mips n n > mips64 n n > x86 n n > x86_64 n n > powerpc n n > powerpc64 n n > > > Reviewer Checklist: > ------------------- > [Submitters: make sure that your review doesn't trigger any > checkmarks!] > > > Your checkin has not passed review because (see checked entries): > > ___ Your RR template is generally incomplete; it has too many blank entries > that need proper data filled in. > > ___ You have failed to nominate the proper persons for review and push. > > ___ Your patches do not have proper short+long header > > ___ You have grammar/spelling in your header that is unacceptable. > > ___ You have exceeded a sensible line length in your headers/comments/text. > > ___ You have failed to put in a proper Trac Ticket # into your commits. > > ___ You have incorrectly put/left internal data in your comments/files > (i.e. internal bug tracking tool IDs, product names etc) > > ___ You have not given any evidence of testing beyond basic build tests. > Demonstrate some level of runtime or other sanity testing. > > ___ You have ^M present in some of your files. These have to be removed. > > ___ You have needlessly changed whitespace or added whitespace crimes > like trailing spaces, or spaces before tabs. > > ___ You have mixed real technical changes with whitespace and other > cosmetic code cleanup changes. These have to be separate commits. > > ___ You need to refactor your submission into logical chunks; there is > too much content into a single commit. > > ___ You have extraneous garbage in your review (merge commits etc) > > ___ You have giant attachments which should never have been sent; > Instead you should place your content in a public tree to be pulled. > > ___ You have too many commits attached to an e-mail; resend as threaded > commits, or place in a public tree for a pull. > > ___ You have resent this content multiple times without a clear indication > of what has changed between each re-send. > > ___ You have failed to adequately and individually address all of the > comments and change requests that were proposed in the initial review. > > ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) > > ___ Your computer have a badly configured date and time; confusing the > the threaded patch review. > > ___ Your changes affect IPC mechanism, and you don't present any results > for in-service upgradability test. > > ___ Your changes affect user manual and documentation, your patch series > do not contain the patch that updates the Doxygen manual. > ------------------------------------------------------------------------------ "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 [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
