[lxc-devel] API errors

Serge Hallyn serge.hallyn at ubuntu.com
Fri Oct 4 19:34:21 UTC 2013


Quoting S.Çağlar Onur (caglar at 10ur.org):
> Hi,
> 
> src/lxc/lxccontainer.h contains two public field named error_string and
> error_num. If I'm not missing anything no one seems to be using them.
> 
> What was the intention? Should API calls set those and stop using macros
> like ERROR and SYSERROR?

That is the idea.  It's not yet clear to me how to best track that.
Maybe it should become an array of strings, so that each stack layer
moving up and seeing an error happened can give its own input on what
it was doing.  Then when lxc-start fails, we can see something like

	[0] failed to create container
	[1] failed to setup network
	[2] failed to create veth
	[3] failed to pass veth into network namespce

And then yes, ERROR and SYSERROR should be reserved for the actual
programs, and should spit out error stacks as well.

-serge




More information about the lxc-devel mailing list