Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-28 Thread Daniel P. Berrange
On Thu, Aug 28, 2008 at 06:31:31AM -0700, Dan Smith wrote: > DB> I found a couple of other places with missing lxcError() calls. So > DB> here's an updated patch > > Looks good to me. Thanks! Ok, I've finally committed this Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-28 Thread Dan Smith
DB> I found a couple of other places with missing lxcError() calls. So DB> here's an updated patch Looks good to me. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: [EMAIL PROTECTED] pgpCX4VhfZj4e.pgp Description: PGP signature -- Libvir-list mailing list Libvir-l

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-28 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 09:58:58PM +0100, Daniel P. Berrange wrote: > On Wed, Aug 27, 2008 at 01:32:13PM -0700, Dan Smith wrote: > > DB> +static int lxcContainerMountNewFS(virDomainDefPtr vmDef) > > DB> +{ > > DB> +virDomainFSDefPtr tmp; > > DB> +return -1; > > > > Shouldn't this be "

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 27, 2008 at 01:32:13PM -0700, Dan Smith wrote: > DB> +static int lxcContainerMountNewFS(virDomainDefPtr vmDef) > DB> +{ > DB> +virDomainFSDefPtr tmp; > DB> + > DB> +/* Pull in rest of container's mounts */ > DB> +for (tmp = vmDef->fss; tmp; tmp = tmp->next) { > DB> +

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-27 Thread Dan Smith
DB> +static int lxcContainerMountNewFS(virDomainDefPtr vmDef) DB> +{ DB> +virDomainFSDefPtr tmp; DB> + DB> +/* Pull in rest of container's mounts */ DB> +for (tmp = vmDef->fss; tmp; tmp = tmp->next) { DB> +char *src; DB> +if (STREQ(tmp->dst, "/")) DB> +contin

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-27 Thread Daniel P. Berrange
On Wed, Aug 13, 2008 at 10:57:11AM -0700, Dan Smith wrote: [snip huge pile of code] > I'd really like to see this mondo if block broken out into at least an > lxcPivotRoot() function, if not further. This is pretty long and > hairy, IMHO. That is very true. I've re-factored it into a whole bunc

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-13 Thread Dan Smith
DB> +#if 0 DB> +ttyfd = open(argv->ttyPath, O_RDWR|O_NOCTTY); DB> +if (ttyfd < 0) { DB> +lxcError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, DB> + _("open(%s) failed: %s"), argv->ttyPath, strerror(errno)); DB> +return -1; DB> +} DB> +#endif Should this bit be r

Re: [libvirt] PATCH: 4/4: Add pivot_root support to container

2008-08-13 Thread Daniel P. Berrange
This isn't really related to the others, except for the fact that is part of the LXC driver. This is a re-post of the patch I did for adding support for pivot_root() in the container. This allows the entire container FS to be separated from the parent OS. As noted previously this is not currently s