Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SONiC Eventd: Adding a new container to SONiC image #1

Merged
merged 29 commits into from
Jun 22, 2022

Conversation

renukamanavalan
Copy link
Owner

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@renukamanavalan renukamanavalan self-assigned this Jun 4, 2022
/* Duplicate; Later/same seq in cache. */
add = false;
}
if (seq >= it->second) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt it be strictly greater: seq > it->second?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not going to get same event more than once in one socket. So if I have seen the last cached one (==) then this cache entry is not required.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok makes sense.

@renukamanavalan
Copy link
Owner Author

Python usage:

from swsscommon.swsscommon import events_init_publisher, events_deinit_publisher, event_publish, events_init_subscriber, events_deinit_subscriber, event_receive_wrap
hp = events_init_publisher("test_source")
hs = events_init_subscriber()
rc =event_publish(hp, "tag1")
rc
0
rc = event_receive_wrap(hs)
rc
<swsscommon.swsscommon.event_receive_op_t; proxy of <Swig Object of type 'event_receive_op_t *' at 0x7fa8490ccba0> >
rc.rc
0
rc.key
'test_source:tag1'
rc.params.asdict()
{'timestamp': '2022-06-21T15:13:50.200308Z'}
rc.params
<swsscommon.swsscommon.FieldValueMap; proxy of <Swig Object of type 'swss::TableMap *' at 0x7fa848fbb570> >

from swsscommon.swsscommon import FieldValueMap
m = FieldValueMap()
m["ss"] = "rrr"
rc = event_publish(hp, "tag1", m)
rc
0
rc = event_receive_wrap(hs)
rc.rc
0
rc.key
'test_source:tag1'
rc.params.asdict()
{'ss': 'rrr', 'timestamp': '2022-06-21T15:24:42.684611Z'}
rc.missed_cnt
0

src/sonic-eventd/src/eventd.cpp Show resolved Hide resolved
src/sonic-eventd/src/eventd.cpp Show resolved Hide resolved
src/sonic-eventd/src/eventd.cpp Show resolved Hide resolved
src/sonic-eventd/src/eventd.cpp Show resolved Hide resolved
src/sonic-eventd/tests/eventd_ut.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@zbud-msft zbud-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@renukamanavalan renukamanavalan merged commit 1700020 into syslog_telemetry_shared Jun 22, 2022
zbud-msft pushed a commit that referenced this pull request Aug 25, 2022
Submodule update for sonic-linkmgrd
Incorporates:

c11a576 (2021-11-22 09:38:46) [ci]: show code coverage in azure pipeline (#4)
4ceb01d (2021-11-18 20:24:20) Fix MUX toggling issue (#1)
d640527 (2021-11-12 22:31:44) [ci]: fix artifact download
b9f247d (2021-11-12 22:31:44) [ci]: use native arm64/armhf build
3059122 (2021-09-27 11:32:23) [linkgrd] Add Missing Apache License Header
zbud-msft pushed a commit that referenced this pull request Aug 25, 2022
…net#10291)

#### Why I did it

Fix issue: Non compliant leaf list in config_db schema: sonic-net#9801

#### How I did it

The basic flow of DPB is like:
1.	Transfer config db json value to YANG json value, name it “yangIn”
2.	Validate “yangIn” by libyang
3.	Generate a YANG json value to represent the target configuration, name it “yangTarget”
4.	Do diff between “yangIn” and “yangTarget”
5.	Apply the diff to CONFIG DB json and save it back to DB
 
The fix:
•	For step #1, If value of a leaf-list field string type, transfer it to a list by splitting it with “,” the purpose here is to make step#2 happy. We also need to save <table_name>.<key>.<field_name> to a set named “leaf_list_with_string_value_set”.
•	For step#5, loop “leaf_list_with_string_value_set” and change those fields back to a string.


#### How to verify it

1. Manual test
2. Changed sample config DB and unit test passed
renukamanavalan pushed a commit that referenced this pull request Jun 2, 2023
- Why I did it
To improve ASIC FW upgrade logging and have information about the cause of FW update failure in the log.

- How I did it
Added syslog logger support

In case the FW update has failed the update tool will give the cause of the failure in the output in the last line, starting with "Fail".
When running the tool, in case of a failed update, we will parse the output to retrieve the cause and log it.

Device #1:
 ----------
 
 Device Type:      ConnectX6DX
   Part Number:      MCX623106AN-CDA_Ax
   Description:      ConnectX-6 Dx EN adapter card; 100GbE; Dual-port QSFP56; PCIe 4.0/3.0 x16;
   PSID:             MT_0000000359
   PCI Device Name:  /dev/mst/mt4125_pciconf0
   Base GUID:        0c42a103007d22d4
   Base MAC:         0c42a17d22d4
   Versions:         Current        Available     
      FW             22.32.0498     22.32.0498    
      PXE            3.6.0500       3.6.0500      
      UEFI           14.25.0015     14.25.0015    
 
 Status:           Forced update required
 
---------
 Found 1 device(s) requiring firmware update...
 
Device #1: Updating FW ...     
 FSMST_INITIALIZE -   OK          
 Writing Boot image component -   OK          
 Fail : The Digest in the signature is wrong

- How to verify it
mlnx-fw-upgrade.sh --upgrade
renukamanavalan pushed a commit that referenced this pull request Oct 15, 2023
…bors over iBGP Session (sonic-net#16705)

What I did:
Enable Sending BGP Community over internal neighbors over iBGP Session

Microsoft ADO: 25268695

Why I did:
Without this change BGP community send by e-BGP Peers are not carry-forward to other e-BGP peers.


str2-xxxx-lc1-2# show bgp ipv6  20c0:a801::/64
BGP routing table entry for 20c0:a801::/64, version 52141
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65500
    2603:10e2:400::6 from 2603:10e2:400::6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      Last update: Tue Sep 26 16:08:26 2023
str2-xxxx-lc1-2# show ip bgp 192.168.35.128/25
BGP routing table entry for 192.168.35.128/25, version 52688
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65502
    3.3.3.6 from 3.3.3.6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      Last update: Tue Sep 26 15:45:51 2023

After the change

str2-xxxx-lc2-2(config)# router bgp 65100
str2-xxxx-lc2-2(config-router)# address-family ipv4
str2-xxxx-lc2-2(config-router-af)# neighbor INTERNAL_PEER_V4 send-community
str2-xxxx-lc2-2(config-router-af)# exit
str2-xxxx-lc2-2(config-router)# address-family ipv6
str2-xxxx-lc2-2(config-router-af)# neighbor INTERNAL_PEER_V6 send-community
str2-xxxx-lc1-2# show bgp ipv6  20c0:a801::/64
BGP routing table entry for 20c0:a801::/64, version 52400
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65500
    2603:10e2:400::6 from 2603:10e2:400::6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      **Community: 1111:1111**
      Last update: Tue Sep 26 16:10:19 2023
str2-xxxx-lc1-2# show ip bgp 192.168.35.128/25
BGP routing table entry for 192.168.35.128/25, version 52947
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65502
    3.3.3.6 from 3.3.3.6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      **Community: 1111:1111**
      Last update: Tue Sep 26 16:10:09 2023

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants