Commit 80bcb053 by Serge Hallyn Committed by Stéphane Graber

lxc-commands: add a comment explaining CMD_* rules

We wish to ensure that, henceforth, newer lxc tools are always compatible with older lxc monitors. Add a comment to commands.c to explain the rule we wish to enforce to this end. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 0f081315
...@@ -59,6 +59,16 @@ ...@@ -59,6 +59,16 @@
* Each command is wrapped in a ancillary message in order to pass * Each command is wrapped in a ancillary message in order to pass
* a credential making possible to the server to check if the client * a credential making possible to the server to check if the client
* is allowed to ask for this command or not. * is allowed to ask for this command or not.
*
* IMPORTANTLY: Note that semantics for current commands are fixed. If you
* wish to make any changes to how, say, LXC_CMD_GET_CONFIG_ITEM works by
* adding information to the end of cmd.data, then you must introduce a new
* LXC_CMD_GET_CONFIG_ITEM_V2 define with a new number. You may wish to
* also mark LXC_CMD_GET_CONFIG_ITEM deprecated in commands.h.
*
* This is necessary in order to avoid having a newly compiled lxc command
* communicating with a running (old) monitor from crashing the running
* container.
*/ */
lxc_log_define(lxc_commands, lxc); lxc_log_define(lxc_commands, lxc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment