Skip to content

Conversation

@manoharan-nexthop
Copy link

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

  1. Add QoS buffer pool configuration commands
- fboss2 config qos buffer-pool <name> shared-bytes <value>
- fboss2 config qos buffer-pool <name> headroom-bytes <value>
- fboss2 config qos buffer-pool <name> reserved-bytes <value>
  1. Some of the configuration commands like QoS buffer pool modification requires an agent restart and some are hitless. Inorder to take appropriate action during the commit, track the highest impact action by storing the same in $HOME/.fboss2/conf_metadata.json at the end of each configuration change. And at the end of the commit, it will perform the agent restart. Current proposal has the wedge_agent to be restarted. Other agent restart can be added in future.

Note: this change is part of a series, the previous one is #783.

Test Plan

  1. Tests for the new commands are added in CmdConfigQosBufferPool.
Test project /var/FBOSS/tmp_bld_dir/build/fboss
    Start 25: CmdConfigQosBufferPoolTestFixture.bufferPoolNameValidation
1/8 Test #25: CmdConfigQosBufferPoolTestFixture.bufferPoolNameValidation ..........   Passed    0.01 sec
    Start 26: CmdConfigQosBufferPoolTestFixture.bufferBytesValueValidation
2/8 Test #26: CmdConfigQosBufferPoolTestFixture.bufferBytesValueValidation ........   Passed    0.01 sec
    Start 27: CmdConfigQosBufferPoolTestFixture.sharedBytesCreatesBufferPool
3/8 Test #27: CmdConfigQosBufferPoolTestFixture.sharedBytesCreatesBufferPool ......   Passed    0.02 sec
    Start 28: CmdConfigQosBufferPoolTestFixture.headroomBytesCreatesBufferPool
4/8 Test #28: CmdConfigQosBufferPoolTestFixture.headroomBytesCreatesBufferPool ....   Passed    0.02 sec
    Start 29: CmdConfigQosBufferPoolTestFixture.reservedBytesCreatesBufferPool
5/8 Test #29: CmdConfigQosBufferPoolTestFixture.reservedBytesCreatesBufferPool ....   Passed    0.02 sec
    Start 30: CmdConfigQosBufferPoolTestFixture.updateExistingBufferPool
6/8 Test #30: CmdConfigQosBufferPoolTestFixture.updateExistingBufferPool ..........   Passed    0.03 sec
    Start 31: CmdConfigQosBufferPoolTestFixture.commandsHaveColdBootActionLevel
7/8 Test #31: CmdConfigQosBufferPoolTestFixture.commandsHaveColdBootActionLevel ...   Passed    0.01 sec
    Start 32: CmdConfigQosBufferPoolTestFixture.printOutputSharedBytes
8/8 Test #32: CmdConfigQosBufferPoolTestFixture.printOutputSharedBytes ............   Passed    0.01 sec

100% tests passed, 0 tests failed out of 8

Total Test time (real) =   0.14 sec
  1. Tests for the action on commit are added to existing test ConfigSessionTestFixture.
Test project /var/FBOSS/tmp_bld_dir/build/fboss
      Start 45: ConfigSessionTestFixture.sessionInitialization
 1/18 Test #45: ConfigSessionTestFixture.sessionInitialization ...............   Passed    0.01 sec
      Start 46: ConfigSessionTestFixture.sessionConfigModified
 2/18 Test #46: ConfigSessionTestFixture.sessionConfigModified ...............   Passed    0.02 sec
      Start 47: ConfigSessionTestFixture.sessionCommit
 3/18 Test #47: ConfigSessionTestFixture.sessionCommit .......................   Passed    0.12 sec
      Start 48: ConfigSessionTestFixture.multipleChangesInOneSession
 4/18 Test #48: ConfigSessionTestFixture.multipleChangesInOneSession .........   Passed    0.02 sec
      Start 49: ConfigSessionTestFixture.sessionPersistsAcrossCommands
 5/18 Test #49: ConfigSessionTestFixture.sessionPersistsAcrossCommands .......   Passed    0.01 sec
      Start 50: ConfigSessionTestFixture.symlinkRollbackOnFailure
 6/18 Test #50: ConfigSessionTestFixture.symlinkRollbackOnFailure ............   Passed    0.04 sec
      Start 51: ConfigSessionTestFixture.atomicRevisionCreation
 7/18 Test #51: ConfigSessionTestFixture.atomicRevisionCreation ..............   Passed    0.05 sec
      Start 52: ConfigSessionTestFixture.concurrentSessionCreationSameUser
 8/18 Test #52: ConfigSessionTestFixture.concurrentSessionCreationSameUser ...   Passed    0.04 sec
      Start 53: ConfigSessionTestFixture.revisionNumberExtraction
 9/18 Test #53: ConfigSessionTestFixture.revisionNumberExtraction ............   Passed    0.01 sec
      Start 54: ConfigSessionTestFixture.rollbackCreatesNewRevision
10/18 Test #54: ConfigSessionTestFixture.rollbackCreatesNewRevision ..........   Passed    0.05 sec
      Start 55: ConfigSessionTestFixture.rollbackToPreviousRevision
11/18 Test #55: ConfigSessionTestFixture.rollbackToPreviousRevision ..........   Passed    0.04 sec
      Start 56: ConfigSessionTestFixture.actionLevelDefaultIsHitless
12/18 Test #56: ConfigSessionTestFixture.actionLevelDefaultIsHitless .........   Passed    0.01 sec
      Start 57: ConfigSessionTestFixture.actionLevelUpdateAndGet
13/18 Test #57: ConfigSessionTestFixture.actionLevelUpdateAndGet .............   Passed    0.01 sec
      Start 58: ConfigSessionTestFixture.actionLevelHigherTakesPrecedence
14/18 Test #58: ConfigSessionTestFixture.actionLevelHigherTakesPrecedence ....   Passed    0.01 sec
      Start 59: ConfigSessionTestFixture.actionLevelReset
15/18 Test #59: ConfigSessionTestFixture.actionLevelReset ....................   Passed    0.02 sec
      Start 60: ConfigSessionTestFixture.actionLevelPersistsToMetadataFile
16/18 Test #60: ConfigSessionTestFixture.actionLevelPersistsToMetadataFile ...   Passed    0.01 sec
      Start 61: ConfigSessionTestFixture.actionLevelLoadsFromMetadataFile
17/18 Test #61: ConfigSessionTestFixture.actionLevelLoadsFromMetadataFile ....   Passed    0.01 sec
      Start 62: ConfigSessionTestFixture.actionLevelPersistsAcrossSessions
18/18 Test #62: ConfigSessionTestFixture.actionLevelPersistsAcrossSessions ...   Passed    0.01 sec

100% tests passed, 0 tests failed out of 18

Total Test time (real) =   0.51 sec

@meta-cla meta-cla bot added the CLA Signed label Jan 8, 2026
@benoit-nexthop benoit-nexthop force-pushed the fboss2-cli-prototype_part11 branch 3 times, most recently from 4aedab0 to 4daa3c0 Compare January 12, 2026 20:43
@manoharan-nexthop manoharan-nexthop force-pushed the fboss2-cli-prototype_part11 branch from 4daa3c0 to a299448 Compare January 13, 2026 13:30
@benoit-nexthop benoit-nexthop force-pushed the fboss2-cli-prototype_part11 branch 5 times, most recently from 77f6f22 to fabd6db Compare January 19, 2026 21:06
@benoit-nexthop benoit-nexthop force-pushed the fboss2-cli-prototype_part11 branch 2 times, most recently from 06deb56 to 3418ae4 Compare January 22, 2026 01:54
benoit-nexthop and others added 2 commits January 22, 2026 21:08
1. Some of the configuration commands like QoS buffer pool modification
requires an agent restart and some are hitless. Inorder to take
appropriate action during the commit, track the highest impact action by
storing the same in `$HOME/.fboss2/action_level` at the end of each
configuration change. The proposed change only prints a warning if the
action needs to be taken. Later this can be modified to perform the
action automatically

2. Add QoS buffer pool configuration commands
```
- fboss2 config qos buffer-pool <name> shared-bytes <value>
- fboss2 config qos buffer-pool <name> headroom-bytes <value>
- fboss2 config qos buffer-pool <name> reserved-bytes <value>
```

1. Updated existing UT for action information
2. Added new tests for QoS buffer bool configurations.

```
[admin@fboss101 ~]$ ~/benoit/fboss2-dev config qos buffer-pool testpool headroom-bytes 1024
Successfully set headroom-bytes for buffer-pool 'testpool' to 1024
[admin@fboss101 ~]$ ~/benoit/fboss2-dev config session diff
--- current live config
+++ session config
@@ -121,6 +121,12 @@
     "arpAgerInterval": 5,
     "arpRefreshSeconds": 20,
     "arpTimeoutSeconds": 60,
+    "bufferPoolConfigs": {
+      "testpool": {
+        "headroomBytes": 1024,
+        "sharedBytes": 0
+      }
+    },
     "clientIdToAdminDistance": {
       "0": 20,
       "1": 1,
[admin@fboss101 ~]$ ll ~/.fboss2
total 216
-rw-r--r-- 1 admin admin 213283 Jan 13 05:15 agent.conf
-rw-r--r-- 1 admin admin     42 Jan 13 05:15 conf_metadata.json
[admin@fboss101 ~]$ cat ~/.fboss2/conf_metadata.json
{
  "action": {
    "WEDGE_AGENT": "AGENT_RESTART"
  }
}
```
@benoit-nexthop benoit-nexthop force-pushed the fboss2-cli-prototype_part11 branch from 3418ae4 to b1ba451 Compare January 23, 2026 09:58
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