- **status**: review --> fixed
- **assigned_to**: Canh Truong -->  nobody 
- **Milestone**: 5.2.FC --> 5.0.2
- **Comment**:

changeset:   8559:cf55b10ad97d
tag:         tip
parent:      8554:282c0a6e6d8f
user:        Canh Van Truong <[email protected]>
date:        Mon Jan 09 18:25:23 2017 +0700
summary:     log: fix log file is changed during si-swap [#2247]

changeset:   8558:3ed15e1b89f9
branch:      opensaf-5.1.x
parent:      8555:ab8689bfc0ba
user:        Canh Van Truong <[email protected]>
date:        Fri Dec 30 05:11:55 2016 +0700
summary:     log: fix log file is changed during si-swap [#2247]

changeset:   8557:496e112e0515
branch:      opensaf-5.0.x
user:        Canh Van Truong <[email protected]>
date:        Tue Feb 07 11:22:58 2017 +0700
summary:     log: fix log file is changed during si-swap [#2247]




---

** [tickets:#2247] log: Log stream file is not reserved during si-swap**

**Status:** fixed
**Milestone:** 5.0.2
**Created:** Wed Dec 28, 2016 10:50 AM UTC by Tai Dinh
**Last Updated:** Tue Jan 03, 2017 07:08 AM UTC
**Owner:** nobody


The fix for #2215 introduce a change in log_stream_open_fileinit(). i.e:
-  if (stream->numOpeners == 0) {
+  if ((stream->numOpeners == 0) || (*stream->p_fd == -1)) {

This will cause an unexpected behaviour during switchover, I guess.
The reason of it is because numOpeners will be checkpointed between the 
activate and the standby one meanwhile p_fd is node locally.
At starting up, both ACTIVE and STANDBY will have numOpeners and p_fd set to 0 
and -1 accordingly.
After that, ACTIVE open the stream, increase the numOpeners and sync this value 
to standby. Also p_fd on ACTIVE will be set to the opened file but this value 
is not checked point to standby.
During switchover, the p_fd of standby will always equal to -1, this cause the 
stream filename will always be changed.

This can be easily reproduce by
- create an application stream
- saflogger to write some messages to it 
- trigger an si-swap on OpenSAF SI.
- write another log to above application stream.
- Check that the stream filename has been rotated.

/Tai


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to