You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gNMI uses Dbus ApplyPatchDb API. Currently it doesn't use namespace & it has to be updated.
mixed_db_client.go calls ApplyPatchDbhere, ApplyPatchDb definition here
How this was discovered?
when creating config checkpoint by using Dbus API; then configuration returned is the namespace config-db. dbus-send --system --dest=org.SONiC.HostService.gcu --type=method_call --print-reply /org/SONiC/HostService/gcu org.SONiC.HostService.gcu.create_checkpoint string:'checkpoint1'
but when run ApplyPatchDb API, then it isn't considering the PORTS viz in the namespace config-db & if given the port name which exists in config_db (not the namespace one), then also ApplyPatchDb API fails.
dbus-send --system --dest=org.SONiC.HostService.gcu --type=method_call --print-reply /org/SONiC/HostService/gcu org.SONiC.HostService.gcu.apply_patch_db string:'[{"op": "add", "path": "/PORT/Ethernet0/admin_status", "value": "down"}]' => fails with error "'PORT' not found in ....(returns entire config_db.json)"
dbus-send --system --dest=org.SONiC.HostService.gcu --type=method_call --print-reply /org/SONiC/HostService/gcu org.SONiC.HostService.gcu.apply_patch_db string:'[{"op": "add", "path": "/localhost/PORT/Eth0~10~10~10/admin_status", "value": "down"}]' => "Error: Failed to apply patch on the following scopes:"
The text was updated successfully, but these errors were encountered:
Per this change GCU apply-patch to support multi-asic, the namespace/asic ID is the prefix in the path in JSON file. Will need to change MixedDbClient.ConvertToJsonPatch() to include the asic namespace in the path.
Is this a known issue? If not, Cisco can work on a PR for this.
gNMI uses Dbus
ApplyPatchDb
API. Currently it doesn't use namespace & it has to be updated.mixed_db_client.go
callsApplyPatchDb
here,ApplyPatchDb
definition hereHow this was discovered?
when creating config checkpoint by using Dbus API; then configuration returned is the namespace config-db.
dbus-send --system --dest=org.SONiC.HostService.gcu --type=method_call --print-reply /org/SONiC/HostService/gcu org.SONiC.HostService.gcu.create_checkpoint string:'checkpoint1'
but when run
ApplyPatchDb
API, then it isn't considering the PORTS viz in the namespace config-db & if given the port name which exists inconfig_db
(not the namespace one), then alsoApplyPatchDb
API fails.dbus-send --system --dest=org.SONiC.HostService.gcu --type=method_call --print-reply /org/SONiC/HostService/gcu org.SONiC.HostService.gcu.apply_patch_db string:'[{"op": "add", "path": "/PORT/Ethernet0/admin_status", "value": "down"}]'
=> fails with error "'PORT' not found in ....(returns entireconfig_db.json
)"dbus-send --system --dest=org.SONiC.HostService.gcu --type=method_call --print-reply /org/SONiC/HostService/gcu org.SONiC.HostService.gcu.apply_patch_db string:'[{"op": "add", "path": "/localhost/PORT/Eth0~10~10~10/admin_status", "value": "down"}]'
=> "Error: Failed to apply patch on the following scopes:"The text was updated successfully, but these errors were encountered: