skydive-project / skydive

An open source real-time network topology and protocols analyzer

Home Page:https://skydive.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to patch nodes recovered from Elasticsearch backend

adrianlzt opened this issue · comments

If skydive has Elasticsearch configured as backend, with some data stored from a previous run, trying to patch some node returns an error.

How to reproduce

  1. Start skydive with Elasticsearch as topology backend
  2. Create a node
curl 127.0.0.1:8082/api/node -H "Content-Type: application/json" -d "{\"ID\": \"server1\", \"CreatedAt\": $(date +%s%3N), \"UpdatedAt\": $(date +%s%3N), \"Metadata\": {\"Name\": \"foobar\", \"Type\": \"Server\"}}"
  1. Restart skydive
  2. Try to patch the node
➜ curl -H "Content-Type: application/json" -XPATCH localhost:8082/api/node/server1 -d '[{"op": "add", "path": "/Metadata/XXX", "value": "foo"}]'
updating resource with patched version: Unable to update an unkwown node: server1

Confirmed it's fixed on master