[lxc-users] overlayfs error after upgrade to vivid
Serge Hallyn
serge.hallyn at ubuntu.com
Mon May 4 13:12:55 UTC 2015
Quoting KATOH Yasufumi (karma at jazz.email.ne.jp):
> >>> On Fri, 1 May 2015 17:00:05 +0000
> in message "Re: [lxc-users] overlayfs error after upgrade to vivid"
> Serge Hallyn-san wrote:
>
> > Quoting Serge Hallyn (serge.hallyn at ubuntu.com):
> > > Quoting KATOH Yasufumi (karma at jazz.email.ne.jp):
> > > > >>> On Fri, 1 May 2015 10:15:41 +0000
> > > > in message "Re: [lxc-users] overlayfs error after upgrade to vivid"
> > > > Serge Hallyn-san wrote:
> > > >
> > > > > D'oh. Confirmed. To work around this, please do
> > > >
> > > > > sudo mkdir /var/lib/lxc/ro_nginx/olwork
> > > >
> > > > > lxc should obvoiusly do this on its own. I hadn't noticed because normally
> > > > > lxc-create does it, but you have a preexisting container.
> > > >
> > > > Oh... I had not noticed too...
> > > >
> > > > We should mkdir in overlayfs_mount() if it doesn't exist.
> > >
> > > Yeah, something like
> > >
> > > From 31050b47e9feb0c4bc763c7e7497f4edf694dee5 Mon Sep 17 00:00:00 2001
> > > From: Serge Hallyn <serge.hallyn at ubuntu.com>
> > > Date: Fri, 1 May 2015 14:56:33 +0200
> > > Subject: [PATCH 1/1] overlay: create workdir if it doesn't exist
> > >
> > > Otherwise a container created before we needed workdir will fail
> > > to start after a kernel+lxc update.
> > >
> > > Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
> > > ---
> > > src/lxc/bdev.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c
> > > index cf7c043..873392a 100644
> > > --- a/src/lxc/bdev.c
> > > +++ b/src/lxc/bdev.c
> > > @@ -2210,6 +2210,11 @@ static int overlayfs_mount(struct bdev *bdev)
> > > return -22;
> > > }
> > >
> > > + if (mkdir_p(work, 0755) < 0 && errno != EEXIST) {
> > > + free(mntdata);
> > > + return -22
>
> > Uh, with a ; there of course :)
>
> :-D
>
> It looks good :-) I tried your patch for the overlayfs container
> without workdir on new kernel(that need workdir). It works fine.
>
> Acked-by: KATOH Yasufumi <karma at jazz.email.ne.jp>
Thanks - this thread is a bit of a mess, so I went ahead and pushed
the patch with your ack (rather than lazily wait for Stéphane as I
usually do :)
More information about the lxc-users
mailing list