->Initially created application stream using saLogStreamOpen_2 and updated the 
severity filter with a given value and checked whether saLogWriteLogAsync() 
honors the updated severity values.

Comment: -


-> Once the severity is verified, stream is closed using the api 
saLogStreamClose() api.

Comment: -


-> Now the same stream is opened again and severity filter with new value is 
verified again.

Comment: -


-> While verifying for different values , once stream is not closed, but 
saLogStreamClose() returned SA_AIS_OK. Log file is not closed and moved.

Comment:
TR fileclose_h - API error LGSF_TIMEOUT and the following LGSF_BUSY errors 
means that the file system is not responding resulting in a POSIX close() that 
does not return. The log service is protected from these kind of problems by 
running all file i/o in separate thread. If a file operation does not return 
the operation will timeout and a message will be written in the TRACE file. If 
another file operation is attempted while the previous one is still "hanging" 
LGSF_BUSY is reported.
In such a situation saLogStreamClose() will return SA_AIS_OK because the stream 
is closed even if the files could not be closed and renamed with a close time 
stamp. This is however logged in the syslog "NO Could not close log files: 
Connection timed out"


-> The further call to saLogStreamOpen_2 and saLogWriteLogAsync returned 
SA_AIS_OK, but the calls failed at log_file_api function with return value 
LGSF_BUSY.

Comment:
A stream can be opened even if the file system is not accessable and 
saLogStreamOpen_2() will return SA_AIS_OK. In this situation however no log 
files are created.
It is also OK to write log records in this situation. The API 
saLogWriteLogAsync() will return SA_AIS_OK if there was no problem sending the 
log record to the server. If the file system is working again the log files 
will be created, the log record is written and the asynchronous write callback 
status parameter will contain SA_AIS_OK. If the file system is still not 
possible to access (LGSF_BUSY) saLogWriteLogAsync() will still return SA_AIS_OK 
but the log record is not written. The asynchronous write callback status 
parameter will in this case contain SA_AIS_ERR_TRY_AGAIN.


-> If saLogStreamClose is called again at this stage / logsv application exits, 
further logsv calls succeed properly.

Comment:
Does "logsv application exits" means that the active log server is reastarted 
(node restart)? If this is the case there is a problem. If not everything seems 
to work as it should and the ticket can be closed.



---

** [tickets:#1369] LOG: logsv api returns SA_AIS_OK, internal function 
log_file_api fails  with LGSF_BUSY / TIMEOUT**

**Status:** unassigned
**Milestone:** future
**Created:** Mon May 11, 2015 09:37 AM UTC by Srikanth R
**Last Updated:** Mon May 11, 2015 09:40 AM UTC
**Owner:** nobody

Changset : 6490


Issue : logsv api returns SA_AIS_OK, internal function log_file_api fails  with 
LGSF_BUSY

Steps for reproduction :

 ->Initially created application stream using saLogStreamOpen_2 and updated the 
severity filter with a given value and checked whether saLogWriteLogAsync() 
honors the updated severity values.

 -> Once the severity is verified, stream is closed using the api 
saLogStreamClose() api.


 -> Now the same stream is opened again and severity filter with new value is 
verified again.


 -> While verifying for different values , once stream is not closed, but 
saLogStreamClose() returned SA_AIS_OK. Log file is not closed and moved.


May 11 11:28:50.818385 osaflogd [29121:lgs_stream.c:0127] TR fileclose_h - API 
error LGSF_TIMEOUT
May 11 11:28:50.818426 osaflogd [29121:lgs_stream.c:0138] << fileclose_h: rc = 
-1
May 11 11:28:50.818597 osaflogd [29121:lgs_stream.c:0858] NO Could not close 
log files: Connection timed out


 -> The further call to saLogStreamOpen_2 and saLogWriteLogAsync returned 
SA_AIS_OK, but the calls failed at log_file_api function with return value 
LGSF_BUSY. 


May 11 11:28:50.827987 osaflogd [29121:imma_oi_api.c:3049] << 
rt_object_create_common
May 11 11:28:50.828005 osaflogd [29121:lgs_stream.c:0675] << log_stream_new
May 11 11:28:50.828014 osaflogd [29121:lgs_evt.c:0871] << create_new_app_stream
May 11 11:28:50.828022 osaflogd [29121:lgs_stream.c:0790] >> 
log_stream_open_fileinit: safLgStr=test_app_stream2, numOpeners=0
May 11 11:28:50.828038 osaflogd [29121:lgs_stream.c:0306] >> 
log_initiate_stream_files
May 11 11:28:50.828045 osaflogd [29121:lgs_stream.c:0197] >> delete_config_file
May 11 11:28:50.828054 osaflogd [29121:lgs_stream.c:0156] >> file_unlink_h
May 11 11:28:50.828304 osaflogd [29121:lgs_file.c:0367] TR log_file_api - 
LGSF_BUSY
May 11 11:28:50.828320 osaflogd [29121:lgs_stream.c:0173] TR file_unlink_h - 
API error LGSF_BUSY
May 11 11:28:50.828332 osaflogd [29121:lgs_stream.c:0180] << file_unlink_h: rc 
= -1
May 11 11:28:50.828359 osaflogd [29121:lgs_stream.c:0210] << 
delete_config_file: rc = -1
May 11 11:28:50.828366 osaflogd [29121:lgs_stream.c:0226] >> rotate_if_needed
May 11 11:28:50.828372 osaflogd [29121:lgs_stream.c:0957] >> 
get_number_of_log_files_h
May 11 11:28:50.828378 osaflogd [29121:lgs_file.c:0367] TR log_file_api - 
LGSF_BUSY
May 11 11:28:50.828384 osaflogd [29121:lgs_stream.c:0996] TR 
get_number_of_log_files_h - API error LGSF_BUSY
May 11 11:28:50.828389 osaflogd [29121:lgs_stream.c:1003] << 
get_number_of_log_files_h
May 11 11:28:50.828394 osaflogd [29121:lgs_stream.c:0251] << rotate_if_needed: 
rc = -1
May 11 11:28:50.828399 osaflogd [29121:lgs_stream.c:0325] TR 
log_initiate_stream_files - rotate_if_needed() FAIL
May 11 11:28:50.828404 osaflogd [29121:lgs_stream.c:0347] << 
log_initiate_stream_files
May 11 11:28:50.828409 osaflogd [29121:lgs_stream.c:0805] << 
log_stream_open_fileinit: numOpeners=1
May 11 11:28:50.828415 osaflogd [29121:lgs_stream.c:0378] T2 ******** Stream 
safLgStr=test_app_stream2 ********
May 11 11:28:50.828420 osaflogd [29121:lgs_stream.c:0379] T2   fileName:        
     sev_stream
May 11 11:28:50.828425 osaflogd [29121:lgs_stream.c:0380] T2   pathName:        
     test_app_logs
May 11 11:28:50.828430 osaflogd [29121:lgs_stream.c:0381] T2   maxLogFileSize:  
     1025
May 11 11:28:50.828435 osaflogd [29121:lgs_stream.c:0382] T2   
fixedLogRecordSize:   20
May 11 11:28:50.828440 osaflogd [29121:lgs_stream.c:0384] T2   haProperty:      
     1
May 11 11:28:50.828446 osaflogd [29121:lgs_stream.c:0385] T2   logFullAction:   
     3
May 11 11:28:50.828451 osaflogd [29121:lgs_stream.c:0386] T2   
logFullHaltThreshold: 0
May 11 11:28:50.828455 osaflogd [29121:lgs_stream.c:0387] T2   maxFilesRotated: 
     4
May 11 11:28:50.828460 osaflogd [29121:lgs_stream.c:0388] T2   logFileFormat:   
     start @Sv end
May 11 11:28:50.828465 osaflogd [29121:lgs_stream.c:0389] T2   severityFilter:  
     7f
May 11 11:28:50.828470 osaflogd [29121:lgs_stream.c:0390] T2   
creationTimeStamp:    1431323930826027977
May 11 11:28:50.828476 osaflogd [29121:lgs_stream.c:0391] T2   numOpeners:      
     1
May 11 11:28:50.828481 osaflogd [29121:lgs_stream.c:0392] T2   streamId:        
     4
May 11 11:28:50.828485 osaflogd [29121:lgs_stream.c:0393] T2   fd:              
     -1

....
May 11 11:28:50.876043 osaflogd [29121:lgs_stream.c:1202] >> 
log_stream_write_h: safLgStr=test_app_stream2
May 11 11:28:50.876047 osaflogd [29121:lgs_stream.c:0306] >> 
log_initiate_stream_files
May 11 11:28:50.876051 osaflogd [29121:lgs_stream.c:0197] >> delete_config_file
May 11 11:28:50.876055 osaflogd [29121:lgs_stream.c:0156] >> file_unlink_h
May 11 11:28:50.876060 osaflogd [29121:lgs_file.c:0367] TR log_file_api - 
LGSF_BUSY
May 11 11:28:50.876064 osaflogd [29121:lgs_stream.c:0173] TR file_unlink_h - 
API error LGSF_BUSY




 -> If saLogStreamClose is called again at this stage / logsv application 
exits, further logsv calls succeed properly.














---

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.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to