aristanetworks / goarista

Fairly general building blocks used in Arista Go code and open-sourced for the benefit of all.
Apache License 2.0
206 stars 66 forks source link

ockafka running on Arista EOS version 4.23.5M and TerminAttr 1.7.6 throws panic: unknown type *gnmi.TypedValue_BytesVal for value <nil> #60

Closed mcol-arista closed 3 years ago

mcol-arista commented 3 years ago

Running ockafka on a 7150 with static source NAT configured throws the following exception when subscribing to the following path: /Sysdb/ip/nat/status/intfStatus I0521 21:18:44.490292 10738 main.go:37] Connected to Kafka brokers at [10.81.110.68:9092] I0521 21:18:44.490713 10738 main.go:68] Initialized Kafka producer for 127.0.0.1:6042 I0521 21:18:44.497136 10738 producer.go:82] batch: update:{timestamp:1621476850616303724 prefix:{elem:{name:"Sysdb"} elem:{name:"ip"} elem:{name:"nat"} elem:{name:"status"} elem:{name:"_counts"}} update:{path:{elem:{name:"intfStatus"}} val:{uint_val:1}}} I0521 21:18:44.497556 10738 encoder.go:77] kafka: {"DatasetID":"127.0.0.1:6042","Key":"L2ludGZTdGF0dXM=","KeyString":"/intfStatus","Path":"/Sysdb/ip/nat/status/_counts/intfStatus","Timestamp":1621476850616303724,"ValueLong":1} I0521 21:18:44.497583 10738 producer.go:120] Message produced to Kafka: &{nat_entries 127.0.0.1:6042 [123 34 68 97 116 97 115 101 116 73 68 34 58 34 49 50 55 46 48 46 48 46 49 58 54 48 52 50 34 44 34 75 101 121 34 58 34 76 50 108 117 100 71 90 84 100 71 70 48 100 88 77 61 34 44 34 75 101 121 83 116 114 105 110 103 34 58 34 47 105 110 116 102 83 116 97 116 117 115 34 44 34 80 97 116 104 34 58 34 47 83 121 115 100 98 47 105 112 47 110 97 116 47 115 116 97 116 117 115 47 95 99 111 117 110 116 115 47 105 110 116 102 83 116 97 116 117 115 34 44 34 84 105 109 101 115 116 97 109 112 34 58 49 54 50 49 52 55 54 56 53 48 54 49 54 51 48 51 55 50 52 44 34 86 97 108 117 101 76 111 110 103 34 58 49 125] [] {2021-05-19 22:14:10.616303724 -0400 EDT 1} 0 0 0001-01-01 00:00:00 +0000 UTC 0 0 0 0 false} I0521 21:18:44.497772 10738 producer.go:82] batch: update:{timestamp:1621476850616303724 prefix:{elem:{name:"Sysdb"} elem:{name:"ip"} elem:{name:"nat"} elem:{name:"status"} elem:{name:"intfStatus"} elem:{name:"Vlan1000"}} update:{path:{elem:{name:"kernelStatus"}} val:{json_val:"null"}} update:{path:{elem:{name:"fullCone"}} val:{bool_val:false}} update:{path:{elem:{name:"profileId"}} val:{uint_val:0}} update:{path:{elem:{name:"name"}} val:{string_val:"Vlan1000"}}} z

goroutine 14 [running]: github.com/aristanetworks/goarista/kafka/producer.(producer).run(0x90631a0) /home/mike/software/goarista/kafka/producer/producer.go:86 +0x20c created by github.com/aristanetworks/goarista/kafka/producer.(producer).Start /home/mike/software/goarista/kafka/producer/producer.go:71 +0x88

This same binary works when run on EOS 4.21.7M using TerminAttr version 1.5.2

This binary was built from master at the following commit: Ic53da2b1230cf3e88973691b6e1ded1fb0fd5ad2

7AC commented 3 years ago

https://github.com/aristanetworks/goarista/commit/3b1453de752d94967b25bbdd58f6529422ee7cf1 should fix this