[Bug 1171866] [NEW] lxc-stop ignores invalid container names

Serge Hallyn 1171866 at bugs.launchpad.net
Tue Apr 23 15:15:45 UTC 2013


Thanks for reporting this bug.  Unfortunately it's more complicated
than this and I'm not sure waht you want is possible.  It would be
if everything were simple system containers, however you can also
lxc-start and lxc-execute things with / as rootfs and custom
config files - meaning there is no real way to say "the container does
not exist".  At the same time, we don't want lxc-stop of a stopped
container to fail.  Put another way, 'STOPPED' simply means "none of
the other (RUNNING|FREEZING|FROZEN) states.

So I'm not sure there is a good way to define the condition under
which we should return failure.

I'm marking this invalid (as by the definition above this isn't really a
bug), but we can certainly keep discussing this to figure out if there
is a solution.

Oh, one thing we could do is write a lxc-p-stop or something to indicate
'permanent' or 'system' container, using the API which woudl simply do

	c = lxc_container_new(lxc_name, lxc_path);
	if (c && !c->is_defined(c)) {
		fprintf(stderr, "container %s does not exist\n",
		lxc_name);
		return -1;
	}

But for lxc-stop I think that behavior would be wrong.

 status: invalid


** Changed in: lxc (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1171866

Title:
  lxc-stop ignores invalid container names

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1171866/+subscriptions



More information about the Ubuntu-server-bugs mailing list