[R4.1-36]:SLO- Session getting logged locally on compute without any SLO created

Bug #1729812 reported by alok kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Won't Fix
High
Arvind
R4.1
Fix Committed
High
Arvind
R5.0
Fix Committed
High
Arvind
Trunk
Fix Committed
High
Arvind

Bug Description

When sampling is enabled and there are not any SLO created then also session is getting logged locally on compute.

As per https://github.com/Juniper/contrail-controller/blob/master/specs/security_logging_object.md, The destination for SessionSample messages is just analytics.

But all the sampled sessions are getting logged locally.

Revision history for this message
Anish Mehta (amehta00) wrote :

The SLO feature is intended to report sessions that would otherwise not have been reported based on the sampling mechanism alone.

There is a way to tell which sessions were reported as part of only sampling, only SLO or both, as described below. Beyond that, we do not intend to suppress the reporting of sessions based on SLO or sampling.

>>1) For sessions that are only sampled, logged bytes and packets are not even set in >>sandesh
>>2) For sessions that only logged, sampled bytes and packages are not even set in >>sandesh
>>3) For sessions that are both sampled and logged , sampled bytes and packets are >>both set in sandesh.

Revision history for this message
alok kumar (kalok) wrote :

The bug is still valid as per the requirement mentioned in https://github.com/Juniper/contrail-controller/blob/master/specs/security_logging_object.md which clearly says:

section 3:
The destination for SessionSample messages is just analytics. The destinations supported for SessionLog are Analytics, syslog and local file. The destinations are mutually exclusive. Flags will be created to specify the different destinations. When same session is SLO configured and also selected by sampling algorithm, the corresponding session record can go to both analytics and syslog/local file.

shouldn't we update the documentation accordingly if you are changing the expected behaviour now?

Revision history for this message
alok kumar (kalok) wrote :

As per discussion with Anish, documentation need to be update as per current behavior.
Ashok as discussed earlier, please update that.

Revision history for this message
Ashok Singh (ashoksr) wrote :

Arvind, as discussed over email, please update the spec and implementation with the expected behavior

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/39408
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/39409
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/39408
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/39409
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/39408
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/39408
Committed: http://github.com/Juniper/contrail-common/commit/a55c19bfef021874954eb0d48628ce606bc9326e
Submitter: Rudra Rugge (<email address hidden>)
Branch: master

commit a55c19bfef021874954eb0d48628ce606bc9326e
Author: arvindvis <email address hidden>
Date: Thu Feb 1 17:26:05 2018 -0800

A new flag is introduced by the agent to permit syslogging
of sessions that only obey SLO. Syslog is enabled if
either of use_syslog or use_session_syslog is enabled.
use_syslog to send sampled sessions to syslog;
use_session_syslog to send SLO sessions to syslog.
If use_syslog is enabled we dont send the session to
collector.
If only use_session_syslog is enabled, we send SLO
sessions to syslog but sampled sessions will continue
to go to collector.
Partial-Bug: 1729812

Change-Id: I02d6f3c3f369eb62343ee2f3237e3afdf2b4f002

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/39409
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/41463
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42951
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42952
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43164
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43166
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43166
Submitter: Arvind (<email address hidden>)

tags: added: operational
tags: added: provisioning
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43280
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43281
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/43280
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/43285
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/43286
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43287
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/43288
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43281
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/42713
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/42713
Committed: http://github.com/Juniper/contrail-common/commit/fe034f12bb34c7834f05a74f297d0d57200805ff
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit fe034f12bb34c7834f05a74f297d0d57200805ff
Author: arvindvis <email address hidden>
Date: Wed May 2 16:22:45 2018 -0700

Logging of sessions

This fix lets the session logs go to any or all of collector/
file/syslog. To accommodate this, 2 new logger object is
created for handling only SLO/Sample session destinations. The
destinations to this logger are provided by the agent. A snippet
of the generated_file is added to the bug. Here is a snippet of
the generated sandesh file:

static void LogUnrolled(std::string category, SandeshLevel::type level, const std::vector<SessionEndpoint> & session_data);
static void adjust_session_end_point_objects(std::vector <SessionEndpoint> & session_data);

static void Send(std::string category, SandeshLevel::type level, const std::vector<SessionEndpoint> & session_data) {
if (HandleTest(level, category)) {
return;
}
if (IsSendingAllMessagesDisabled() || IsSendingFlowsDisabled()) {
UpdateTxMsgFailStats("SessionEndpointObject", 0, SandeshTxDropReason::SendingDisabled);
if (IsLoggingDroppedAllowed(SandeshType::FLOW)) {
Log(category, level, session_data);
}
return;
}
if (is_send_slo_to_logger_enabled() || is_send_sampled_to_logger_enabled()) {
LogUnrolled(category, level, session_data);
}
if (level >= SendingLevel()) {
UpdateTxMsgFailStats("SessionEndpointObject", 0, SandeshTxDropReason::QueueLevel);
if (IsLoggingDroppedAllowed(SandeshType::FLOW)) {
std::string drop_reason = "SANDESH: Queue Drop: ";
DropLog(drop_reason, category, level, session_data);
}
return;
}
SessionEndpointObject * snh = new SessionEndpointObject(lseqnum_++, session_data);
if (!is_send_sampled_to_collector_enabled() && !is_send_slo_to_collector_enabled()) {
return;
}
if (is_send_sampled_to_collector_enabled() != is_send_slo_to_collector_enabled()) {
adjust_session_end_point_objects(snh->session_data); }

snh->set_level(level);
snh->set_category(category);
snh->Dispatch();
}

Partial-Bug: 1729812

Change-Id: Ie6024b95aa5becb56291cd1ef229ad7915a0a57a

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42716
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/42716
Committed: http://github.com/Juniper/contrail-controller/commit/2e5cbfe2dc53b8b72e2c7c06345a5ca1dca73258
Submitter: Mithun Mistry (<email address hidden>)
Branch: master

commit 2e5cbfe2dc53b8b72e2c7c06345a5ca1dca73258
Author: arvindvis <email address hidden>
Date: Wed May 2 17:16:10 2018 -0700

Session logging

This fix adds the ability to provide any/all of session destinations
for SLO and sampled sessions. New flags SESSION.slo_destination
and SESSION.sample_destination will override the existing
DEFAULT.usesyslog and DEFAULT.log_flow flags.By default, the destination
list is collector. We have config variables to control SLO and sampling
rate if we are inundated.
Depends-On: Ie6024b95aa5becb56291cd1ef229ad7915a0a57a
Partial-Bug: 1729812

Change-Id: I6aca6507aeb1969e1f1a39722209edee6245c228

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

Review in progress for https://review.opencontrail.org/43798
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/43801
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43802
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/43803
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/43804
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

Review in progress for https://review.opencontrail.org/43805
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/43806
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/42952
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/43804
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/42952
Committed: http://github.com/Juniper/contrail-container-builder/commit/1ab92841bceeb913aa4659deae06154d5cafa9aa
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 1ab92841bceeb913aa4659deae06154d5cafa9aa
Author: arvindvis <email address hidden>
Date: Thu May 10 14:49:48 2018 -0700

Handle the new variable to specify sample msg destination

Change-Id: I7e958bc8de045ecc4f4e38f47299305cc7ba3307
Partial-Bug: 1729812

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/42951
Committed: http://github.com/Juniper/contrail-ansible-deployer/commit/73189da16f413c3195ccbbf7e18777711abca63b
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 73189da16f413c3195ccbbf7e18777711abca63b
Author: arvindvis <email address hidden>
Date: Thu May 10 14:52:46 2018 -0700

Agent role has additional options to specify session msg destination

Two new options added to agent viz., SLO_DESTINATION and
SAMPLE_DESTINATION. Their default value will be collector.
To change it specify a space separated list of values.The destination
supported are syslog, file and collector.

Change-Id: I8953271f84ec250bfbc53e573424a23cf752ddec
Partial-Bug: 1729812

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/43806
Committed: http://github.com/Juniper/contrail-container-builder/commit/349bef72c89942d3054946816051400a0d5a7d27
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 349bef72c89942d3054946816051400a0d5a7d27
Author: arvindvis <email address hidden>
Date: Thu May 10 14:49:48 2018 -0700

Handle the new variable to specify sample msg destination

Change-Id: I7e958bc8de045ecc4f4e38f47299305cc7ba3307
Partial-Bug: 1729812

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/43804
Committed: http://github.com/Juniper/contrail-common/commit/e185008ce2533cc25f84e59723546c56b6aa8dc6
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit e185008ce2533cc25f84e59723546c56b6aa8dc6
Author: arvindvis <email address hidden>
Date: Wed Jun 13 12:37:11 2018 -0700

Uncomment the adjust_session_end_point function

This was commented out from sandesh repo to make
it compile and prevent circular dependency.
Partial-Bug: 1729812

Change-Id: I96bde4092a75098934eb7b1735e940c538ea6017

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/44056
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/43802
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/44056
Committed: http://github.com/Juniper/contrail-controller/commit/f019bd9636ef5d72db37876dcfdc1d01713141ae
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit f019bd9636ef5d72db37876dcfdc1d01713141ae
Author: arvindvis <email address hidden>
Date: Fri Jun 22 10:39:57 2018 -0700

Reordering linking of libraries in agent

Sandesh makes use of boost headers in a new change and agent links
to sandesh library.
In redhat, the boost library must be linked to first before linking
to sandesh library.
Partial-Bug: 1729812

Change-Id: I763658b0775acc2eb479b3ae373266698ce710eb

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/43802
Committed: http://github.com/Juniper/contrail-sandesh/commit/f4e90360209ff9b7f4b7e938d843b6cc62e0bc8c
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit f4e90360209ff9b7f4b7e938d843b6cc62e0bc8c
Author: arvindvis <email address hidden>
Date: Wed Jun 13 12:08:21 2018 -0700

Logging of sessions

This fix lets the session logs go to any or all of collector/
file/syslog. To accommodate this, 2 new logger object is
created for handling only SLO/Sample session destinations. The
destinations to this logger are provided by the agent. A snippet
of the generated_file is added to the bug. Here is a snippet of
the generated sandesh file:

static void LogUnrolled(std::string category, SandeshLevel::type level, const std::vector<SessionEndpoint> & session_data);
static void adjust_session_end_point_objects(std::vector <SessionEndpoint> & session_data);

static void Send(std::string category, SandeshLevel::type level, const std::vector<SessionEndpoint> & session_data) {
if (HandleTest(level, category)) {
return;
}
if (IsSendingAllMessagesDisabled() || IsSendingFlowsDisabled()) {
UpdateTxMsgFailStats("SessionEndpointObject", 0, SandeshTxDropReason::SendingDisabled);
if (IsLoggingDroppedAllowed(SandeshType::FLOW)) {
Log(category, level, session_data);
}
return;
}
if (is_send_slo_to_logger_enabled() || is_send_sampled_to_logger_enabled()) {
LogUnrolled(category, level, session_data);
}
if (level >= SendingLevel()) {
UpdateTxMsgFailStats("SessionEndpointObject", 0, SandeshTxDropReason::QueueLevel);
if (IsLoggingDroppedAllowed(SandeshType::FLOW)) {
std::string drop_reason = "SANDESH: Queue Drop: ";
DropLog(drop_reason, category, level, session_data);
}
return;
}
SessionEndpointObject * snh = new SessionEndpointObject(lseqnum_++, session_data);
if (!is_send_sampled_to_collector_enabled() && !is_send_slo_to_collector_enabled()) {
return;
}
if (is_send_sampled_to_collector_enabled() != is_send_slo_to_collector_enabled()) {
adjust_session_end_point_objects(snh->session_data); }

snh->set_level(level);
snh->set_category(category);
snh->Dispatch();
}

Depends-On: I763658b0775acc2eb479b3ae373266698ce710eb
Change-Id: I486656dc9d0866c395aabf9b9ed36cc129a12797
Partial-Bug: 1729812

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/43803
Committed: http://github.com/Juniper/contrail-controller/commit/d16197b268c99cb4d256fa26cdd0db37d2cafb0d
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit d16197b268c99cb4d256fa26cdd0db37d2cafb0d
Author: arvindvis <email address hidden>
Date: Wed Jun 13 12:29:57 2018 -0700

Session logging

This fix adds the ability to provide any/all of session destinations
for SLO and sampled sessions. New flags SESSION.slo_destination
and SESSION.sample_destination will override the existing
DEFAULT.usesyslog and DEFAULT.log_flow flags.By default, the destination
list is collector. We have config variables to control SLO and sampling
rate if we are inundated.
Depends-On: I486656dc9d0866c395aabf9b9ed36cc129a12797
Partial-Bug: 1729812

Change-Id: I79f7c8879d3c1672399e86e6b7a7cc251579bd13

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43287
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/43798
Committed: http://github.com/Juniper/contrail-common/commit/faf1e297cf5b1146ffcf0ce0de1575ca4587e138
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit faf1e297cf5b1146ffcf0ce0de1575ca4587e138
Author: arvindvis <email address hidden>
Date: Wed May 2 16:22:45 2018 -0700

Logging of sessions

This fix lets the session logs go to any or all of collector/
file/syslog. To accommodate this, 2 new logger object is
created for handling only SLO/Sample session destinations. The
destinations to this logger are provided by the agent. A snippet
of the generated_file is added to the bug. Here is a snippet of
the generated sandesh file:

static void LogUnrolled(std::string category, SandeshLevel::type level, const std::vector<SessionEndpoint> & session_data);
static void adjust_session_end_point_objects(std::vector <SessionEndpoint> & session_data);

static void Send(std::string category, SandeshLevel::type level, const std::vector<SessionEndpoint> & session_data) {
if (HandleTest(level, category)) {
return;
}
if (IsSendingAllMessagesDisabled() || IsSendingFlowsDisabled()) {
UpdateTxMsgFailStats("SessionEndpointObject", 0, SandeshTxDropReason::SendingDisabled);
if (IsLoggingDroppedAllowed(SandeshType::FLOW)) {
Log(category, level, session_data);
}
return;
}
if (is_send_slo_to_logger_enabled() || is_send_sampled_to_logger_enabled()) {
LogUnrolled(category, level, session_data);
}
if (level >= SendingLevel()) {
UpdateTxMsgFailStats("SessionEndpointObject", 0, SandeshTxDropReason::QueueLevel);
if (IsLoggingDroppedAllowed(SandeshType::FLOW)) {
std::string drop_reason = "SANDESH: Queue Drop: ";
DropLog(drop_reason, category, level, session_data);
}
return;
}
SessionEndpointObject * snh = new SessionEndpointObject(lseqnum_++, session_data);
if (!is_send_sampled_to_collector_enabled() && !is_send_slo_to_collector_enabled()) {
return;
}
if (is_send_sampled_to_collector_enabled() != is_send_slo_to_collector_enabled()) {
adjust_session_end_point_objects(snh->session_data); }

snh->set_level(level);
snh->set_category(category);
snh->Dispatch();
}

Partial-Bug: 1729812

Change-Id: Ie6024b95aa5becb56291cd1ef229ad7915a0a57a
(cherry picked from commit fe034f12bb34c7834f05a74f297d0d57200805ff)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43287
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/43801
Committed: http://github.com/Juniper/contrail-controller/commit/562faa77a6e800bc7b2fdccdd6f6d41045e4bff5
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 562faa77a6e800bc7b2fdccdd6f6d41045e4bff5
Author: arvindvis <email address hidden>
Date: Wed May 2 17:16:10 2018 -0700

Session logging

This fix adds the ability to provide any/all of session destinations
for SLO and sampled sessions. New flags SESSION.slo_destination
and SESSION.sample_destination will override the existing
DEFAULT.usesyslog and DEFAULT.log_flow flags.By default, the destination
list is collector. We have config variables to control SLO and sampling
rate if we are inundated.
Depends-On: Ie6024b95aa5becb56291cd1ef229ad7915a0a57a
Partial-Bug: 1729812

Change-Id: I6aca6507aeb1969e1f1a39722209edee6245c228
(cherry picked from commit 2e5cbfe2dc53b8b72e2c7c06345a5ca1dca73258)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/43805
Committed: http://github.com/Juniper/contrail-ansible-deployer/commit/b3b44c609a81d0bef6b69a501e285454142598c9
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit b3b44c609a81d0bef6b69a501e285454142598c9
Author: arvindvis <email address hidden>
Date: Thu May 10 14:52:46 2018 -0700

Agent role has additional options to specify session msg destination

Two new options added to agent viz., SLO_DESTINATION and
SAMPLE_DESTINATION. Their default value will be collector.
To change it specify a space separated list of values.The destination
supported are syslog, file and collector.

Change-Id: I8953271f84ec250bfbc53e573424a23cf752ddec
Partial-Bug: 1729812

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43287
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

Review in progress for https://review.opencontrail.org/44282
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/44282
Committed: http://github.com/Juniper/contrail-common/commit/4a69cf368a8773f950ae04475f6449027d65ab32
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 4a69cf368a8773f950ae04475f6449027d65ab32
Author: arvindvis <email address hidden>
Date: Wed Jun 13 12:37:11 2018 -0700

Uncomment the adjust_session_end_point function

This was commented out from sandesh repo to make
it compile and prevent circular dependency.
Partial-Bug: 1729812

Change-Id: I96bde4092a75098934eb7b1735e940c538ea6017
(cherry picked from commit e185008ce2533cc25f84e59723546c56b6aa8dc6)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/43287
Committed: http://github.com/Juniper/contrail-ansible-internal/commit/73a6430131884eb479843ed730f62039464759cd
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 73a6430131884eb479843ed730f62039464759cd
Author: arvindvis <email address hidden>
Date: Thu May 24 15:11:08 2018 -0700

Added two new params slo_destination and sample_destination to agent

Session destinations params are added to agent.conf under the
section SESSION. The default valuei will be collector.
Partial-Bug: 1729812

Change-Id: I7838eeadd1ccaebad6759556aeadb72a2adb97a9

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/44338
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/44338
Committed: http://github.com/Juniper/contrail-sandesh/commit/3309059fc63463ef0c4fa116fa99674794b513a1
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 3309059fc63463ef0c4fa116fa99674794b513a1
Author: arvindvis <email address hidden>
Date: Tue Jul 3 22:04:46 2018 -0700

Uncomment the adjust_session_end_point function

This was commented out from sandesh repo to make
it compile and prevent circular dependency.
Partial-Bug: 1729812

Change-Id: I59bae0a7c483064eae596455d73a9cbfa50ea7b9

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/43285
Committed: http://github.com/Juniper/contrail-docker/commit/69e172ab30794b14a405e42df217e696090bd472
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 69e172ab30794b14a405e42df217e696090bd472
Author: arvindvis <email address hidden>
Date: Thu May 24 15:15:30 2018 -0700

SLO logging params added

Destination for SLO and sampled sessions can be created
using slo_destination_list and sample_destination_list
with space separated values. The values can be one of
collector, syslog file or empty.

Change-Id: Ib68ab5e1674217fed7b706023625cd6f55933ccc
Partial-Bug: 1729812

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/43288
Submitter: Arvind (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/43288
Committed: http://github.com/Juniper/contrail-docker/commit/166fdc2ccc0efbbc0646be19edf517bc881a8789
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 166fdc2ccc0efbbc0646be19edf517bc881a8789
Author: arvindvis <email address hidden>
Date: Thu May 24 15:15:30 2018 -0700

SLO logging params added

Destination for SLO and sampled sessions can be created
using slo_destination_list and sample_destination_list
with space separated values. The values can be one of
collector, syslog file or empty.

Change-Id: Ib68ab5e1674217fed7b706023625cd6f55933ccc
Partial-Bug: 1729812

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.