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

Facing issues in Transformer - throws error: "No entry found in the map of module" #170

Closed
mbalachandar opened this issue Oct 12, 2019 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@mbalachandar
Copy link
Collaborator

mbalachandar commented Oct 12, 2019

Hi

Transformer throws error saying "No entry found in the map of module" for the module "openconfig-network-instance" for the below mentioned REST api request. But the annotation file contains all the necessary information to translate.

REST request:

curl -X PUT "https://ip-address/restconf/data/openconfig-network-instance:network-instances/network-instance=bb/vlans/vlan=13/config/openconfig-vlan-deviation:igmp-snooping/version" -H "accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -d "{ \"openconfig-vlan-deviation:version\": 2}"

For me, nothing is working from this API and its children - "/restconf/data/openconfig-network-instance:network-instances/network-instance=bb/vlans/vlan=13/"

Needless to say, I am blocked by this. Please resolve it and let me know if I miss anything

Copied the trace file and other required files in the link below to recreate the issue. You need to get the openconfig-network-instance.yang and its related yang files from the openconfig github.
https://ent.box.com/s/jg7a1lnkb17obkwub9dpp32f61m7hqnw

traces:

Nov 14 21:46:03.597798 Spine1 INFO mgmt-framework#supervisord: rest-server I1114 21:46:03.597545      54 xlate_utils.go:308] module name = openconfig-network-instance
Nov 14 21:46:03.597798 Spine1 INFO mgmt-framework#supervisord: rest-server I1114 21:46:03.597555      54 common_app.go:212] getModuleNmFromPath() returned module name = openconfig-network-instance
Nov 14 21:46:03.597816 Spine1 INFO mgmt-framework#supervisord: rest-server E1114 21:46:03.597565      54 xlate.go:403] No entry found in the map of module names to ordered list of DB Tables for module = openconfig-network-instance
Nov 14 21:46:03.597816 Spine1 INFO mgmt-framework#supervisord: rest-server E1114 21:46:03.597575      54 common_app.go:215] GetOrdDBTblList() failed
Nov 14 21:46:03.597825 Spine1 INFO mgmt-framework#supervisord: rest-server E1114 21:46:03.597586      54 handler.go:47] [REST-1] Translib error *errors.errorString - No entry found in the map of module names to ordered list of DB Tables for module = openconfig-network-instance
Nov 14 21:46:03.598020 Spine1 INFO mgmt-framework#supervisord: rest-server I1114 21:46:03.597757      54 handler.go:60] [REST-1] Sending response 500, type=application/yang-data+json, data={"ietf-restconf:errors":{"error":[{"error-type":"application","error-tag":"operation-failed"}]}}
Nov 14 21:46:03.598020 Spine1 INFO mgmt-framework#supervisord: rest-server I1114 21:46:03.597783      54 router.go:116] [REST-1] PutOpenconfigVlanDeviationNetworkInstancesNetworkInstanceVlansVlanConfigIgmpSnoopingVersion took 2.050321ms

Thanks
Balachandar

@joyas-joseph
Copy link
Collaborator

project-arlo branch doesnt yet have the changes to successfully compile openconfig-network-instances yang.

@mbalachandar
Copy link
Collaborator Author

what do you mean by compile.. ??

@mbalachandar
Copy link
Collaborator Author

you mean pyang yang compilation? or something else ?

@joyas-joseph
Copy link
Collaborator

#140

There was a patch provided for this issue but then we had the issue with the URI being generated.

Hopefully, #171 will fix the above.

It would be great if we have all the relevant code/files (yang annotation and extension etc) on a branch for faster issue resolution.

@kwangsuk
Copy link
Collaborator

Hi Balachandar,

We managed to build and import all dependent modules of openconfg-network-interface.yang, to reproduce your issue. But, we've seen the unmarshall problem from request_binder.go. Any idea how to get around?

When the command is issued,
curl -k -X PUT "https://localhost/restconf/data/openconfig-network-instance:network-instances/network-instance=bb/vlans/vlan=13/config/openconfig-vlan-deviation:igmp-snooping/version" -H "accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -d "{ "openconfig-vlan-deviation:version": 2}"

I1014 15:05:32.735742 88129 request_binder.go:280] modified path is: elem:<name:"network-instances" > elem:<name:"network-instance" key:<key:"name" value:"bb" > > elem:<name:"vlans" > elem:<name:"vlan" key:<key:"vlan-id" value:"13" > > elem:<name:"config" > elem:<name:"igmp-snooping" >
E1014 15:05:32.735961 88129 request_binder.go:75] invalid character 'o' looking for beginning of object key string
I1014 15:05:32.736022 88129 translib.go:794] Error in request binding: invalid character 'o' looking for beginning of object key string
E1014 15:05:32.736112 88129 handler.go:59] [REST-1] Translib error tlerr.TranslibSyntaxValidationError - invalid character 'o' looking for beginning of object key string

@mbalachandar
Copy link
Collaborator Author

You need to escape the quotation in the payload like this.

-d "{ "openconfig-vlan-deviation:version": 2}"

@mbalachandar
Copy link
Collaborator Author

mbalachandar commented Oct 14, 2019

-d "{ \"openconfig-vlan-deviation:version\": 2}"

@mbalachandar
Copy link
Collaborator Author

mbalachandar commented Oct 17, 2019

Hi Kwan

Work around is not working. With the work around, now rest_server is crashing in the transformer. Please check it.

Nov 20 17:06:37.588033 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.587772      53 common_app.go:93] translateReplace:path =/openconfig-network-instance:network-instances/network-instance[name=vv]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version
Nov 20 17:06:37.588033 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.587780      53 common_app.go:226] translateCRUDCommon:path =/openconfig-network-instance:network-instances/network-instance[name=vv]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version
Nov 20 17:06:37.588033 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.587788      53 xlate.go:387] received uri /openconfig-network-instance:network-instances/network-instance[name=vv]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version to extract module name from
Nov 20 17:06:37.588051 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.587802      53 xlate_utils.go:290] module name = openconfig-network-instance
Nov 20 17:06:37.588051 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.587811      53 common_app.go:234] getModuleNmFromPath() returned module name = openconfig-network-instance
Nov 20 17:06:37.588076 sonic INFO mgmt-framework#supervisord: rest-server E1120 17:06:37.587821      53 xlate.go:403] No entry found in the map of module names to ordered list of DB Tables for module = openconfig-network-instance
Nov 20 17:06:37.588076 sonic INFO mgmt-framework#supervisord: rest-server E1120 17:06:37.587832      53 common_app.go:237] GetOrdDBTblList() failed
Nov 20 17:06:37.588076 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.587840      53 common_app.go:243] GetOrdDBTblList() returned ordered table list = [NET_INST_TABLE_LIST VLAN_LIST CFG_L2MC_TABLE]
Nov 20 17:06:37.588097 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.587857      53 common_app.go:250] Tables to watch[0xc018f0dd00 0xc018f0dd40 0xc018f0dde0]
Nov 20 17:06:37.668565 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.668267      53 xlate.go:279] REPLACE case
Nov 20 17:06:37.668565 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.668295      53 xlate_to_db.go:371] Update/replace req: path("/openconfig-network-instance:network-instances/network-instance[name=vv]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version").
Nov 20 17:06:37.668565 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.668309      53 xlate_to_db.go:433] key(""), xpathPrefix("").
Nov 20 17:06:37.668565 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.668321      53 xlate_to_db.go:474] slice/map data: key(""), xpathPrefix("").
Nov 20 17:06:37.668771 sonic INFO mgmt-framework#supervisord: rest-server I1120 17:06:37.668330      53 xlate_to_db.go:487] slice/map data: curKey(""), xpath("/openconfig-network-instance:network-instances"), curUri("/openconfig-network-instance:network-instances").
Nov 20 17:06:37.669297 sonic INFO mgmt-framework#supervisord: rest-server 2016/11/20 17:06:37 http2: panic serving 10.58.50.193:56731: runtime error: invalid memory address or nil pointer dereference
Nov 20 17:06:37.669297 sonic INFO mgmt-framework#supervisord: rest-server goroutine 99 [running]:
Nov 20 17:06:37.669297 sonic INFO mgmt-framework#supervisord: rest-server net/http.(*http2serverConn).runHandler.func1(0xc018b4e710, 0xc02a515fa7, 0xc001220fc0)
Nov 20 17:06:37.669297 sonic INFO mgmt-framework#supervisord: rest-server #011/usr/local/go/src/net/http/h2_bundle.go:5870 +0x1c3
Nov 20 17:06:37.669316 sonic INFO mgmt-framework#supervisord: rest-server panic(0x15b7720, 0x2ed8250)
Nov 20 17:06:37.669316 sonic INFO mgmt-framework#supervisord: rest-server #011/usr/local/go/src/runtime/panic.go:513 +0x1e6
Nov 20 17:06:37.669325 sonic INFO mgmt-framework#supervisord: rest-server translib/transformer.yangReqToDbMapCreate(0xc006995d40, 0xc0125e1040, 0x3, 0xc027bb75c0, 0x2e, 0x0, 0x0, 0x0, 0x0, 0x157db80, ...)
Nov 20 17:06:37.669325 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/translib/transformer/xlate_to_db.go:503 +0x2eed
Nov 20 17:06:37.669344 sonic INFO mgmt-framework#supervisord: rest-server translib/transformer.dbMapCreate(0xc006995d40, 0xc0125e1040, 0x3, 0xc014ceb720, 0x96, 0x157db80, 0xc02aa8d4a0, 0xc02aa8d5f0, 0x0, 0x0)
Nov 20 17:06:37.669344 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/translib/transformer/xlate_to_db.go:385 +0x114e
Nov 20 17:06:37.669344 sonic INFO mgmt-framework#supervisord: rest-server translib/transformer.dbMapUpdate(0xc006995d40, 0xc0125e1040, 0x3, 0xc014ceb720, 0x96, 0x157db80, 0xc02aa8d4a0, 0xc02aa8d5f0, 0x0, 0x0)
Nov 20 17:06:37.669371 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/translib/transformer/xlate_to_db.go:372 +0x18c
Nov 20 17:06:37.669371 sonic INFO mgmt-framework#supervisord: rest-server translib/transformer.XlateToDb(0xc014ceb720, 0x96, 0x3, 0xc006995d40, 0xc0125e1040, 0xc012513370, 0x0, 0x0, 0x0)
Nov 20 17:06:37.669387 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/translib/transformer/xlate.go:280 +0x65e
Nov 20 17:06:37.669431 sonic INFO mgmt-framework#supervisord: rest-server translib.(*CommonApp).translateCRUDCommon(0xc015624140, 0xc006995d40, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0)
Nov 20 17:06:37.669431 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/translib/common_app.go:255 +0xb31
Nov 20 17:06:37.669440 sonic INFO mgmt-framework#supervisord: rest-server translib.(*CommonApp).translateReplace(0xc015624140, 0xc006995d40, 0x0, 0x0, 0x0, 0x0, 0x0)
Nov 20 17:06:37.669440 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/translib/common_app.go:95 +0x195
Nov 20 17:06:37.669452 sonic INFO mgmt-framework#supervisord: rest-server translib.Replace(0xc014ceb720, 0x96, 0xc01d505800, 0x2c, 0x600, 0x0, 0x0, 0x0)
Nov 20 17:06:37.669452 sonic INFO mgmt-framework#supervisord: rest-server #011/sonic/src/sonic-mgmt-framework/src/translib/translib.go:301 +0x6c8

Thanks
Balachandar

@mbalachandar mbalachandar added the bug Something isn't working label Oct 17, 2019
@kwangsuk
Copy link
Collaborator

Hi Bala,

The work around is working fine. You need to update YANG models based on SONiC modeling guideline.
e.g. sonic-igmp-snooping.yang
`module sonic-igmp-snooping {
namespace "https://github.com/Azure/sonic-igmp-snooping";
prefix sigmps;
yang-version 1.1;
. . .
container sonic-igmp-snooping {

    container NET_INST_TABLE_TEST {
      list NET_INST_TABLE_TEST_LIST {
        key "name";

. . .
}
}
. . .
container CFG_L2MC_TABLE {
list CFG_L2MC_TABLE_LIST {
key "vlanname";
. . .
`
Your annotation also needs to be updated with the correct deviation path.

deviation /oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:vlans/oc-netinst:vlan/oc-netinst:config/**oc-vlan-deviation**:igmp-snooping {
  deviate add {
    sonic-ext:table-name "CFG_L2MC_TABLE";
    sonic-ext:key-delimiter ":";
  }
}

. . .

Make sure to list the correct TABLE names based on your sonic-igmp-snooping.yang in the common_app.go.

   OrdTblList = []string {"NET_INST_TABLE_TEST", "VLAN", "CFG_L2MC_TABLE"}
    log.Info("GetOrdDBTblList() returned ordered table list = ", OrdTblList)
    app.cmnAppOrdTbllist = OrdTblList

@mbalachandar
Copy link
Collaborator Author

Hi Kwan

Why do I need to mention - "oc-vlan-deviation" for igmp-snooping node. It should be "oc-netinst" like for the vlan node.

Thanks
Balachandar

@mbalachandar
Copy link
Collaborator Author

Hi Kwan

Why do I need to mention - "oc-vlan-deviation" for igmp-snooping node. It should be "oc-netinst" like for the vlan node, correct..??

Anyway I have modified the annotation file as you mentioned below. but still its not working.
/openconfig-network-instance:network-instances/network-instance[name=ee]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version

Please see the traces below. Also can you please send the rest-server trace file which is working for you.

Nov 21 18:40:10.606708 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606503      53 common_app.go:64] initialize:path =/openconfig-network-instance:network-instances/network-instance[name=ee]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version
Nov 21 18:40:10.606838 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606565      53 db.go:324] NewDB: Init indication not requested
Nov 21 18:40:10.606870 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606573      53 common_app.go:93] translateReplace:path =/openconfig-network-instance:network-instances/network-instance[name=ee]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version
Nov 21 18:40:10.606870 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606578      53 common_app.go:226] translateCRUDCommon:path =/openconfig-network-instance:network-instances/network-instance[name=ee]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version
Nov 21 18:40:10.606870 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606583      53 xlate.go:387] received uri /openconfig-network-instance:network-instances/network-instance[name=ee]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version to extract module name from
Nov 21 18:40:10.606870 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606594      53 xlate_utils.go:290] module name = openconfig-network-instance
Nov 21 18:40:10.606889 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606601      53 common_app.go:234] getModuleNmFromPath() returned module name = openconfig-network-instance
Nov 21 18:40:10.606902 sonic INFO mgmt-framework#supervisord: rest-server E1121 18:40:10.606612      53 xlate.go:403] No entry found in the map of module names to ordered list of DB Tables for module = openconfig-network-instance
Nov 21 18:40:10.606902 sonic INFO mgmt-framework#supervisord: rest-server E1121 18:40:10.606622      53 common_app.go:237] GetOrdDBTblList() failed
Nov 21 18:40:10.606912 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606630      53 common_app.go:243] GetOrdDBTblList() returned ordered table list = [NET_INST_TABLE_LIST VLAN_LIST CFG_L2MC_TABLE]
Nov 21 18:40:10.606912 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.606647      53 common_app.go:250] Tables to watch[0xc017ddc680 0xc017ddc6a0 0xc017ddc6c0]
Nov 21 18:40:10.699838 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.699517      53 xlate.go:279] REPLACE case
Nov 21 18:40:10.699838 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.699544      53 xlate_to_db.go:371] Update/replace req: path("/openconfig-network-instance:network-instances/network-instance[name=ee]/vlans/vlan[vlan-id=12]/config/openconfig-vlan-deviation:igmp-snooping/version").
Nov 21 18:40:10.699838 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.699553      53 xlate_to_db.go:433] key(""), xpathPrefix("").
Nov 21 18:40:10.699838 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.699561      53 xlate_to_db.go:474] slice/map data: key(""), xpathPrefix("").
Nov 21 18:40:10.699838 sonic INFO mgmt-framework#supervisord: rest-server I1121 18:40:10.699568      53 xlate_to_db.go:487] slice/map data: curKey(""), xpath("/openconfig-network-instance:network-instances"), curUri("/openconfig-network-instance:network-instances").

Thanks
Balachandar

@mbalachandar
Copy link
Collaborator Author

Hi Kwan

Tested with the latest code changes from the brcm_poc. With that work around is working.

But facing other issues with transformer - to make the default values to be translated.

Closing this one for now.

@mbalachandar
Copy link
Collaborator Author

Hi Kwan

I am still facing issues with transformer when I changed the yang module from network-instance to interfaces. This time transformer is throwing empty map.

I1023 19:30:09.174607 13991 xlate_to_db.go:374] Update/replace req: path("/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/openconfig-interfaces-deviation:igmp-snooping/version") result("map[]").
map[]
I1023 19:30:09.174668 13991 common_app.go:257] transformer.XlateToDb() returnedmap[]
E1023 19:30:09.174676 13991 common_app.go:264] XlatetoDB() returned empty map
E1023 19:30:09.174689 13991 handler.go:59] [REST-1] Translib error *errors.errorString - transformer.XlatetoDB() returned empty map

fyi.. I also see other issue further if I put the content of the deviation yang (openconfig-interfaces-deviation.yang) inside the openconfig-interfaces.yang directly to evade the above mentioned empty map error.

Please let us know when the fix is available for all these issues.

box link with all the details.

https://ent.box.com/s/eptoa5ss66aj30fivguww7hk1501bhd4

Please see the log below.

I1023 19:30:09.149713 13991 common_app.go:64] initialize:path =/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/openconfig-interfaces-deviation:igmp-snooping/version
I1023 19:30:09.149779 13991 db.go:333] NewDB: Init indication not requested
I1023 19:30:09.149796 13991 common_app.go:93] translateReplace:path =/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/openconfig-interfaces-deviation:igmp-snooping/version
I1023 19:30:09.149810 13991 common_app.go:226] translateCRUDCommon:path =/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/openconfig-interfaces-deviation:igmp-snooping/version
I1023 19:30:09.149824 13991 xlate.go:387] received uri /openconfig-interfaces:interfaces/interface[name=Vlan10]/config/openconfig-interfaces-deviation:igmp-snooping/version to extract module name from
I1023 19:30:09.149846 13991 xlate_utils.go:293] module name = openconfig-interfaces
I1023 19:30:09.149859 13991 common_app.go:234] getModuleNmFromPath() returned module name = openconfig-interfaces
I1023 19:30:09.149870 13991 common_app.go:243] GetOrdDBTblList() returned ordered table list = [VLAN CFG_L2MC_TABLE]
I1023 19:30:09.149884 13991 common_app.go:250] Tables to watch[0xc003f37fa0 0xc003f37fc0]
I1023 19:30:09.174091 13991 xlate.go:279] REPLACE case
I1023 19:30:09.174130 13991 xlate_to_db.go:372] Update/replace req: path("/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/openconfig-interfaces-deviation:igmp-snooping/version").
I1023 19:30:09.174145 13991 xlate_to_db.go:434] key(""), xpathPrefix("").
I1023 19:30:09.174157 13991 xlate_to_db.go:475] slice/map data: key(""), xpathPrefix("").
I1023 19:30:09.174166 13991 xlate_to_db.go:488] slice/map data: curKey(""), xpath("/openconfig-interfaces:interfaces"), curUri("/openconfig-interfaces:interfaces").
I1023 19:30:09.174177 13991 xlate_to_db.go:434] key(""), xpathPrefix("/openconfig-interfaces:interfaces").
I1023 19:30:09.174185 13991 xlate_to_db.go:475] slice/map data: key(""), xpathPrefix("/openconfig-interfaces:interfaces").
I1023 19:30:09.174192 13991 xlate_to_db.go:488] slice/map data: curKey(""), xpath("/openconfig-interfaces:interfaces/interface"), curUri("/openconfig-interfaces:interfaces/interface").
I1023 19:30:09.174199 13991 xlate_to_db.go:434] key(""), xpathPrefix("/openconfig-interfaces:interfaces/interface").
I1023 19:30:09.174205 13991 xlate_to_db.go:438] slice data: key(""), xpathPrefix("/openconfig-interfaces:interfaces/interface").
I1023 19:30:09.174218 13991 xlate_utils.go:41] key concatenater(":") found for xpath /openconfig-interfaces:interfaces/interface
I1023 19:30:09.174226 13991 xlate_to_db.go:434] key("Vlan10"), xpathPrefix("/openconfig-interfaces:interfaces/interface").
I1023 19:30:09.174234 13991 xlate_to_db.go:475] slice/map data: key("Vlan10"), xpathPrefix("/openconfig-interfaces:interfaces/interface").
I1023 19:30:09.174241 13991 xlate_to_db.go:488] slice/map data: curKey("Vlan10"), xpath("/openconfig-interfaces:interfaces/interface/config"), curUri("/openconfig-interfaces:interfaces/interface[name=Vlan10]/config").
I1023 19:30:09.174251 13991 xlate_to_db.go:434] key("Vlan10"), xpathPrefix("/openconfig-interfaces:interfaces/interface/config").
I1023 19:30:09.174258 13991 xlate_to_db.go:475] slice/map data: key("Vlan10"), xpathPrefix("/openconfig-interfaces:interfaces/interface/config").
I1023 19:30:09.174267 13991 xlate_to_db.go:488] slice/map data: curKey("Vlan10"), xpath("/openconfig-interfaces:interfaces/interface/config/igmp-snooping"), curUri("/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/igmp-snooping").
I1023 19:30:09.174275 13991 xlate_to_db.go:434] key("Vlan10"), xpathPrefix("/openconfig-interfaces:interfaces/interface/config/igmp-snooping").
I1023 19:30:09.174282 13991 xlate_to_db.go:475] slice/map data: key("Vlan10"), xpathPrefix("/openconfig-interfaces:interfaces/interface/config/igmp-snooping").
I1023 19:30:09.174290 13991 xlate_to_db.go:488] slice/map data: curKey("Vlan10"), xpath("/openconfig-interfaces:interfaces/interface/config/igmp-snooping/version"), curUri("/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/igmp-snooping/version").
I1023 19:30:09.174302 13991 xlate_to_db.go:532] data field: key("version"), value("2").
I1023 19:30:09.174330 13991 xlate_to_db.go:87] name: "version", xpathPrefix("/openconfig-interfaces:interfaces/interface/config/igmp-snooping").
E1023 19:30:09.174340 13991 xlate_to_db.go:95] Table for yang-path("/openconfig-interfaces:interfaces/interface/config/igmp-snooping/version") not found.
E1023 19:30:09.174347 13991 xlate_to_db.go:536] Failed constructing data for db write: key("version"), value("2"), path("/openconfig-interfaces:interfaces/interface/config/igmp-snooping").
I1023 19:30:09.174360 13991 xlate_to_db.go:475] slice/map data: key("Vlan10"), xpathPrefix("/openconfig-interfaces:interfaces/interface").
I1023 19:30:09.174367 13991 xlate_to_db.go:488] slice/map data: curKey("Vlan10"), xpath("/openconfig-interfaces:interfaces/interface/name"), curUri("/openconfig-interfaces:interfaces/interface[name=Vlan10]/name").
I1023 19:30:09.174376 13991 xlate_to_db.go:532] data field: key("name"), value("Vlan10").
I1023 19:30:09.174382 13991 xlate_to_db.go:87] name: "name", xpathPrefix("/openconfig-interfaces:interfaces/interface").
I1023 19:30:09.174607 13991 xlate_to_db.go:374] Update/replace req: path("/openconfig-interfaces:interfaces/interface[name=Vlan10]/config/openconfig-interfaces-deviation:igmp-snooping/version") result("map[]").
map[]
I1023 19:30:09.174668 13991 common_app.go:257] transformer.XlateToDb() returnedmap[]
E1023 19:30:09.174676 13991 common_app.go:264] XlatetoDB() returned empty map
E1023 19:30:09.174689 13991 handler.go:59] [REST-1] Translib error *errors.errorString - transformer.XlatetoDB() returned empty map
I1023 19:30:09.174850 13991 handler.go:72] [REST-1] Sending response 500, type=application/yang-data+json, data={"ietf-restconf:errors":{"error":[{"error-type":"application","error-tag":"operation-failed"}]}}
I1023 19:30:09.174877 13991 router.go:128] [REST-1] PutOpenconfigInterfacesDeviationInterfacesInterfaceConfigIgmpSnoopingVersion took 26.625333ms

@mbalachandar mbalachandar reopened this Oct 24, 2019
@s-mari
Copy link
Collaborator

s-mari commented Oct 29, 2019

Seems like a dev env issue. Provided the dev env setup details. Bala confirmed that the data translation is happening now.

@mbalachandar
Copy link
Collaborator Author

To summarize that - Got the code changes from DELL team and tried the changes on 28th Oct, and confirmed that basic translation is working, but still seeing issues in other places and opened the new issue for the same in github.

  1. Custom transformer function receives as string object in its param instead of ygot target object.
  2. Default value filling - its get filled always even though there is a value for that field already present in the redis db.
  3. Redis db update should not happen if the value from the request is same as in the redis db's value.

@mbalachandar
Copy link
Collaborator Author

Hi

Also facing one more issue, so can you please check it

I1029 12:49:11.246351 159692 db.go:745] setEntry: DoCVL for CREATE
I1029 12:49:11.246362 159692 db.go:561] doCVL: calling ValidateEditConfig: [{3 1 CFG_L2MC_TABLE|Vlan10 map[version:2 fast-leave:0 enabled:0 query-max-response-time:10 last-member-query-interval:1000]}]
libyang[0]: Invalid value "0" in "enabled" element. (path: /sonic-igmp-snooping:sonic-igmp-snooping/CFG_L2MC_TABLE/CFG_L2MC_TABLE_LIST[vlanname='Vlan10']/enabled)
E1029 12:49:11.246671 159692 db.go:567] doCVL: CVL Failure: 1001
E1029 12:49:11.246696 159692 db.go:571] doCVL: 1 1
I1029 12:49:11.246711 159692 db.go:582] doCVL: End: e: Translib Redis Error: CVL Failure: 1,001: {CFG_L2MC_TABLE_LIST 1,001 Invalid Field Received ['Vlan10'] 0 enabled CFG_L2MC_TABLE_LIST with keys['Vlan10' ] has field enabled with invalid value 0 }
E1029 12:49:11.246771 159692 common_app.go:403] REPLACE case - d.CreateEntry() failure
I1029 12:49:11.246776 159692 common_app.go:336] Returning from processCommon() - fail
E1029 12:49:11.246782 159692 common_app.go:158] Translib Redis Error: CVL Failure: 1,001: {CFG_L2MC_TABLE_LIST 1,001 Invalid Field Received ['Vlan10'] 0 enabled CFG_L2MC_TABLE_LIST with keys['Vlan10' ] has field enabled with invalid value 0 }

Thanks
Balachandar

@s-mari
Copy link
Collaborator

s-mari commented Oct 31, 2019

As discussed in yestreday's discussion with BCM team,

@s-mari s-mari closed this as completed Oct 31, 2019
dell-engops pushed a commit that referenced this issue Aug 30, 2022
…are-to-dell_sonic_4.x_share

sync from broadcom_sonic_4.x_share to dell_sonic_4.x_share - 0822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants