vpp-agent icon indicating copy to clipboard operation
vpp-agent copied to clipboard

Get values frome kvstore

Open wenchao5211 opened this issue 3 years ago • 5 comments

Hi, i,m a developer, recently I was trying a feature myself, but I was having trouble getting data from the cache. How can I get runtime data from the key?I think I need some help

wenchao5211 avatar Mar 30 '21 06:03 wenchao5211

I try to DumpValuesByKeyPrefix and DumpValuesByKeyPrefix, but it can't works ,

wenchao5211 avatar Mar 30 '21 06:03 wenchao5211

Hi.Those look like REST calls? What did you see? Assuming you have running VPP agent (+ VPP) container?

On official docker image, curl -X GET "http://localhost:9191/scheduler/dump?view=SB&key-prefix=config/vpp/v2/interfaces/" worked for me.

Try agentctl dump.

chrismetz09 avatar Mar 30 '21 15:03 chrismetz09

i want get key-value in vpp-agent, i I created a new one descriptor, this descriptor value don't set to vpp, it only exit in runtime, but, i can't get key-value in other descriptor,How can I get runtime data ? I think I need some help

wenchao5211 avatar Mar 31 '21 02:03 wenchao5211

Let's try the following:

Next, gather info

  • log with debug turned on: docker run -it --rm --name vpp-agent --env INITIAL_LOGLVL=debug -p 5002:5002 -p 9191:9191 --privileged ligato/vpp-agent

chrismetz09 avatar Mar 31 '21 15:03 chrismetz09

You may have misunderstood what I want to express. I want to get the value described by B in the Creat func described by A in the VPP-agent, but when I use DumpValuesByDescriptor or DumpValuesByKeyPrefix, the VPP-agent appears in a state of suspended animation. Now I have two doubts, one is --- graphR := s.graph.read () --- and the other is --- s.txnlock.lock ()---, whether these two func cause the suspended animation of the VPP-agent. When I use the curl -x GET http://localhost:9191/scheduler/dump?. View = SB&key - prefix = config/VPP/v2 / interfaces/" this curl, it is no problem, but when I call in VPP - agent DumpValuesByDescriptor or DumpValuesByKeyPrefix this two func, program is a state of suspended animation。 I wonder whether I get the value of the wrong direction, or I write is the starting point is wrong。

wenchao5211 avatar Apr 01 '21 02:04 wenchao5211