Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
Thanks Anders. I will do that before pushing. Regards, Vu From: Anders Widell [mailto:anders.wid...@ericsson.com] Sent: Thursday, August 4, 2016 3:23 PM To: Vu Minh Nguyen <vu.m.ngu...@dektech.com.au>; 'Lennart Lund' <lennart.l...@ericsson.com>; mahesh.va...@oracle.com Cc: opensaf-devel@lists.sourceforge.net Subject: Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315] Hi Vu! Could you re-format the README files so that you keep the line length below 80 characters? Hint: If you are using the emacs configuration provided on the wiki (which you should :-), then you can easily re-format the text by pressing M-q in each paragraph. Also delete all trailing whitespace at the end of the lines. Hint: You can do this by marking all the text and then typing M-x delete-trailing-whitespace thanks, Anders Widell On 08/03/2016 12:28 PM, Vu Minh Nguyen wrote: Hi Lennart, Please see my responses in line, started with [Vu]. I will create a new README file for saflogger tool and put the info related to new test cases to `~/tests/logsv/README`. Updated files are attached. Please have a look. Thanks. Regards, Vu -Original Message- From: Lennart Lund [mailto:lennart.l...@ericsson.com] Sent: Wednesday, August 3, 2016 2:50 PM To: Vu Minh Nguyen <mailto:vu.m.ngu...@dektech.com.au> <vu.m.ngu...@dektech.com.au>; mahesh.va...@oracle.com <mailto:mahesh.va...@oracle.com> Cc: opensaf-devel@lists.sourceforge.net <mailto:opensaf-devel@lists.sourceforge.net> Subject: RE: [PATCH 1 of 1] log: Readme file for long DN support [#1315] Hi Vu In general this document should not be a document describing what to implement instead it should describe what is implemented and what in the log service that is affected by long DN and to some extent how it is implemented. See some comments/examples inline. To have information here about the saflogger tool I think is ok but maybe it is a good idea to have a README file in the .../tools/saflog/ directory? [Vu] Ok. I will create new README file for saflogger tool. The file content is attached (README file) Also some comments inline [Lennart] Comments on the other patches will follow Thanks Lennart -Original Message- From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] Sent: den 4 juli 2016 05:07 To: mahesh.va...@oracle.com <mailto:mahesh.va...@oracle.com> ; Lennart Lund <mailto:lennart.l...@ericsson.com> <lennart.l...@ericsson.com> Cc: opensaf-devel@lists.sourceforge.net <mailto:opensaf-devel@lists.sourceforge.net> Subject: [PATCH 1 of 1] log: Readme file for long DN support [#1315] osaf/services/saf/logsv/README_LONGDN | 138 ++ 1 files changed, 138 insertions(+), 0 deletions(-) Show changes for long DN, including: 1) saflogger tool 2) log agent 3) log services 4) test suite diff --git a/osaf/services/saf/logsv/README_LONGDN b/osaf/services/saf/logsv/README_LONGDN new file mode 100644 --- /dev/null +++ b/osaf/services/saf/logsv/README_LONGDN @@ -0,0 +1,138 @@ +# +# -*- OpenSAF -*- +# +# (C) Copyright 2016 The OpenSAF Foundation +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed +# under the GNU Lesser General Public License Version 2.1, February 1999. +# The complete license can be accessed from the following location: +# http://opensource.org/licenses/lgpl-license.php +# See the Copying file included with the OpenSAF distribution for full +# licensing terms. +# +# Author(s): Ericsson AB +# + +I. GENERAL INFORMATION (#1315) +== + +The SaNameT type, which is used to pass distinguished stream DNs name in saLogStreamOpen_2() API, +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which belong to `SaLogRecordT` +data structure passed to `saLogWriteLogAsync()` API, contains a fixed-size buffer that limits +the string length to a maximum of 255 bytes. + +#1315 ticket was raised for LOG to support long DN. The use cases could be: +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using Log API. +UC2) Create any long DN name stream using Log API. +UC3) Write record to long DN app stream using saflogger tool. [Lennart] A stream name is not a DN. Please rephrase. [Vu] I rephrased it. + +The implementation was split into following parts: +1) Update saflogger tool - add one more option `-f` +2) Update LOG agent (API) to support Long DN +3) Update LOG service to support Long DN +4) Create test cases + +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. [Lennart] Remove this sentence [Vu] Done. + + +II) IMPLEMENTATION (#1315) +== + +1) Update saflogger tool - Add One More Option `-f` [Lennart] This document shall contain inform
Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
Hi Vu! Could you re-format the README files so that you keep the line length below 80 characters? Hint: If you are using the emacs configuration provided on the wiki (which you should :-), then you can easily re-format the text by pressing M-q in each paragraph. Also delete all trailing whitespace at the end of the lines. Hint: You can do this by marking all the text and then typing M-x delete-trailing-whitespace thanks, Anders Widell On 08/03/2016 12:28 PM, Vu Minh Nguyen wrote: > Hi Lennart, > > Please see my responses in line, started with [Vu]. > I will create a new README file for saflogger tool and put the info related > to new test cases to `~/tests/logsv/README`. > > Updated files are attached. Please have a look. Thanks. > > Regards, Vu > >> -Original Message- >> From: Lennart Lund [mailto:lennart.l...@ericsson.com] >> Sent: Wednesday, August 3, 2016 2:50 PM >> To: Vu Minh Nguyen; >> mahesh.va...@oracle.com >> Cc: opensaf-devel@lists.sourceforge.net >> Subject: RE: [PATCH 1 of 1] log: Readme file for long DN support [#1315] >> >> Hi Vu >> >> In general this document should not be a document describing what to >> implement instead it should describe what is implemented and what in the >> log service that is affected by long DN and to some extent how it is >> implemented. See some comments/examples inline. >> To have information here about the saflogger tool I think is ok but maybe > it >> is a good idea to have a README file in the .../tools/saflog/ directory? > [Vu] Ok. I will create new README file for saflogger tool. The file content > is attached (README file) > >> Also some comments inline [Lennart] >> >> Comments on the other patches will follow >> >> Thanks >> Lennart >> >>> -Original Message- >>> From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] >>> Sent: den 4 juli 2016 05:07 >>> To: mahesh.va...@oracle.com; Lennart Lund >>> Cc: opensaf-devel@lists.sourceforge.net >>> Subject: [PATCH 1 of 1] log: Readme file for long DN support [#1315] >>> >>> osaf/services/saf/logsv/README_LONGDN | 138 >>> ++ >>> 1 files changed, 138 insertions(+), 0 deletions(-) >>> >>> >>> Show changes for long DN, including: >>> 1) saflogger tool >>> 2) log agent >>> 3) log services >>> 4) test suite >>> >>> diff --git a/osaf/services/saf/logsv/README_LONGDN >>> b/osaf/services/saf/logsv/README_LONGDN >>> new file mode 100644 >>> --- /dev/null >>> +++ b/osaf/services/saf/logsv/README_LONGDN >>> @@ -0,0 +1,138 @@ >>> +# >>> +# -*- OpenSAF -*- >>> +# >>> +# (C) Copyright 2016 The OpenSAF Foundation >>> +# >>> +# This program is distributed in the hope that it will be useful, but >>> +# WITHOUT ANY WARRANTY; without even the implied warranty of >>> MERCHANTABILITY >>> +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are >>> licensed >>> +# under the GNU Lesser General Public License Version 2.1, February >> 1999. >>> +# The complete license can be accessed from the following location: >>> +# http://opensource.org/licenses/lgpl-license.php >>> +# See the Copying file included with the OpenSAF distribution for full >>> +# licensing terms. >>> +# >>> +# Author(s): Ericsson AB >>> +# >>> + >>> +I. GENERAL INFORMATION (#1315) >>> +== >>> + >>> +The SaNameT type, which is used to pass distinguished stream DNs name >> in >>> saLogStreamOpen_2() API, >>> +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which >>> belong to `SaLogRecordT` >>> +data structure passed to `saLogWriteLogAsync()` API, contains a > fixed-size >>> buffer that limits >>> +the string length to a maximum of 255 bytes. >>> + >>> +#1315 ticket was raised for LOG to support long DN. The use cases could >> be: >>> +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using >>> Log API. >>> +UC2) Create any long DN name stream using Log API. >>> +UC3) Write record to long DN app stream using saflogger tool. >> [Lennart] A stream name is not a DN. Please rephrase. > [Vu] I rephrased it. > >>> + >>> +The implementation was split into following parts: >>> +1) Update saflogger tool - add one more option `-f` >>> +2) Update LOG agent (API) to support Long DN >>> +3) Update LOG service to support Long DN >>> +4) Create test cases >>> + >>> +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. >> [Lennart] Remove this sentence > [Vu] Done. >>> + >>> + >>> +II) IMPLEMENTATION (#1315) >>> +== >>> + >>> +1) Update saflogger tool - Add One More Option `-f` >> [Lennart] This document shall contain information for existing >> implementation not what to be implemented. This means that frases like >> Update saflogger... or Add one more... etc. should not be used. This >> comment applies also to the rest of the document >> This header could be changed to something like: >> 1) saflogger tool, '-f' option > [Vu] Done. >>>
Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
Hi Lennart, Please see my responses in line, started with [Vu]. I will create a new README file for saflogger tool and put the info related to new test cases to `~/tests/logsv/README`. Updated files are attached. Please have a look. Thanks. Regards, Vu > -Original Message- > From: Lennart Lund [mailto:lennart.l...@ericsson.com] > Sent: Wednesday, August 3, 2016 2:50 PM > To: Vu Minh Nguyen; > mahesh.va...@oracle.com > Cc: opensaf-devel@lists.sourceforge.net > Subject: RE: [PATCH 1 of 1] log: Readme file for long DN support [#1315] > > Hi Vu > > In general this document should not be a document describing what to > implement instead it should describe what is implemented and what in the > log service that is affected by long DN and to some extent how it is > implemented. See some comments/examples inline. > To have information here about the saflogger tool I think is ok but maybe it > is a good idea to have a README file in the .../tools/saflog/ directory? [Vu] Ok. I will create new README file for saflogger tool. The file content is attached (README file) > > Also some comments inline [Lennart] > > Comments on the other patches will follow > > Thanks > Lennart > > > -Original Message- > > From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] > > Sent: den 4 juli 2016 05:07 > > To: mahesh.va...@oracle.com; Lennart Lund > > Cc: opensaf-devel@lists.sourceforge.net > > Subject: [PATCH 1 of 1] log: Readme file for long DN support [#1315] > > > > osaf/services/saf/logsv/README_LONGDN | 138 > > ++ > > 1 files changed, 138 insertions(+), 0 deletions(-) > > > > > > Show changes for long DN, including: > > 1) saflogger tool > > 2) log agent > > 3) log services > > 4) test suite > > > > diff --git a/osaf/services/saf/logsv/README_LONGDN > > b/osaf/services/saf/logsv/README_LONGDN > > new file mode 100644 > > --- /dev/null > > +++ b/osaf/services/saf/logsv/README_LONGDN > > @@ -0,0 +1,138 @@ > > +# > > +# -*- OpenSAF -*- > > +# > > +# (C) Copyright 2016 The OpenSAF Foundation > > +# > > +# This program is distributed in the hope that it will be useful, but > > +# WITHOUT ANY WARRANTY; without even the implied warranty of > > MERCHANTABILITY > > +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are > > licensed > > +# under the GNU Lesser General Public License Version 2.1, February > 1999. > > +# The complete license can be accessed from the following location: > > +# http://opensource.org/licenses/lgpl-license.php > > +# See the Copying file included with the OpenSAF distribution for full > > +# licensing terms. > > +# > > +# Author(s): Ericsson AB > > +# > > + > > +I. GENERAL INFORMATION (#1315) > > +== > > + > > +The SaNameT type, which is used to pass distinguished stream DNs name > in > > saLogStreamOpen_2() API, > > +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which > > belong to `SaLogRecordT` > > +data structure passed to `saLogWriteLogAsync()` API, contains a fixed-size > > buffer that limits > > +the string length to a maximum of 255 bytes. > > + > > +#1315 ticket was raised for LOG to support long DN. The use cases could > be: > > +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using > > Log API. > > +UC2) Create any long DN name stream using Log API. > > +UC3) Write record to long DN app stream using saflogger tool. > [Lennart] A stream name is not a DN. Please rephrase. [Vu] I rephrased it. > > + > > +The implementation was split into following parts: > > +1) Update saflogger tool - add one more option `-f` > > +2) Update LOG agent (API) to support Long DN > > +3) Update LOG service to support Long DN > > +4) Create test cases > > + > > +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. > [Lennart] Remove this sentence [Vu] Done. > > > + > > + > > +II) IMPLEMENTATION (#1315) > > +== > > + > > +1) Update saflogger tool - Add One More Option `-f` > [Lennart] This document shall contain information for existing > implementation not what to be implemented. This means that frases like > Update saflogger... or Add one more... etc. should not be used. This > comment applies also to the rest of the document > This header could be changed to something like: > 1) saflogger tool, '-f' option [Vu] Done. > > +- > > +`-f` option is only applicable for application stream. Means it is only valid > > +when comes together with option `-a`. If no `-f` is provided, default > > behavior is maintained. > [Lennart] Consider refrasing to: > Means it is only valid with option `-a`. [Vu] Done > > > + > > +Why need to add new option `-f` to saflogger tool? > > +When long DN is supported, user is able to put long DN name after option > `- > > a`, and saflogger tool will > > +use that long DN for log file name of that app stream. In that
Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
Hi Vu In general this document should not be a document describing what to implement instead it should describe what is implemented and what in the log service that is affected by long DN and to some extent how it is implemented. See some comments/examples inline. To have information here about the saflogger tool I think is ok but maybe it is a good idea to have a README file in the .../tools/saflog/ directory? Also some comments inline [Lennart] Comments on the other patches will follow Thanks Lennart > -Original Message- > From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] > Sent: den 4 juli 2016 05:07 > To: mahesh.va...@oracle.com; Lennart Lund> Cc: opensaf-devel@lists.sourceforge.net > Subject: [PATCH 1 of 1] log: Readme file for long DN support [#1315] > > osaf/services/saf/logsv/README_LONGDN | 138 > ++ > 1 files changed, 138 insertions(+), 0 deletions(-) > > > Show changes for long DN, including: > 1) saflogger tool > 2) log agent > 3) log services > 4) test suite > > diff --git a/osaf/services/saf/logsv/README_LONGDN > b/osaf/services/saf/logsv/README_LONGDN > new file mode 100644 > --- /dev/null > +++ b/osaf/services/saf/logsv/README_LONGDN > @@ -0,0 +1,138 @@ > +# > +# -*- OpenSAF -*- > +# > +# (C) Copyright 2016 The OpenSAF Foundation > +# > +# This program is distributed in the hope that it will be useful, but > +# WITHOUT ANY WARRANTY; without even the implied warranty of > MERCHANTABILITY > +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are > licensed > +# under the GNU Lesser General Public License Version 2.1, February 1999. > +# The complete license can be accessed from the following location: > +# http://opensource.org/licenses/lgpl-license.php > +# See the Copying file included with the OpenSAF distribution for full > +# licensing terms. > +# > +# Author(s): Ericsson AB > +# > + > +I. GENERAL INFORMATION (#1315) > +== > + > +The SaNameT type, which is used to pass distinguished stream DNs name in > saLogStreamOpen_2() API, > +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which > belong to `SaLogRecordT` > +data structure passed to `saLogWriteLogAsync()` API, contains a fixed-size > buffer that limits > +the string length to a maximum of 255 bytes. > + > +#1315 ticket was raised for LOG to support long DN. The use cases could be: > +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using > Log API. > +UC2) Create any long DN name stream using Log API. > +UC3) Write record to long DN app stream using saflogger tool. [Lennart] A stream name is not a DN. Please rephrase. > + > +The implementation was split into following parts: > +1) Update saflogger tool - add one more option `-f` > +2) Update LOG agent (API) to support Long DN > +3) Update LOG service to support Long DN > +4) Create test cases > + > +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. [Lennart] Remove this sentence > + > + > +II) IMPLEMENTATION (#1315) > +== > + > +1) Update saflogger tool - Add One More Option `-f` [Lennart] This document shall contain information for existing implementation not what to be implemented. This means that frases like Update saflogger... or Add one more... etc. should not be used. This comment applies also to the rest of the document This header could be changed to something like: 1) saflogger tool, '-f' option > +- > +`-f` option is only applicable for application stream. Means it is only valid > +when comes together with option `-a`. If no `-f` is provided, default > behavior is maintained. [Lennart] Consider refrasing to: Means it is only valid with option `-a`. > + > +Why need to add new option `-f` to saflogger tool? > +When long DN is supported, user is able to put long DN name after option `- > a`, and saflogger tool will > +use that long DN for log file name of that app stream. In that case, the log > file name will be over 256 characters in length. > +As the result, logsv could get failed to create such long file name (most > Unix > system supports file name length up to 255 characters). > + > + > +2) Update LOG Agent (API) to Support Long DN > +- > +All internal SaNameT will be replaced by SaConstStringT and functions > handling extended SaNameT are used. > + > +One point needs to be noticed is that, with extended SaNameT, data size > could be up to 2048 bytes (not limited to 256 bytes any more). > +As the result, several condition checking for max length size against 256 > bytes will be updated to 2048 bytes (kOsafMaxDnLength). > +So, when supported long DN client (e.g: log client running on OpenSAF 5.1 > or newer versions) sends an record containing long DN > +(e.g: `notificationObject` length > 256 bytes) to active Log service not > support long DN (e.g: active log running
Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
Hi Vu, I don't think it is required , I will check OpenSAF_extensions_PR. -AVM On 7/8/2016 10:30 AM, Vu Minh Nguyen wrote: > Hi Mahesh, > > In the OpenSAF_extensions_PR, it stated clearly how to enable extended > SaNameT in application at 4.3 section. > I am wondering it is redundant to re-state such info in every services that > has Long DN support. > > Regards, Vu > >> -Original Message- >> From: A V Mahesh [mailto:mahesh.va...@oracle.com] >> Sent: Friday, July 8, 2016 11:42 AM >> To: Vu Minh Nguyen; >> lennart.l...@ericsson.com >> Cc: opensaf-devel@lists.sourceforge.net >> Subject: Re: [PATCH 1 of 1] log: Readme file for long DN support [#1315] >> >> Hi Vu, >> >> It seems this README doesn't explained , how to enable >> SA_ENABLE_EXTENDED_NAMES on a node, >> >> if some application is creating an app stream ( NOT using saflogger tool >> ) DN is longer than 255 characters in length. >> >> -AVM >> >> On 7/4/2016 8:36 AM, Vu Minh Nguyen wrote: >>>osaf/services/saf/logsv/README_LONGDN | 138 >> ++ >>>1 files changed, 138 insertions(+), 0 deletions(-) >>> >>> >>> Show changes for long DN, including: >>> 1) saflogger tool >>> 2) log agent >>> 3) log services >>> 4) test suite >>> >>> diff --git a/osaf/services/saf/logsv/README_LONGDN >> b/osaf/services/saf/logsv/README_LONGDN >>> new file mode 100644 >>> --- /dev/null >>> +++ b/osaf/services/saf/logsv/README_LONGDN >>> @@ -0,0 +1,138 @@ >>> +# >>> +# -*- OpenSAF -*- >>> +# >>> +# (C) Copyright 2016 The OpenSAF Foundation >>> +# >>> +# This program is distributed in the hope that it will be useful, but >>> +# WITHOUT ANY WARRANTY; without even the implied warranty of >> MERCHANTABILITY >>> +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are >> licensed >>> +# under the GNU Lesser General Public License Version 2.1, February >> 1999. >>> +# The complete license can be accessed from the following location: >>> +# http://opensource.org/licenses/lgpl-license.php >>> +# See the Copying file included with the OpenSAF distribution for full >>> +# licensing terms. >>> +# >>> +# Author(s): Ericsson AB >>> +# >>> + >>> +I. GENERAL INFORMATION (#1315) >>> +== >>> + >>> +The SaNameT type, which is used to pass distinguished stream DNs name >> in saLogStreamOpen_2() API, >>> +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which >> belong to `SaLogRecordT` >>> +data structure passed to `saLogWriteLogAsync()` API, contains a > fixed-size >> buffer that limits >>> +the string length to a maximum of 255 bytes. >>> + >>> +#1315 ticket was raised for LOG to support long DN. The use cases could >> be: >>> +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using >> Log API. >>> +UC2) Create any long DN name stream using Log API. >>> +UC3) Write record to long DN app stream using saflogger tool. >>> + >>> +The implementation was split into following parts: >>> +1) Update saflogger tool - add one more option `-f` >>> +2) Update LOG agent (API) to support Long DN >>> +3) Update LOG service to support Long DN >>> +4) Create test cases >>> + >>> +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. >>> + >>> + >>> +II) IMPLEMENTATION (#1315) >>> +== >>> + >>> +1) Update saflogger tool - Add One More Option `-f` >>> +- >>> +`-f` option is only applicable for application stream. Means it is only > valid >>> +when comes together with option `-a`. If no `-f` is provided, default >> behavior is maintained. >>> + >>> +Why need to add new option `-f` to saflogger tool? >>> +When long DN is supported, user is able to put long DN name after > option >> `-a`, and saflogger tool will >>> +use that long DN for log file name of that app stream. In that case, > the log >> file name will be over 256 characters in length. >>> +As the result, logsv could get failed to create such long file name > (most >> Unix system supports file name length up to 255 characters). >>> + >>> + >>> +2) Update LOG Agent (API) to Support Long DN >>> +- >>> +All internal SaNameT will be replaced by SaConstStringT and functions >> handling extended SaNameT are used. >>> + >>> +One point needs to be noticed is that, with extended SaNameT, data size >> could be up to 2048 bytes (not limited to 256 bytes any more). >>> +As the result, several condition checking for max length size against > 256 >> bytes will be updated to 2048 bytes (kOsafMaxDnLength). >>> +So, when supported long DN client (e.g: log client running on OpenSAF > 5.1 >> or newer versions) sends an record containing long DN >>> +(e.g: `notificationObject` length > 256 bytes) to active Log service > not >> support long DN (e.g: active log running on OpenSAF 5.0 >>> +or older versions), that log client will get `SA_AIS_ERR_TRY_AGAIN` >> always and make cause the log client
Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
Hi Mahesh, In the OpenSAF_extensions_PR, it stated clearly how to enable extended SaNameT in application at 4.3 section. I am wondering it is redundant to re-state such info in every services that has Long DN support. Regards, Vu > -Original Message- > From: A V Mahesh [mailto:mahesh.va...@oracle.com] > Sent: Friday, July 8, 2016 11:42 AM > To: Vu Minh Nguyen; > lennart.l...@ericsson.com > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [PATCH 1 of 1] log: Readme file for long DN support [#1315] > > Hi Vu, > > It seems this README doesn't explained , how to enable > SA_ENABLE_EXTENDED_NAMES on a node, > > if some application is creating an app stream ( NOT using saflogger tool > ) DN is longer than 255 characters in length. > > -AVM > > On 7/4/2016 8:36 AM, Vu Minh Nguyen wrote: > > osaf/services/saf/logsv/README_LONGDN | 138 > ++ > > 1 files changed, 138 insertions(+), 0 deletions(-) > > > > > > Show changes for long DN, including: > > 1) saflogger tool > > 2) log agent > > 3) log services > > 4) test suite > > > > diff --git a/osaf/services/saf/logsv/README_LONGDN > b/osaf/services/saf/logsv/README_LONGDN > > new file mode 100644 > > --- /dev/null > > +++ b/osaf/services/saf/logsv/README_LONGDN > > @@ -0,0 +1,138 @@ > > +# > > +# -*- OpenSAF -*- > > +# > > +# (C) Copyright 2016 The OpenSAF Foundation > > +# > > +# This program is distributed in the hope that it will be useful, but > > +# WITHOUT ANY WARRANTY; without even the implied warranty of > MERCHANTABILITY > > +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are > licensed > > +# under the GNU Lesser General Public License Version 2.1, February > 1999. > > +# The complete license can be accessed from the following location: > > +# http://opensource.org/licenses/lgpl-license.php > > +# See the Copying file included with the OpenSAF distribution for full > > +# licensing terms. > > +# > > +# Author(s): Ericsson AB > > +# > > + > > +I. GENERAL INFORMATION (#1315) > > +== > > + > > +The SaNameT type, which is used to pass distinguished stream DNs name > in saLogStreamOpen_2() API, > > +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which > belong to `SaLogRecordT` > > +data structure passed to `saLogWriteLogAsync()` API, contains a fixed-size > buffer that limits > > +the string length to a maximum of 255 bytes. > > + > > +#1315 ticket was raised for LOG to support long DN. The use cases could > be: > > +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using > Log API. > > +UC2) Create any long DN name stream using Log API. > > +UC3) Write record to long DN app stream using saflogger tool. > > + > > +The implementation was split into following parts: > > +1) Update saflogger tool - add one more option `-f` > > +2) Update LOG agent (API) to support Long DN > > +3) Update LOG service to support Long DN > > +4) Create test cases > > + > > +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. > > + > > + > > +II) IMPLEMENTATION (#1315) > > +== > > + > > +1) Update saflogger tool - Add One More Option `-f` > > +- > > +`-f` option is only applicable for application stream. Means it is only valid > > +when comes together with option `-a`. If no `-f` is provided, default > behavior is maintained. > > + > > +Why need to add new option `-f` to saflogger tool? > > +When long DN is supported, user is able to put long DN name after option > `-a`, and saflogger tool will > > +use that long DN for log file name of that app stream. In that case, the log > file name will be over 256 characters in length. > > +As the result, logsv could get failed to create such long file name (most > Unix system supports file name length up to 255 characters). > > + > > + > > +2) Update LOG Agent (API) to Support Long DN > > +- > > +All internal SaNameT will be replaced by SaConstStringT and functions > handling extended SaNameT are used. > > + > > +One point needs to be noticed is that, with extended SaNameT, data size > could be up to 2048 bytes (not limited to 256 bytes any more). > > +As the result, several condition checking for max length size against 256 > bytes will be updated to 2048 bytes (kOsafMaxDnLength). > > +So, when supported long DN client (e.g: log client running on OpenSAF 5.1 > or newer versions) sends an record containing long DN > > +(e.g: `notificationObject` length > 256 bytes) to active Log service not > support long DN (e.g: active log running on OpenSAF 5.0 > > +or older versions), that log client will get `SA_AIS_ERR_TRY_AGAIN` > always and make cause the log client hang. > > +There is no problem with the opposite case (non-support long DN do > communicate with supported long DN). > > + > > + > > +3) Update LOG Service to Support Long DN > >
Re: [devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
Hi Vu, It seems this README doesn't explained , how to enable SA_ENABLE_EXTENDED_NAMES on a node, if some application is creating an app stream ( NOT using saflogger tool ) DN is longer than 255 characters in length. -AVM On 7/4/2016 8:36 AM, Vu Minh Nguyen wrote: > osaf/services/saf/logsv/README_LONGDN | 138 > ++ > 1 files changed, 138 insertions(+), 0 deletions(-) > > > Show changes for long DN, including: > 1) saflogger tool > 2) log agent > 3) log services > 4) test suite > > diff --git a/osaf/services/saf/logsv/README_LONGDN > b/osaf/services/saf/logsv/README_LONGDN > new file mode 100644 > --- /dev/null > +++ b/osaf/services/saf/logsv/README_LONGDN > @@ -0,0 +1,138 @@ > +# > +# -*- OpenSAF -*- > +# > +# (C) Copyright 2016 The OpenSAF Foundation > +# > +# This program is distributed in the hope that it will be useful, but > +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY > +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed > +# under the GNU Lesser General Public License Version 2.1, February 1999. > +# The complete license can be accessed from the following location: > +# http://opensource.org/licenses/lgpl-license.php > +# See the Copying file included with the OpenSAF distribution for full > +# licensing terms. > +# > +# Author(s): Ericsson AB > +# > + > +I. GENERAL INFORMATION (#1315) > +== > + > +The SaNameT type, which is used to pass distinguished stream DNs name in > saLogStreamOpen_2() API, > +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which > belong to `SaLogRecordT` > +data structure passed to `saLogWriteLogAsync()` API, contains a fixed-size > buffer that limits > +the string length to a maximum of 255 bytes. > + > +#1315 ticket was raised for LOG to support long DN. The use cases could be: > +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using Log > API. > +UC2) Create any long DN name stream using Log API. > +UC3) Write record to long DN app stream using saflogger tool. > + > +The implementation was split into following parts: > +1) Update saflogger tool - add one more option `-f` > +2) Update LOG agent (API) to support Long DN > +3) Update LOG service to support Long DN > +4) Create test cases > + > +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. > + > + > +II) IMPLEMENTATION (#1315) > +== > + > +1) Update saflogger tool - Add One More Option `-f` > +- > +`-f` option is only applicable for application stream. Means it is only valid > +when comes together with option `-a`. If no `-f` is provided, default > behavior is maintained. > + > +Why need to add new option `-f` to saflogger tool? > +When long DN is supported, user is able to put long DN name after option > `-a`, and saflogger tool will > +use that long DN for log file name of that app stream. In that case, the log > file name will be over 256 characters in length. > +As the result, logsv could get failed to create such long file name (most > Unix system supports file name length up to 255 characters). > + > + > +2) Update LOG Agent (API) to Support Long DN > +- > +All internal SaNameT will be replaced by SaConstStringT and functions > handling extended SaNameT are used. > + > +One point needs to be noticed is that, with extended SaNameT, data size > could be up to 2048 bytes (not limited to 256 bytes any more). > +As the result, several condition checking for max length size against 256 > bytes will be updated to 2048 bytes (kOsafMaxDnLength). > +So, when supported long DN client (e.g: log client running on OpenSAF 5.1 or > newer versions) sends an record containing long DN > +(e.g: `notificationObject` length > 256 bytes) to active Log service not > support long DN (e.g: active log running on OpenSAF 5.0 > +or older versions), that log client will get `SA_AIS_ERR_TRY_AGAIN` always > and make cause the log client hang. > +There is no problem with the opposite case (non-support long DN do > communicate with supported long DN). > + > + > +3) Update LOG Service to Support Long DN > + > +In original code, logsv used NCS PATRICIA TREE as an database to hold all > existing LOG streams in system, > +and taking stream DN as the keyword for searching/adding/deleting tree > elements. > +NCS PATRICIA TREE has a limitation with keyword size. It is only supported > the key size up to 600 bytes. > +With long DN, stream DN could be up to 2024 bytes (kOsafMaxDnLength), that > tree is no longer valid. > + > +Besides, logsv is providing other database named `stream_array` which is > used to hold all LOG existing streams. > +When there is any new stream created, `log_stream_t` holding information of > that stream, will be added to that database > +and when the stream is closed and no
[devel] [PATCH 1 of 1] log: Readme file for long DN support [#1315]
osaf/services/saf/logsv/README_LONGDN | 138 ++ 1 files changed, 138 insertions(+), 0 deletions(-) Show changes for long DN, including: 1) saflogger tool 2) log agent 3) log services 4) test suite diff --git a/osaf/services/saf/logsv/README_LONGDN b/osaf/services/saf/logsv/README_LONGDN new file mode 100644 --- /dev/null +++ b/osaf/services/saf/logsv/README_LONGDN @@ -0,0 +1,138 @@ +# +# -*- OpenSAF -*- +# +# (C) Copyright 2016 The OpenSAF Foundation +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed +# under the GNU Lesser General Public License Version 2.1, February 1999. +# The complete license can be accessed from the following location: +# http://opensource.org/licenses/lgpl-license.php +# See the Copying file included with the OpenSAF distribution for full +# licensing terms. +# +# Author(s): Ericsson AB +# + +I. GENERAL INFORMATION (#1315) +== + +The SaNameT type, which is used to pass distinguished stream DNs name in saLogStreamOpen_2() API, +or in `logSvcUsrName`, `notificationObject` or `notifyingObject` which belong to `SaLogRecordT` +data structure passed to `saLogWriteLogAsync()` API, contains a fixed-size buffer that limits +the string length to a maximum of 255 bytes. + +#1315 ticket was raised for LOG to support long DN. The use cases could be: +UC1) Write log records using the long DN in @Sl, @No, @Ng tokens using Log API. +UC2) Create any long DN name stream using Log API. +UC3) Write record to long DN app stream using saflogger tool. + +The implementation was split into following parts: +1) Update saflogger tool - add one more option `-f` +2) Update LOG agent (API) to support Long DN +3) Update LOG service to support Long DN +4) Create test cases + +Besides, README file and OpenSAF_LOG_PR.odt have to be updated. + + +II) IMPLEMENTATION (#1315) +== + +1) Update saflogger tool - Add One More Option `-f` +- +`-f` option is only applicable for application stream. Means it is only valid +when comes together with option `-a`. If no `-f` is provided, default behavior is maintained. + +Why need to add new option `-f` to saflogger tool? +When long DN is supported, user is able to put long DN name after option `-a`, and saflogger tool will +use that long DN for log file name of that app stream. In that case, the log file name will be over 256 characters in length. +As the result, logsv could get failed to create such long file name (most Unix system supports file name length up to 255 characters). + + +2) Update LOG Agent (API) to Support Long DN +- +All internal SaNameT will be replaced by SaConstStringT and functions handling extended SaNameT are used. + +One point needs to be noticed is that, with extended SaNameT, data size could be up to 2048 bytes (not limited to 256 bytes any more). +As the result, several condition checking for max length size against 256 bytes will be updated to 2048 bytes (kOsafMaxDnLength). +So, when supported long DN client (e.g: log client running on OpenSAF 5.1 or newer versions) sends an record containing long DN +(e.g: `notificationObject` length > 256 bytes) to active Log service not support long DN (e.g: active log running on OpenSAF 5.0 +or older versions), that log client will get `SA_AIS_ERR_TRY_AGAIN` always and make cause the log client hang. +There is no problem with the opposite case (non-support long DN do communicate with supported long DN). + + +3) Update LOG Service to Support Long DN + +In original code, logsv used NCS PATRICIA TREE as an database to hold all existing LOG streams in system, +and taking stream DN as the keyword for searching/adding/deleting tree elements. +NCS PATRICIA TREE has a limitation with keyword size. It is only supported the key size up to 600 bytes. +With long DN, stream DN could be up to 2024 bytes (kOsafMaxDnLength), that tree is no longer valid. + +Besides, logsv is providing other database named `stream_array` which is used to hold all LOG existing streams. +When there is any new stream created, `log_stream_t` holding information of that stream, will be added to that database +and when the stream is closed and no client connects to that stream, it will be removed from the database. +That database is a two-dimensional array with data format: + { + { , }, + { , }, + ... + } + +Logsv is able to query below infos from `stream_array` that logsv used to do so based on NCS PATRICIA TREE: +- Is there any current log stream with specific DN in system? +- Or what are the current log existing streams in system? +Therefore, NCS PATRICIA TREE can be