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

[202205 Chassis-Cherry-pick] Pick Up 2 PRs from sonic-net/sonic-utilities for chassis specific needs (2730), (2850) #11

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

gechiang
Copy link
Contributor

@gechiang gechiang commented Jun 21, 2023

[chassis]: remote cli commands infra for sonic chassis (#2850)
[chassis][voq]Add "config fabric port ..." commands and tests. (#2730)

What I did

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

arlakshm and others added 2 commits June 21, 2023 21:25
What I did
Microsoft ADO 17792956

Since each Linecard is running an independent SONiC Instance, the user needs to login to a linecard to run any CLI command
The user can login to each Linecard 2 ways

Ssh directly to the linecard using the management IP address
Ssh to supervisor and from supervisor ssh to the Linecard using the Linecard’s internal IP address
To simplify the user experience and allow scripting agents to execute commands on all linecards.
Two new commands are being added
rexec <linecard_name|all> -c <cli_command> This command will execute the command on specified linecards or all linecards.

rshell <linecard_name> connects to the linecard for interactive shell

This PR is adding the changes of PR #2701

How to verify it
UT and tested chassis

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
Added "config fabric port ..." commands and the tests.

This change added following config commands and the test for them.

config fabric port isolate #portId#
config fabric port unisolate #portId#
The above two commands can be used to manually isolate and unisolate a fabric link.

config fabric port monitor error threshold #crcCells# #rxCells#
It sets a fabric link monitoring error threshold

config fabric port monitor poll threshold isolation #pollnumber#
It sets the number of consecutive polls in which the threshold needs to be detected to isolate a link

config fabric port monitor poll threshold recovery #pollnumber#
It sets the number of consecutive polls in which no error is detected to unisolate a link
@gechiang gechiang requested review from arlakshm and tjchadaga June 21, 2023 22:13
@gechiang gechiang merged commit 78c2a15 into Azure:202205 Jun 21, 2023
mssonicbld pushed a commit to mssonicbld/sonic-utilities.msft that referenced this pull request Nov 24, 2023
**What I did**

Fix the Mem Leak by moving the raw pointers in type_maps to use smart pointers

**Why I did it**

```
Indirect leak of 83776 byte(s) in 476 object(s) allocated from:
    #0 0x7f0a2a414647 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
    Azure#1 0x5555590cc923 in __gnu_cxx::new_allocator, std::allocator > const, referenced_object> > >::allocate(unsigned long, void const*) /usr/include/c++/10/ext/new_allocator.h:115
    Azure#2 0x5555590cc923 in std::allocator_traits, std::allocator > const, referenced_object> > > >::allocate(std::allocator, std::allocator > const, referenced_object> > >&, unsigned long) /usr/include/c++/10/bits/alloc_traits.h:460
    Azure#3 0x5555590cc923 in std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, referenced_object>, std::_Select1st, std::allocator > const, referenced_object> >, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::_M_get_node() /usr/include/c++/10/bits/stl_tree.h:584
    Azure#4 0x5555590cc923 in std::_Rb_tree_node, std::allocator > const, referenced_object> >* std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, referenced_object>, std::_Select1st, std::allocator > const, referenced_object> >, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::_M_create_node, std::allocator > const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple, std::allocator > const&>&&, std::tuple<>&&) /usr/include/c++/10/bits/stl_tree.h:634
    Azure#5 0x5555590cc923 in std::_Rb_tree_iterator, std::allocator > const, referenced_object> > std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, referenced_object>, std::_Select1st, std::allocator > const, referenced_object> >, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::_M_emplace_hint_unique, std::allocator > const&>, std::tuple<> >(std::_Rb_tree_const_iterator, std::allocator > const, referenced_object> >, std::piecewise_construct_t const&, std::tuple, std::allocator > const&>&&, std::tuple<>&&) /usr/include/c++/10/bits/stl_tree.h:2461
    Azure#6 0x5555590e8757 in std::map, std::allocator >, referenced_object, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::operator[](std::__cxx11::basic_string, std::allocator > const&) /usr/include/c++/10/bits/stl_map.h:501
    Azure#7 0x5555590d48b0 in Orch::setObjectReference(std::map, std::allocator >, std::map, std::allocator >, referenced_object, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >*, std::less, std::allocator > >, std::allocator, std::allocator > const, std::map, std::allocator >, referenced_object, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >*> > >&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) orchagent/orch.cpp:450
    Azure#8 0x5555594ff66b in QosOrch::handleQueueTable(Consumer&, std::tuple, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::vector, std::allocator >, std::__cxx11::basic_string, std::allocator > >, std::allocator, std::allocator >, std::__cxx11::basic_string, std::allocator > > > > >&) orchagent/qosorch.cpp:1763
    Azure#9 0x5555594edbd6 in QosOrch::doTask(Consumer&) orchagent/qosorch.cpp:2179
    Azure#10 0x5555590c8743 in Consumer::drain() orchagent/orch.cpp:241
    Azure#11 0x5555590c8743 in Consumer::drain() orchagent/orch.cpp:238
    Azure#12 0x5555590c8743 in Consumer::execute() orchagent/orch.cpp:235
    Azure#13 0x555559090dad in OrchDaemon::start() orchagent/orchdaemon.cpp:755
    Azure#14 0x555558e9be25 in main orchagent/main.cpp:766
    Azure#15 0x7f0a299b6d09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23d09)
```
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.

4 participants