Skip to content

[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202601#369

Merged
mssonicbld merged 2 commits into
Azure:202601from
mssonicbld:sonicbld/202601-merge
Jun 16, 2026
Merged

[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202601#369
mssonicbld merged 2 commits into
Azure:202601from
mssonicbld:sonicbld/202601-merge

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator
* 661a4012 - Fixes #4579: Fix pfc prio config errors (#4616) (2026-06-16) [mssonicbld]<br>```

mssonicbld and others added 2 commits June 16, 2026 04:13
#### What I did

if PFC is not enabled on a port, unable to configure PFC via CLI. it generates the error as shown in the ticket.

#### How I did it

SImilar to "show pfc prio", if there is no entry for "pfc_enable" under PORT_QOS_MAP for that part, just treat as empty and add the new PFC prio instead out erroring out.

#### How to verify it

```
Before the fix:
admin@humm223:~$ show pfc prio

Interface Lossless priorities
----------- ---------------------
Ethernet32 N/A
Ethernet36 3,4
Ethernet40 3,4
Ethernet44 3,4
Ethernet160 3,4
Ethernet164 3,4
admin@humm223:~$ sudo config interface pfc priority Ethernet32 3 on
Traceback (most recent call last):
 File "/usr/local/bin/pfc", line 8, in <module>
 sys.exit(cli())
 ~~~^^
 File "/usr/lib/python3/dist-packages/click/core.py", line 1161, in __call__
 return self.main(*args, **kwargs)
 ~~~~~~~~~^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/click/core.py", line 1082, in main
 rv = self.invoke(ctx)
 File "/usr/lib/python3/dist-packages/click/core.py", line 1697, in invoke
 return _process_result(sub_ctx.command.invoke(sub_ctx))
 ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
 File "/usr/lib/python3/dist-packages/click/core.py", line 1697, in invoke
 return _process_result(sub_ctx.command.invoke(sub_ctx))
 ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
 File "/usr/lib/python3/dist-packages/click/core.py", line 1443, in invoke
 return ctx.invoke(self.callback, **ctx.params)
 ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/click/core.py", line 788, in invoke
 return __callback(*args, **kwargs)
 File "/usr/local/lib/python3.13/dist-packages/pfc/main.py", line 177, in configPrio
 Pfc(namespace).configPfcPrio(status, interface, priority)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.13/dist-packages/utilities_common/multi_asic.py", line 153, in wrapped_run_on_all_asics
 func(self, *args, **kwargs)
 ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.13/dist-packages/pfc/main.py", line 87, in configPfcPrio
 enable_prio = entry.get('pfc_enable').split(',')
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'
admin@humm223:~$

WITH THE FIX:

admin@humm223:~$ sudo config interface pfc priority Ethernet32 3 on
admin@humm223:~$ show pfc pri

Interface Lossless priorities
----------- ---------------------
Ethernet32 3
Ethernet36 3,4
Ethernet40 3,4
Ethernet44 3,4
Ethernet160 3,4
Ethernet164 3,4

admin@humm223:~$
```

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>

#### 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)
What I did
I implemented a fix to stop timers upon reload/load_minigraph. If "config reload" or "config load_minigraph" is executed soon after system has started a timer may expire in the middle of the command causing subsequent failures.

Here's what is observed:

2025 Aug  6 18:29:35.532425 sonic INFO python[36429]: ansible-command Invoked with _uses_shell=True _raw_params=config load_minigraph --override_config -y warn=True stdin_add_newline=True strip_empty_ends=True argv=None chdir=None execut
able=None creates=None removes=None stdin=None
2025 Aug  6 18:29:35.754152 sonic NOTICE switch_trimming: 'load_minigraph' executing with command: config load_minigraph --override_config -y
2025 Aug  6 18:30:30.306602 sonic INFO systemd[1]: Stopped target sonic.target - SONiC services target..

2025 Aug  6 18:30:31.333507 sonic DEBUG systemd[1]: tacacs-config.timer: Timer elapsed.
2025 Aug  6 18:30:31.334003 sonic DEBUG systemd[1]: sonic.target: Installed new job sonic.target/start as 2793
2025 Aug  6 18:30:32.371292 sonic DEBUG systemd[1]: sonic.target changed dead -> active
How I did it
Stop timers associated with sonic.target

How to verify it
I put a breakpoint after stopping sonic.target. Soon after reboot I execute "config reload" command. I then wait for ~5-6 min, no services start. Without this fix, services would start.

Signed-off-by: Hemanth Kumar Tirupati <htirupati@nvidia.com>
Co-authored-by: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com>
@mssonicbld mssonicbld merged commit 4041b2a into Azure:202601 Jun 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants