[libvirt] [PATCHv2 6/7] lxc: add virProcessRunInMountNamespace

Eric Blake eblake at redhat.com
Wed Jan 8 19:26:41 UTC 2014


On 01/08/2014 12:10 PM, Guido Günther wrote:
> On Mon, Dec 23, 2013 at 10:55:50PM -0700, Eric Blake wrote:
> [..snip..] 
>> +    if (virAsprintf(&path, "/proc/%llu/ns/mnt", (unsigned long long)pid) < 0)
>> +        goto cleanup;
>> +
>> +    if ((fd = open(path, O_RDONLY)) < 0) {
>> +        virReportSystemError(errno, "%s",
>> +                             _("Kernel does not provide mount namespace"));
>> +        goto cleanup;
>> +    }
> 
> So in case mount namespaces are unavailable we'll fail these operations
> entirely? I think this is the right thing to do but it will break
> distros that have a too old kernel. So shutting down of containers will
> no longer work (as it did before).

We'll fail the attempt to use initctl as the shutdown mechanism, but
should still gracefully fall back to the attempt to use signals (once
this patch is in [1]).  Or, if the user explicitly requested intictl
only, then they WANT to know that initctl didn't work.

[1] https://www.redhat.com/archives/libvir-list/2014-January/msg00277.html

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140108/6892cb38/attachment-0001.sig>


More information about the libvir-list mailing list