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
- Start skydive with Elasticsearch as topology backend
- 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\"}}"
- Restart skydive
- 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