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

fix the wrong key in DPU address get from DHCP_SERVER_IPV4_PORT table Issue #288 #289

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sonic_data_client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ func TestGetDpuAddress(t *testing.T) {
t.Errorf("get DPU address should failed: %v, but get %s", err, address)
}

dhcpPortTable.Hset("bridge-midplane|dpu0", "ips", "127.0.0.2,127.0.0.1")
dhcpPortTable.Hset("bridge_midplane|dpu0", "ips@", "127.0.0.2,127.0.0.1")

// test get valid DPU address
address, err = getDpuAddress("dpu0")
Expand Down
2 changes: 1 addition & 1 deletion sonic_data_client/mixed_db_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func getDpuAddress(dpuId string) (string, error) {

// get DPR address by DPU ID and brdige plane
var dhcpPortKey = bridgePlane + "|" + dpuInterface
dpuAddresses, err := Hget(configDbConnector, "DHCP_SERVER_IPV4_PORT", dhcpPortKey, "ips");
dpuAddresses, err := Hget(configDbConnector, "DHCP_SERVER_IPV4_PORT", dhcpPortKey, "ips@");
if err != nil {
return "", err
}
Expand Down
Loading