Skip to content

[dhcp_relay]Fix the clear dhcp6relay_counters CLI#47

Closed
dgsudharsan wants to merge 1 commit intomasterfrom
dhcp6_cli
Closed

[dhcp_relay]Fix the clear dhcp6relay_counters CLI#47
dgsudharsan wants to merge 1 commit intomasterfrom
dhcp6_cli

Conversation

@dgsudharsan
Copy link
Copy Markdown
Owner

Why I did it

Avoid traceback on sonic-clear command

sonic-clear dhcp6relay_counters 
Traceback (most recent call last):
  File "/usr/local/bin/sonic-clear", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/clear/plugins/dhcp-relay.py", line 19, in dhcp6relay_clear_counters
    counter = DHCPv6_Counter()
NameError: name 'DHCPv6_Counter' is not defined

How I did it

Corrected the way to import using importlib

How to verify it

Tested the sonic-clear command and verified no traceback is seen

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

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

@dgsudharsan dgsudharsan deleted the dhcp6_cli branch March 9, 2023 01:51
dgsudharsan pushed a commit that referenced this pull request Feb 20, 2025
…ly (sonic-net#21743)

#### Why I did it
src/sonic-stp
```
* 29eb387 - (HEAD -> master, origin/master, origin/HEAD) Fixing compilaion error for marvell_armhf (#47) (9 hours ago) [Divya Kumaran Chandralekha]
* b7da558 - Merge pull request #44 from wajahatrazi/stp_co_pr (3 days ago) [Divya Kumaran Chandralekha]
|\ 
| failure_prs.log skip_prs.log 47e1e77 - Merge branch 'master' into stp_co_pr (3 days ago) [Divya Kumaran Chandralekha]
| |\ 
| |/ 
|/| 
* | 6e4a94f - Merge pull request #46 from divyachandralekha/pvst_pr_1 (4 days ago) [Divya Kumaran Chandralekha]
|\ \ 
| failure_prs.log skip_prs.log | aa5e824 - libevent explicit building dependency removed (4 days ago) [Divya Chandralekha]
|/ / 
* | 9345e5a - Merge pull request #43 from omaaartamer/fix/alignment-warnings (5 days ago) [Divya Kumaran Chandralekha]
* | eedb772 - [stp] Add memory alignment padding to structures (9 weeks ago) [omaaartamer]
* | 128e53d - fix: resolve STP alignment warnings (9 weeks ago) [omaaartamer]
 / 
* 30febfa - Fixing changes in the code (9 weeks ago) [Wajahat Razi]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Sep 25, 2025
…sonic-net#23653)

#### Why I did it
src/dhcpmon
```
* 35a907b - (HEAD -> 202505, origin/202505) [build] Update to install libyang3 in PR check (#47) (2 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Dec 2, 2025
…tically (sonic-net#24573)

#### Why I did it
src/sonic-dash-api
```
* f85c93c - (HEAD -> 202505, origin/202505) Automated agent pool migration for branch 202505 (#47) (8 days ago) [yijingyan2]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Dec 16, 2025
… HEAD automatically (sonic-net#1345)

#### Why I did it
src/sonic-linux-kernel
```
* c16b6b2 - (HEAD -> 202412, origin/HEAD, origin/202412) Merge pull request #47 from mssonicbld/sonicbld/202412-merge (4 days ago) [mssonicbld]
* 06419f5 - Merge branch '202411' of https://github.com/sonic-net/sonic-linux-kernel into 202412 (4 days ago) [Sonic Automation]
* 276873a - [build] Use package.trafficmanager instead of sonicstorage.blob (sonic-net#494) (5 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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