-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
When trying to get the list of OpenConfig interfaces, I get a 404 errror which reads more like an internal application problem:
$ curl -I -k -X GET "https://$IP/restconf/data/openconfig-interfaces:interfaces" -H "accept: application/yang-data+json"
HTTP/2 404
content-type: application/yang-data+json
content-length: 127
date: Fri, 30 Sep 2022 09:18:55 GMT
$ curl -k -X GET "https://$IP/restconf/data/openconfig-interfaces:interfaces" -H "accept: application/yang-data+json"
{"ietf-restconf:errors":{"error":[{"error-type":"application","error-tag":"invalid-value","error-message":"Entry not found"}]}}
Using "strace" shows that the problem is related to a COUNTERS_PORT_NAME_MAP item in Redis:
[pid 12369] write(2, "E0930 09:47:56.851061 18 in"..., 102) = 102
| 00000 45 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 E0930 09:47:56.8 |
| 00010 35 31 30 36 31 20 20 20 20 20 20 31 38 20 69 6e 51061 18 in |
| 00020 74 66 5f 61 70 70 2e 67 6f 3a 37 31 39 5d 20 50 tf_app.go:719] P |
| 00030 6f 72 74 2d 4f 49 44 20 28 43 6f 75 6e 74 65 72 ort-OID (Counter |
| 00040 73 29 20 67 65 74 20 66 6f 72 20 61 6c 6c 20 74 s) get for all t |
| 00050 68 65 20 69 6e 74 65 72 66 61 63 65 73 20 66 61 he interfaces fa |
| 00060 69 6c 65 64 21 0a iled!. |
[pid 12369] epoll_ctl(4, EPOLL_CTL_DEL, 9, 0xc0057b2ae4) = 0
[pid 12369] close(9) = 0
[pid 12369] epoll_ctl(4, EPOLL_CTL_DEL, 10, 0xc0057b2ae4) = 0
[pid 12369] close(10) = 0
[pid 12369] write(2, "E0930 09:47:56.851635 18 ha"..., 178) = 178
| 00000 45 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 E0930 09:47:56.8 |
| 00010 35 31 36 33 35 20 20 20 20 20 20 31 38 20 68 61 51635 18 ha |
| 00020 6e 64 6c 65 72 2e 67 6f 3a 35 39 5d 20 5b 52 45 ndler.go:59] [RE |
| 00030 53 54 2d 33 33 5d 20 54 72 61 6e 73 6c 69 62 20 ST-33] Translib |
| 00040 65 72 72 6f 72 20 74 6c 65 72 72 2e 54 72 61 6e error tlerr.Tran |
| 00050 73 6c 69 62 52 65 64 69 73 43 6c 69 65 6e 74 45 slibRedisClientE |
| 00060 6e 74 72 79 4e 6f 74 45 78 69 73 74 20 2d 20 54 ntryNotExist - T |
| 00070 72 61 6e 73 6c 69 62 20 52 65 64 69 73 20 45 72 ranslib Redis Er |
| 00080 72 6f 72 3a 20 45 6e 74 72 79 20 64 6f 65 73 20 ror: Entry does |
| 00090 6e 6f 74 20 65 78 69 73 74 3a 20 43 4f 55 4e 54 not exist: COUNT |
| 000a0 45 52 53 5f 50 4f 52 54 5f 4e 41 4d 45 5f 4d 41 ERS_PORT_NAME_MA |
| 000b0 50 0a P. |
[pid 12369] write(2, "I0930 09:47:56.851940 18 ha"..., 243) = 243
| 00000 49 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 I0930 09:47:56.8 |
| 00010 35 31 39 34 30 20 20 20 20 20 20 31 38 20 68 61 51940 18 ha |
| 00020 6e 64 6c 65 72 2e 67 6f 3a 37 32 5d 20 5b 52 45 ndler.go:72] [RE |
| 00030 53 54 2d 33 33 5d 20 53 65 6e 64 69 6e 67 20 72 ST-33] Sending r |
| 00040 65 73 70 6f 6e 73 65 20 34 30 34 2c 20 74 79 70 esponse 404, typ |
| 00050 65 3d 61 70 70 6c 69 63 61 74 69 6f 6e 2f 79 61 e=application/ya |
| 00060 6e 67 2d 64 61 74 61 2b 6a 73 6f 6e 2c 20 64 61 ng-data+json, da |
| 00070 74 61 3d 7b 22 69 65 74 66 2d 72 65 73 74 63 6f ta={"ietf-restco |
| 00080 6e 66 3a 65 72 72 6f 72 73 22 3a 7b 22 65 72 72 nf:errors":{"err |
| 00090 6f 72 22 3a 5b 7b 22 65 72 72 6f 72 2d 74 79 70 or":[{"error-typ |
| 000a0 65 22 3a 22 61 70 70 6c 69 63 61 74 69 6f 6e 22 e":"application" |
| 000b0 2c 22 65 72 72 6f 72 2d 74 61 67 22 3a 22 69 6e ,"error-tag":"in |
| 000c0 76 61 6c 69 64 2d 76 61 6c 75 65 22 2c 22 65 72 valid-value","er |
| 000d0 72 6f 72 2d 6d 65 73 73 61 67 65 22 3a 22 45 6e ror-message":"En |
| 000e0 74 72 79 20 6e 6f 74 20 66 6f 75 6e 64 22 7d 5d try not found"}] |
| 000f0 7d 7d 0a }}. |
[pid 12369] write(2, "I0930 09:47:56.852237 18 ro"..., 106) = 106
| 00000 49 30 39 33 30 20 30 39 3a 34 37 3a 35 36 2e 38 I0930 09:47:56.8 |
| 00010 35 32 32 33 37 20 20 20 20 20 20 31 38 20 72 6f 52237 18 ro |
| 00020 75 74 65 72 2e 67 6f 3a 31 32 38 5d 20 5b 52 45 uter.go:128] [RE |
| 00030 53 54 2d 33 33 5d 20 47 65 74 4f 70 65 6e 63 6f ST-33] GetOpenco |
| 00040 6e 66 69 67 49 6e 74 65 72 66 61 63 65 73 49 6e nfigInterfacesIn |
| 00050 74 65 72 66 61 63 65 73 20 74 6f 6f 6b 20 33 37 terfaces took 37 |
| 00060 2e 31 38 35 34 39 33 6d 73 0a .185493ms. |
The counter table is empty:
root@sonic:~# redis-cli
127.0.0.1:6379> hgetall COUNTERS_PORT_NAME_MAP
(empty array)
So I presume that
sonic-mgmt-common/translib/intf_app.go
Line 717 in ec32690
| ifCountInfo, err := dbCl.GetMapAll(app.portOidCountrTblTs) |
sonic-mgmt-common/translib/db/map.go
Line 70 in ec32690
| if len(v) != 0 { |
I'm running this against a nightly VM image (sonic-vs.img).
Metadata
Metadata
Assignees
Labels
No labels