New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad relative mount path #78
Comments
Uhm, apparently that's on purpose given the README at /usr/lib/x86_64-linux-gnu/lxc/README. The mount fails though because the target path does not exist. FTR, the error I get is:
And the relevant portions from config:
|
Which path does not exist - /usr/lib/x86_64-linux-gnu/lxc, or /var/log/juju int he container? My guess is that /var/lib/juju doesn't yet exist int he container, so lxc can't mount onto it? |
The message is complaining about the full '/usr/lib/x86_64-linux-gnu/lxc/var/log/juju':
That might well be that it doesn't exist within the rootfs. |
Quoting Sidnei da Silva (notifications@github.com):
In that case this isn't a bug. We may call it a feature request to |
Agreed, closing. |
I met the same problem. And find out it's the source directory that does not exist. In the OP's case |
Note that this feature actually now exists. Add 'create=dir' to the mount options. I.e. lxc.mount.entry = /home/sidnei/.juju/local/log var/log/juju none defaults,bind 0 0 becomes lxc.mount.entry = /home/sidnei/.juju/local/log var/log/juju none defaults,bind,create=dir 0 0 |
What confuses people is just that thing mount error (probably) references the "pivot mount point" that is temporarily used and then exchanged for the real mount point (the thing people have configured). In my case I had just specified a bind mount wrong (in fstab format) and the error was only that 'bind' as a type did not exist ;-). But the error was very cryptic for me until I realized (as per this thread, for me) that it had nothing to do with paths. So the issue is more that the error message is cryptic than anything else. This was on Debian 8 with LXC 1.0.6 so I cannot say about 2.0.5 at this point but I guess the issue could still be relevant here. Regards. |
Note that this is still an issue (lxc 3.0.2 in Ubuntu 18.10): the error message is quite cryptic and suggests that mounting is happening in the worng dir (an ordinary user like myself is probably not aware how mounting is handled behind the screen, and that "pivot mount points" in /usr/lib are involved at al). A simple check to see if the dir/file to be mounted exists, before trying to actually mount it, would probably solve this quite effectively. |
Seems like mount.entry with a relative path has been broken recently. Juju creates an lxc config with an entry like:
However, using latest lxc from the ppa it tries to mount that into:
... instead of relative to rootfs. As such, the container fails to start.
Incidentally, during lxc-create the logs also seem to use that same path. Seems like some option is not being passed around correctly.
The text was updated successfully, but these errors were encountered: