Please find the latest version of these slides at:
t ...t < 2.1config.dataReplies to simple queries:
plj0{
"msg": "{\"type\": 1,
\"rsalt\": \"9aa6ce92-8336-11de-af38-001d093e835f\",
\"protocol\": 1,
\"query\": \"node1.example.com\"}\n",
"salt": "1249637704",
"hmac": "4a4139b2c3c5921f7e439469a0a45ad200aead0f"
}
plj0: fourcc detailing the message content (PLain Json
0)hmac: HMAC signature of salt+msg with the cluster hmac
key
plj0{
"msg": "{\"type\": 1,
\"rsalt\": \"9aa6ce92-8336-11de-af38-001d093e835f\",
\"protocol\": 1,
\"query\": \"node1.example.com\"}\n",
"salt": "1249637704",
"hmac": "4a4139b2c3c5921f7e439469a0a45ad200aead0f"
}
msg: JSON-encoded queryprotocol: ConfD protocol version (=1)type: What to ask for (CONFD_REQ_*
constants)query: additional parametersrsalt: response salt == UUID identifying the
request
plj0{
"msg": "{\"status\": 0,
\"answer\": 0,
\"serial\": 42,
\"protocol\": 1}\n",
"salt": "9aa6ce92-8336-11de-af38-001d093e835f",
"hmac": "aaeccc0dff9328fdf7967cb600b6a80a6a9332af"
}
salt: the rsalt of the queryhmac: hmac signature of salt+msg
plj0{
"msg": "{\"status\": 0,
\"answer\": 0,
\"serial\": 42,
\"protocol\": 1}\n",
"salt": "9aa6ce92-8336-11de-af38-001d093e835f",
"hmac": "aaeccc0dff9328fdf7967cb600b6a80a6a9332af"
}
msg: JSON-encoded answerprotocol: protocol version (=1)status: 0=ok; 1=erroranswer: query-specific replyserial: version of config.dataThe protocol is simple, but clients are simpler
lib/confd/client.pysrc/Ganeti/ConfD/Client.hssrc/Ganeti/ConfD/ClientFunctions.hsbuildResponse function
(src/Ganeti/Confd/Server.hs to reply to it in the
appropriate waydoc/design-2.1.rst