Skip to content

Comments

Update static database_config.json in swsscommon#1086

Merged
prabhataravind merged 1 commit intosonic-net:masterfrom
prabhataravind:dpu_dbs
Oct 10, 2025
Merged

Update static database_config.json in swsscommon#1086
prabhataravind merged 1 commit intosonic-net:masterfrom
prabhataravind:dpu_dbs

Conversation

@prabhataravind
Copy link
Contributor

Update this static file to match https://github.com/sonic-net/sonic-buildimage/blob/master/platform/vs/docker-sonic-vs/database_config.json to prevent the issue below when using DPU DBs on DVS testbeds running on an Ubuntu 22.04 machine

    return manage_dvs(log_path, dvs_env)
conftest.py:1913: in update_dvs
    dvs = DockerVirtualSwitch(name, imgname, keeptb, new_dvs_env, log_path, max_cpu, forcedvs, buffer_model = buffer_model, enable_coverage=enable_coverage)
conftest.py:435: in __init__
    self.check_ready_status_and_init_db()
conftest.py:524: in check_ready_status_and_init_db
    self.init_dpu_appl_db_validator()
conftest.py:569: in init_dpu_appl_db_validator
    self.dpu_appldb = ApplDbValidator(self.DPU_APPL_DB_ID, self.redis_sock)
conftest.py:183: in __init__
    DVSDatabase.__init__(self, db_id, connector)
dvslib/dvs_database.py:25: in __init__
    self._separator = SonicDBConfig.getSeparator(self.db_connection)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<swsscommon.swsscommon.DBConnector; proxy of <Swig Object of type 'swss::DBConnector *' at 0x73cb37ddaee0> >,)

    @staticmethod
    def getSeparator(*args):
>       return _swsscommon.SonicDBConfig_getSeparator(*args)
E       IndexError: Failed to find 15 database in : key

/usr/lib/python3/dist-packages/swsscommon/swsscommon.py:1712: IndexError

Update this static file to match https://github.com/sonic-net/sonic-buildimage/blob/master/platform/vs/docker-sonic-vs/database_config.json
to prevent the issue below when using DPU DBs on DVS testbeds running on an Ubuntu 22.04 machine

/usr/local/lib/python3.10/dist-packages/flaky/flaky_pytest_plugin.py:146:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
conftest.py:1953: in dvs
    return manage_dvs(log_path, dvs_env)
conftest.py:1913: in update_dvs
    dvs = DockerVirtualSwitch(name, imgname, keeptb, new_dvs_env, log_path, max_cpu, forcedvs, buffer_model = buffer_model, enable_coverage=enable_coverage)
conftest.py:435: in __init__
    self.check_ready_status_and_init_db()
conftest.py:524: in check_ready_status_and_init_db
    self.init_dpu_appl_db_validator()
conftest.py:569: in init_dpu_appl_db_validator
    self.dpu_appldb = ApplDbValidator(self.DPU_APPL_DB_ID, self.redis_sock)
conftest.py:183: in __init__
    DVSDatabase.__init__(self, db_id, connector)
dvslib/dvs_database.py:25: in __init__
    self._separator = SonicDBConfig.getSeparator(self.db_connection)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<swsscommon.swsscommon.DBConnector; proxy of <Swig Object of type 'swss::DBConnector *' at 0x73cb37ddaee0> >,)

    @staticmethod
    def getSeparator(*args):
>       return _swsscommon.SonicDBConfig_getSeparator(*args)
E       IndexError: Failed to find 15 database in : key

/usr/lib/python3/dist-packages/swsscommon/swsscommon.py:1712: IndexError

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prabhataravind prabhataravind marked this pull request as ready for review October 10, 2025 04:54
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202506: Azure/sonic-swss-common.msft#68

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202511: #1127

@mssonicbld
Copy link
Collaborator

@prabhataravind cherry pick PR didn't pass PR checker. Please check!!!
#1127

2 similar comments
@mssonicbld
Copy link
Collaborator

@prabhataravind cherry pick PR didn't pass PR checker. Please check!!!
#1127

@mssonicbld
Copy link
Collaborator

@prabhataravind cherry pick PR didn't pass PR checker. Please check!!!
#1127

mssonicbld added a commit to mssonicbld/sonic-swss.msft that referenced this pull request Dec 17, 2025
<!--
Please make sure you have read and understood the contribution guildlines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

1. Make sure your commit includes a signature generted with `git commit -s`
2. Make sure your commit title follows the correct format: [component]: description
3. Make sure your commit message contains enough details about the change and related tests
4. Make sure your pull request adds related reviewers, asignees, labels

Please also provide the following information in this pull request:
-->

**What I did**
Changes to dash orchs to make sure they subscribe to DPU_APPL_DB instead of APPL_DB.

**Why I did it**
DASH related objects are expected to be programmed via DPU_APPL_DB which reside on the NPU.

**How I verified it**
By running swss unit-tests and sonic-mgmt PL tests

**Details if related**
Related to issue sonic-net/sonic-buildimage#23488
Related sonic-swss-common change: sonic-net/sonic-swss-common#1086
Related sonic-mgmt change: sonic-net/sonic-mgmt#20995
mssonicbld added a commit to Azure/sonic-swss.msft that referenced this pull request Dec 17, 2025
…rchs (#185)

<!--
Please make sure you have read and understood the contribution guildlines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

1. Make sure your commit includes a signature generted with `git commit -s`
2. Make sure your commit title follows the correct format: [component]: description
3. Make sure your commit message contains enough details about the change and related tests
4. Make sure your pull request adds related reviewers, asignees, labels

Please also provide the following information in this pull request:
-->

**What I did**
Changes to dash orchs to make sure they subscribe to DPU_APPL_DB instead of APPL_DB.

**Why I did it**
DASH related objects are expected to be programmed via DPU_APPL_DB which reside on the NPU.

**How I verified it**
By running swss unit-tests and sonic-mgmt PL tests

**Details if related**
Related to issue sonic-net/sonic-buildimage#23488
Related sonic-swss-common change: sonic-net/sonic-swss-common#1086
Related sonic-mgmt change: sonic-net/sonic-mgmt#20995
mssonicbld added a commit to mssonicbld/sonic-swss that referenced this pull request Dec 17, 2025
<!--
Please make sure you have read and understood the contribution guildlines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

1. Make sure your commit includes a signature generted with `git commit -s`
2. Make sure your commit title follows the correct format: [component]: description
3. Make sure your commit message contains enough details about the change and related tests
4. Make sure your pull request adds related reviewers, asignees, labels

Please also provide the following information in this pull request:
-->

**What I did**
Changes to dash orchs to make sure they subscribe to DPU_APPL_DB instead of APPL_DB.

**Why I did it**
DASH related objects are expected to be programmed via DPU_APPL_DB which reside on the NPU.

**How I verified it**
By running swss unit-tests and sonic-mgmt PL tests

**Details if related**
Related to issue sonic-net/sonic-buildimage#23488
Related sonic-swss-common change: sonic-net/sonic-swss-common#1086
Related sonic-mgmt change: sonic-net/sonic-mgmt#20995
mssonicbld added a commit to sonic-net/sonic-swss that referenced this pull request Jan 5, 2026
<!--
Please make sure you have read and understood the contribution guildlines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

1. Make sure your commit includes a signature generted with `git commit -s`
2. Make sure your commit title follows the correct format: [component]: description
3. Make sure your commit message contains enough details about the change and related tests
4. Make sure your pull request adds related reviewers, asignees, labels

Please also provide the following information in this pull request:
-->

**What I did**
Changes to dash orchs to make sure they subscribe to DPU_APPL_DB instead of APPL_DB.

**Why I did it**
DASH related objects are expected to be programmed via DPU_APPL_DB which reside on the NPU.

**How I verified it**
By running swss unit-tests and sonic-mgmt PL tests

**Details if related**
Related to issue sonic-net/sonic-buildimage#23488
Related sonic-swss-common change: sonic-net/sonic-swss-common#1086
Related sonic-mgmt change: sonic-net/sonic-mgmt#20995
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.

4 participants