[devel] [PATCH 1/1] amfd: increase mds priority of amfnd down event [#3015]
To avoid the issue a node can not join the cluster when the PBE hung. --- src/amf/amfd/mds.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amf/amfd/mds.cc b/src/amf/amfd/mds.cc index 108f9b8..41b9325 100644 --- a/src/amf/amfd/mds.cc +++ b/src/amf/amfd/mds.cc @@ -457,7 +457,7 @@ static uint32_t avd_mds_svc_evt(MDS_CALLBACK_SVC_EVENT_INFO *evt_info) { evt->rcv_evt = AVD_EVT_MDS_AVND_DOWN; evt->info.node_id = m_NCS_NODE_ID_FROM_MDS_DEST(evt_info->i_dest); TRACE("avnd %" PRIx64 " down", evt_info->i_dest); - if (m_NCS_IPC_SEND(&cb->avd_mbx, evt, NCS_IPC_PRIORITY_HIGH) != + if (m_NCS_IPC_SEND(&cb->avd_mbx, evt, NCS_IPC_PRIORITY_VERY_HIGH) != NCSCC_RC_SUCCESS) { LOG_ER("%s: ncs_ipc_send failed", __FUNCTION__); delete evt; -- 2.7.4 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for amfd: increase mds priority of amfnd down event [#3015]
Summary: amfd: increase mds priority of amfnd down event [#3015] Review request for Ticket(s): 3015 Peer Reviewer(s): Gary, Minh Pull request to: Minh Affected branch(es): develop Development branch: ticket-3015 Base revision: 1f9cf4636b07d28a906f62b44144c337c5280f1a Personal repository: git://git.code.sf.net/u/thangng/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - revision e81b6874f37e9761594f7ee3328486062fcbddb3 Author: thang.d.nguyen Date: Wed, 27 Feb 2019 05:50:11 +0700 amfd: increase mds priority of amfnd down event [#3015] To avoid the issue a node can not join the cluster when the PBE hung. Complete diffstat: -- src/amf/amfd/mds.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Testing Commands: - N/A. Testing, Expected Results: -- N/A. Conditions of Submission: - Acked from reviwer. Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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 ~/.gitconfig file (i.e. user.name, user.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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 0/1] Review Request for amfd: increase mds priority of amfnd down event [#3015]
Hi Thang, + Hans If the issue is reproducible, can you upload the full log/trace to ticket please? Thanks Minh On 27/2/19 10:17 am, thang.d.nguyen wrote: Summary: amfd: increase mds priority of amfnd down event [#3015] Review request for Ticket(s): 3015 Peer Reviewer(s): Gary, Minh Pull request to: Minh Affected branch(es): develop Development branch: ticket-3015 Base revision: 1f9cf4636b07d28a906f62b44144c337c5280f1a Personal repository: git://git.code.sf.net/u/thangng/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - revision e81b6874f37e9761594f7ee3328486062fcbddb3 Author: thang.d.nguyen Date: Wed, 27 Feb 2019 05:50:11 +0700 amfd: increase mds priority of amfnd down event [#3015] To avoid the issue a node can not join the cluster when the PBE hung. Complete diffstat: -- src/amf/amfd/mds.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Testing Commands: - N/A. Testing, Expected Results: -- N/A. Conditions of Submission: - Acked from reviwer. Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y 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 ~/.gitconfig file (i.e. user.name, user.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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 0/1] Review Request for amfd: increase mds priority of amfnd down event [#3015]
Hi Minh, I posted the syslog and trace on the ticket. B.R /Thang -Original Message- From: Minh Hon Chau Sent: Friday, March 1, 2019 3:27 PM To: thang.d.nguyen ; gary@dektech.com.au; Hans Nordeback Cc: opensaf-devel@lists.sourceforge.net Subject: Re: [PATCH 0/1] Review Request for amfd: increase mds priority of amfnd down event [#3015] Hi Thang, + Hans If the issue is reproducible, can you upload the full log/trace to ticket please? Thanks Minh On 27/2/19 10:17 am, thang.d.nguyen wrote: > Summary: amfd: increase mds priority of amfnd down event [#3015] > Review request for Ticket(s): 3015 Peer Reviewer(s): Gary, Minh Pull > request to: Minh Affected branch(es): develop Development branch: > ticket-3015 Base revision: 1f9cf4636b07d28a906f62b44144c337c5280f1a > Personal repository: git://git.code.sf.net/u/thangng/review > > > Impacted area Impact y/n > > Docsn > Build systemn > RPM/packaging n > Configuration files n > Startup scripts n > SAF servicesy > OpenSAF servicesn > Core libraries n > Samples n > Tests n > Other n > > > Comments (indicate scope for each "y" above): > - > > revision e81b6874f37e9761594f7ee3328486062fcbddb3 > Author: thang.d.nguyen > Date: Wed, 27 Feb 2019 05:50:11 +0700 > > amfd: increase mds priority of amfnd down event [#3015] > > To avoid the issue a node can not join the cluster when the PBE hung. > > > > Complete diffstat: > -- > src/amf/amfd/mds.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > > Testing Commands: > - > N/A. > > Testing, Expected Results: > -- > N/A. > > Conditions of Submission: > - > Acked from reviwer. > > Arch Built StartedLinux distro > --- > mipsn n > mips64 n n > x86 n n > x86_64 y y > 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 ~/.gitconfig file (i.e. user.name, user.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. > > ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for nid: fix opensafd crashed during start-up [#3013] V2
Summary: nid: fix opensafd crashed during start-up [#3013] Review request for Ticket(s): 3013 Peer Reviewer(s): Hans Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3013 Base revision: 1f9cf4636b07d28a906f62b44144c337c5280f1a Personal repository: git://git.code.sf.net/u/winhvu/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesn OpenSAF servicesy Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 89751e679b5eb9230214414ca44410620d72af39 Author: Vu Minh Nguyen Date: Fri, 1 Mar 2019 16:05:12 +0700 nid: fix opensafd crashed during start-up [#3013] There is a dependency b/w svc_monitor_thread and spawn_services. The coredump happens when spawn_services is executed while the thread has not yet started. In this case, data is sent to the pipe but no one consumed it. When it comes to consume the data, will get unexpected data and crash the program. This patch ensures the things will happen in the right order: svc_monitor_thread must be in ready state before spawn_services() is executed. Complete diffstat: -- src/nid/nodeinit.cc | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) Testing Commands: - *** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES *** Testing, Expected Results: -- *** PASTE COMMAND OUTPUTS / TEST RESULTS *** Conditions of Submission: - *** HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC *** Arch Built StartedLinux distro --- mipsn 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 ~/.gitconfig file (i.e. user.name, user.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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] nid: fix opensafd crashed during start-up [#3013]
There is a dependency b/w svc_monitor_thread and spawn_services. The coredump happens when spawn_services is executed while the thread has not yet started. In this case, data is sent to the pipe but no one consumed it. When it comes to consume the data, will get unexpected data and crash the program. This patch ensures the things will happen in the right order: svc_monitor_thread must be in ready state before spawn_services() is executed. --- src/nid/nodeinit.cc | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/nid/nodeinit.cc b/src/nid/nodeinit.cc index 5f15916b4..2e6a5cd05 100644 --- a/src/nid/nodeinit.cc +++ b/src/nid/nodeinit.cc @@ -47,6 +47,8 @@ *any notification. * / +#include "nid/nodeinit.h" + #include #include #include @@ -61,20 +63,18 @@ #include #include -#include "osaf/configmake.h" -#include "rde/agent/rda_papi.h" -#include "base/logtrace.h" - +#include #include #include #include #include +#include "osaf/configmake.h" +#include "rde/agent/rda_papi.h" +#include "base/logtrace.h" #include "base/conf.h" #include "base/osaf_poll.h" #include "base/osaf_time.h" - -#include "nid/nodeinit.h" #include "base/file_notify.h" #define SETSIG(sa, sig, fun, flags) \ @@ -134,6 +134,7 @@ static int start_monitor_svc(const char *svc); /* Data declarations for service monitoring */ static int svc_mon_fd = -1; static int next_svc_fds_slot = 0; +static std::atomic svc_monitor_thread_ready{false}; struct SAFServices { const std::string fifo_dir = PKGLOCALSTATEDIR; @@ -712,9 +713,9 @@ int32_t fork_daemon(NID_SPAWN_INFO *service, char *app, char *args[], tmp_pid = getpid(); while (write(filedes[1], &tmp_pid, sizeof(int)) < 0) { - if (errno == EINTR) + if (errno == EINTR) { continue; - else if (errno == EPIPE) { + } else if (errno == EPIPE) { LOG_ER("Reader not available to return my PID"); } else { LOG_ER("Problem writing to pipe, err=%s", strerror(errno)); @@ -1517,6 +1518,7 @@ void *svc_monitor_thread(void *fd) { next_svc_fds_slot++; while (true) { +svc_monitor_thread_ready = true; unsigned rc = osaf_poll(fds, next_svc_fds_slot, -1); if (rc > 0) { // check if any monitored service has exit @@ -1529,9 +1531,9 @@ void *svc_monitor_thread(void *fd) { if (fds[FD_SVC_MON_THR].revents & POLLIN) { while (true) { - read_rc = read(svc_mon_thr_fd, nid_name, NID_MAXSNAME); + read_rc = recv(svc_mon_thr_fd, nid_name, NID_MAXSNAME, MSG_DONTWAIT); if (read_rc == -1) { -if (errno == EINTR) { +if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) { continue; } else { LOG_ER("Failed to read on socketpair descriptor: %s", @@ -1574,7 +1576,7 @@ uint32_t create_svc_monitor_thread(void) { TRACE_ENTER(); - if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s_pair) == -1) { + if (socketpair(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0, s_pair) == -1) { LOG_ER("socketpair FAILED: %s", strerror(errno)); return NCSCC_RC_FAILURE; } @@ -1655,6 +1657,16 @@ int main(int argc, char *argv[]) { exit(EXIT_FAILURE); } + // Waiting until svc_monitor_thread is up and in ready state. + unsigned no_repeat = 0; + while (svc_monitor_thread_ready == false && no_repeat < 100) { +osaf_nanosleep(&kHundredMilliseconds); +no_repeat++; + } + + osafassert(svc_monitor_thread_ready); + LOG_NO("svc_monitor_thread is up and in ready state"); + if (parse_nodeinit_conf(sbuf) != NCSCC_RC_SUCCESS) { LOG_ER("Failed to parse file %s. Exiting", sbuf); exit(EXIT_FAILURE); -- 2.19.2 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 0/1] Review Request for log: Fix the last value of logRecordDestinationConfiguration is not deleted [#3014]
Summary: log: Fix the last value of logRecordDestinationConfiguration is not deleted [#3014] Review request for Ticket(s): 3014 Peer Reviewer(s): Vu, Lennart Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3014 Base revision: 1f9cf4636b07d28a906f62b44144c337c5280f1a Personal repository: git://git.code.sf.net/u/canht32/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): - *** EXPLAIN/COMMENT THE PATCH SERIES HERE *** revision 1e3620686bcea3ade971a7577b8e9f004bc345d3 Author: Canh Van Truong Date: Fri, 1 Mar 2019 16:55:59 +0700 log: Fix the last value of logRecordDestinationConfiguration is not deleted [#3014] When using the command "immcfg logConfig=1,safApp=safLogService -a logRecordDestinationConfiguration-=" If there is just one value in the multi attribute and we delete last one, the value will be deleted in imm database but it is not deleted in LGD. The patch update the attribute "logRecordDestinationConfiguration" = empty in lgd after the last value is deleted. Complete diffstat: -- src/log/logd/lgs_config.cc | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) Testing Commands: - *** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES *** Testing, Expected Results: -- *** PASTE COMMAND OUTPUTS / TEST RESULTS *** Conditions of Submission: - *** HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC *** Arch Built StartedLinux distro --- mipsn 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 ~/.gitconfig file (i.e. user.name, user.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. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] log: Fix the last value of logRecordDestinationConfiguration is not deleted [#3014]
When using the command "immcfg logConfig=1,safApp=safLogService -a logRecordDestinationConfiguration-=" If there is just one value in the multi attribute and we delete last one, the value will be deleted in imm database but it is not deleted in LGD. The patch update the attribute "logRecordDestinationConfiguration" = empty in lgd after the last value is deleted. --- src/log/logd/lgs_config.cc | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/log/logd/lgs_config.cc b/src/log/logd/lgs_config.cc index f096b040f..44e10b84d 100644 --- a/src/log/logd/lgs_config.cc +++ b/src/log/logd/lgs_config.cc @@ -306,10 +306,16 @@ void lgs_cfgupd_multival_delete(const std::string &attribute_name, } } - // Add this new list to the config data list - for (const auto &value : result_list) { -lgs_cfgupd_list_create(attribute_name.c_str(), - const_cast(value.c_str()), config_data); + if (result_list.empty()) { +// Delete the last value. Create config_data with empty value +lgs_cfgupd_list_create(attribute_name.c_str(), const_cast(""), + config_data); + } else { +// Add this new list to the config data list +for (const auto &value : result_list) { + lgs_cfgupd_list_create(attribute_name.c_str(), + const_cast(value.c_str()), config_data); +} } TRACE_LEAVE(); } -- 2.15.1 ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel