[lxc-users] Can't start container after lxd/lxc/lxcfs upgrade
lxc => 2.0.0rc4 lxd => 2.0.0rc4 lxcfs => 2.0.0rc6 After the latest upgrade to lxc/lxd tools existing and new containers fail to start, failing on the following stage from the container log: lxc 20160318161829.810 INFO lxc_conf - conf.c:run_script_argv:367 - Executing script '/usr/share/lxcfs/lxc.mount.hook' for container 'testcontainer-20160311-0918', config section 'lxc' lxc 20160318161829.856 ERRORlxc_conf - conf.c:run_buffer:347 - Script exited with status 1 lxc 20160318161829.856 ERRORlxc_conf - conf.c:lxc_setup:3750 - failed to run mount hooks for container 'testcontainer-20160311-0918'. There don't appear to be any logs or debug output from the lxc.mount.hook script that I can see that will help further. LXC, LXD and LXCFS services are reported running by systemd. Any help greatly appreciated! ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] lxcbr0 failed in 14.04 (maybe a network config problem not lxc, need advise)
Still seems like voodoo... but this seems to work... not sure if the network-manager has anything to do with this or not.. but it is really odd that after two or three times with the restarting lxc-net it creates the lxcbr0 and then everything works after that. sudo systemctl stop network-manager Repeat this until it works: sudo systemctl stop lxc-net sudo systemctl start lxc-net ifconfig -a sudo systemctl start network-manager On Sun, Nov 1, 2015 at 9:19 PM, B G <bg85...@gmail.com> wrote: > I have been having similar problems after upgrading to 15.10. I just > completely rebuilt the server and had exactly the same problems. I also > tried uninstalling/re-installing and it didn't work... > > Try this: > > lxd uses lxcbr0 bridge by default. > I've had some trouble with lxc-net under systemd as well. Can you do > ifconfig -a > sudo systemctl stop lxc-net > sudo systemctl start lxc-net > ifconfig -a > and see if lxcbr0 shows up in the second ifconfig output? > > > Found this in this thread: > > https://github.com/lxc/lxd/issues/543 > > > > I also have tried commenting out the dns line from the NetworkManager.conf > file... It seems as if NetworkManager may also cause some conflicts... > > /etc/NetworkManager/NetworkManager.conf > > #dns=dnsmasq > > Then restart NetworkManager > > > > On Sun, Nov 1, 2015 at 8:24 PM, Yonsy Solis <yonsy@gmail.com> wrote: > >> Hi >> >> I am working now with lxc/lxd in 14.04 servers, no problems with this. >> >> The problem is in my desktop machine (14.04 too), after my machine boots, >> i need to restart lxc-net service (sudo restart lxc-net) to have lxcbr0 >> device and work with lxd instances (and launch lxc instances with my user, >> privileged or un-privileged) >> >> i think that is a boot problem but the only related message in >> /var/log/syslog is: >> >> = >> NetworkManager[1736]: (lxcbr0): ignoring bridge not created by >> NetworkManager >> = >> >> i have onlys dnsmasq-base in my workstation, no dnsmasq, so i think that >> is a config problem but i can't find now this, some help is needed >> >> P.D. i uninstall and reinstall lxc, lxd and lxd-client for testing and >> checks, same results. >> >> >> Yonsy Solis >> >> ___ >> lxc-users mailing list >> lxc-users@lists.linuxcontainers.org >> http://lists.linuxcontainers.org/listinfo/lxc-users > > > ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] lxcbr0 failed in 14.04 (maybe a network config problem not lxc, need advise)
I have been having similar problems after upgrading to 15.10. I just completely rebuilt the server and had exactly the same problems. I also tried uninstalling/re-installing and it didn't work... Try this: lxd uses lxcbr0 bridge by default. I've had some trouble with lxc-net under systemd as well. Can you do ifconfig -a sudo systemctl stop lxc-net sudo systemctl start lxc-net ifconfig -a and see if lxcbr0 shows up in the second ifconfig output? Found this in this thread: https://github.com/lxc/lxd/issues/543 I also have tried commenting out the dns line from the NetworkManager.conf file... It seems as if NetworkManager may also cause some conflicts... /etc/NetworkManager/NetworkManager.conf #dns=dnsmasq Then restart NetworkManager On Sun, Nov 1, 2015 at 8:24 PM, Yonsy Soliswrote: > Hi > > I am working now with lxc/lxd in 14.04 servers, no problems with this. > > The problem is in my desktop machine (14.04 too), after my machine boots, > i need to restart lxc-net service (sudo restart lxc-net) to have lxcbr0 > device and work with lxd instances (and launch lxc instances with my user, > privileged or un-privileged) > > i think that is a boot problem but the only related message in > /var/log/syslog is: > > = > NetworkManager[1736]: (lxcbr0): ignoring bridge not created by > NetworkManager > = > > i have onlys dnsmasq-base in my workstation, no dnsmasq, so i think that > is a config problem but i can't find now this, some help is needed > > P.D. i uninstall and reinstall lxc, lxd and lxd-client for testing and > checks, same results. > > > Yonsy Solis > > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Mount Directory or Move Image Location?
I tried your suggested method and I got into permission issues... Ran: $:/# lxc config device add neoped lxdmount1 disk source=/nvme1/lxdmount1 path=/opt Device lxdmount1 added to neoped Then opened a bash session into the container and tried to make a directory... root@LXC_NAME:/# cd opt root@LXC_NAME:/opt# ls root@LXC_NAME:/opt# mkdir lxdmount1 test mkdir: cannot create directory 'lxdmount1': Permission denied mkdir: cannot create directory 'test': Permission denied I still don't understand where or how I need to map the container user to the host user to enable this without completely opening security on the directory... At least I suppose that is why it is failing... On Fri, Oct 30, 2015 at 4:11 PM, B G <bg85...@gmail.com> wrote: > Thanks I will try your later suggestion... Thank you for your quick > replies. > > That said your earlier suggestion seems to have also worked... > > mount --bind /container/rootfs/fastdata1 /nvme/fastdata1 > > I tried the following and it seems to work.. Was thinking about adding > into fstab for perminence.. > > Which way do you recommend? I can switch to the lxc config way... > > Each machine is a single-tenant environment so not so worried about > security isolation of each container. > > > > On Fri, Oct 30, 2015 at 3:14 PM, Serge Hallyn <serge.hal...@ubuntu.com> > wrote: > >> No, wait. I thought you wanted the other directory to be where the >> containers are coming from. >> >> To bind mount the directory into containers, use a 'disk' device >> type. I.e. if the directory is mounted on the host at /mnt/fastdisk, >> and your container is container-name, >> >> lxc config device add container-name fastdisk disk source=/mnt/fastdisk >> path=/opt >> >> Will cause 'fastdisk' to be mounted under /opt in the container. >> >> -serge >> >> Quoting B G (bg85...@gmail.com): >> > Thanks Serge. >> > >> > You suggest to bind mount the underlying directory from the host OS? >> > >> > I suppose that we could do that for the root file system anywhere inside >> > the image file system? >> > >> > E.g. >> > >> > /var/lib/lxd/containers/container-name/rootfs/directory_mount >> > >> > Once I restart the container should be transparent to the container that >> > the underlying file-system has mounted from a different location? >> > >> > That sound right... I was thinking about it in a much more complicated >> way >> > like you would a VDI for a VM. That is better. >> > >> > >> > >> > On Fri, Oct 30, 2015 at 2:23 PM, Serge Hallyn <serge.hal...@ubuntu.com> >> > wrote: >> > >> > > Quoting B G (bg85...@gmail.com): >> > > > I need to jam a ton of data from another drive partition into a >> > > > container... What is the best way to: >> > > > >> > > > 1. Mount a directory from a different drive on the host >> > > > >> > > > or >> > > > >> > > > 2. Change the image location to the alternative drive on the host >> > > > >> > > > I have been searching a ton and can't see the best way to do this. >> I >> > > have >> > > > an NVME partition that I want to use for really fast IO but it is >> not the >> > > > default one the containers are created in... >> > > > >> > > > Appreciate any advice.. >> > > >> > > Are you using lxd or lxc? >> > > >> > > The easiest way is probably to just bind mount the fast directory onto >> > > /var/lib/lxc or /var/lib/lxd. If I'm understanding you right. >> > > >> > > Personally on my laptop I have a little 16G m.2 ssd formatted as btrfs >> > > and mounted onto /var/lib/lxd to give me something like .5-second >> container >> > > creations. >> > > >> > > -serge >> > > ___ >> > > lxc-users mailing list >> > > lxc-users@lists.linuxcontainers.org >> > > http://lists.linuxcontainers.org/listinfo/lxc-users >> >> > ___ >> > lxc-users mailing list >> > lxc-users@lists.linuxcontainers.org >> > http://lists.linuxcontainers.org/listinfo/lxc-users >> >> ___ >> lxc-users mailing list >> lxc-users@lists.linuxcontainers.org >> http://lists.linuxcontainers.org/listinfo/lxc-users >> > > ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Mount Directory or Move Image Location?
BTW - the reason I am looking at mounting directories under the rootfs of the containers is that I have a large slow storage array for big data and a much smaller fast NVME PCI device for fast data processing and I want to use them both in the same container. On Fri, Oct 30, 2015 at 3:04 PM, B G <bg85...@gmail.com> wrote: > > Thanks Serge. > > You suggest to bind mount the underlying directory from the host OS? > > I suppose that we could do that for the root file system anywhere inside > the image file system? > > E.g. > > /var/lib/lxd/containers/container-name/rootfs/directory_mount > > Once I restart the container should be transparent to the container that > the underlying file-system has mounted from a different location? > > That sound right... I was thinking about it in a much more complicated way > like you would a VDI for a VM. That is better. > > > > On Fri, Oct 30, 2015 at 2:23 PM, Serge Hallyn <serge.hal...@ubuntu.com> > wrote: > >> Quoting B G (bg85...@gmail.com): >> > I need to jam a ton of data from another drive partition into a >> > container... What is the best way to: >> > >> > 1. Mount a directory from a different drive on the host >> > >> > or >> > >> > 2. Change the image location to the alternative drive on the host >> > >> > I have been searching a ton and can't see the best way to do this. I >> have >> > an NVME partition that I want to use for really fast IO but it is not >> the >> > default one the containers are created in... >> > >> > Appreciate any advice.. >> >> Are you using lxd or lxc? >> >> The easiest way is probably to just bind mount the fast directory onto >> /var/lib/lxc or /var/lib/lxd. If I'm understanding you right. >> >> Personally on my laptop I have a little 16G m.2 ssd formatted as btrfs >> and mounted onto /var/lib/lxd to give me something like .5-second >> container >> creations. >> >> -serge >> ___ >> lxc-users mailing list >> lxc-users@lists.linuxcontainers.org >> http://lists.linuxcontainers.org/listinfo/lxc-users > > > ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
[lxc-users] Mount Directory or Move Image Location?
I need to jam a ton of data from another drive partition into a container... What is the best way to: 1. Mount a directory from a different drive on the host or 2. Change the image location to the alternative drive on the host I have been searching a ton and can't see the best way to do this. I have an NVME partition that I want to use for really fast IO but it is not the default one the containers are created in... Appreciate any advice.. ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Mount Directory or Move Image Location?
Thanks I will try your later suggestion... Thank you for your quick replies. That said your earlier suggestion seems to have also worked... mount --bind /container/rootfs/fastdata1 /nvme/fastdata1 I tried the following and it seems to work.. Was thinking about adding into fstab for perminence.. Which way do you recommend? I can switch to the lxc config way... Each machine is a single-tenant environment so not so worried about security isolation of each container. On Fri, Oct 30, 2015 at 3:14 PM, Serge Hallyn <serge.hal...@ubuntu.com> wrote: > No, wait. I thought you wanted the other directory to be where the > containers are coming from. > > To bind mount the directory into containers, use a 'disk' device > type. I.e. if the directory is mounted on the host at /mnt/fastdisk, > and your container is container-name, > > lxc config device add container-name fastdisk disk source=/mnt/fastdisk > path=/opt > > Will cause 'fastdisk' to be mounted under /opt in the container. > > -serge > > Quoting B G (bg85...@gmail.com): > > Thanks Serge. > > > > You suggest to bind mount the underlying directory from the host OS? > > > > I suppose that we could do that for the root file system anywhere inside > > the image file system? > > > > E.g. > > > > /var/lib/lxd/containers/container-name/rootfs/directory_mount > > > > Once I restart the container should be transparent to the container that > > the underlying file-system has mounted from a different location? > > > > That sound right... I was thinking about it in a much more complicated > way > > like you would a VDI for a VM. That is better. > > > > > > > > On Fri, Oct 30, 2015 at 2:23 PM, Serge Hallyn <serge.hal...@ubuntu.com> > > wrote: > > > > > Quoting B G (bg85...@gmail.com): > > > > I need to jam a ton of data from another drive partition into a > > > > container... What is the best way to: > > > > > > > > 1. Mount a directory from a different drive on the host > > > > > > > > or > > > > > > > > 2. Change the image location to the alternative drive on the host > > > > > > > > I have been searching a ton and can't see the best way to do this. I > > > have > > > > an NVME partition that I want to use for really fast IO but it is > not the > > > > default one the containers are created in... > > > > > > > > Appreciate any advice.. > > > > > > Are you using lxd or lxc? > > > > > > The easiest way is probably to just bind mount the fast directory onto > > > /var/lib/lxc or /var/lib/lxd. If I'm understanding you right. > > > > > > Personally on my laptop I have a little 16G m.2 ssd formatted as btrfs > > > and mounted onto /var/lib/lxd to give me something like .5-second > container > > > creations. > > > > > > -serge > > > ___ > > > lxc-users mailing list > > > lxc-users@lists.linuxcontainers.org > > > http://lists.linuxcontainers.org/listinfo/lxc-users > > > ___ > > lxc-users mailing list > > lxc-users@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users > ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Mount Directory or Move Image Location?
Thanks Serge. You suggest to bind mount the underlying directory from the host OS? I suppose that we could do that for the root file system anywhere inside the image file system? E.g. /var/lib/lxd/containers/container-name/rootfs/directory_mount Once I restart the container should be transparent to the container that the underlying file-system has mounted from a different location? That sound right... I was thinking about it in a much more complicated way like you would a VDI for a VM. That is better. On Fri, Oct 30, 2015 at 2:23 PM, Serge Hallyn <serge.hal...@ubuntu.com> wrote: > Quoting B G (bg85...@gmail.com): > > I need to jam a ton of data from another drive partition into a > > container... What is the best way to: > > > > 1. Mount a directory from a different drive on the host > > > > or > > > > 2. Change the image location to the alternative drive on the host > > > > I have been searching a ton and can't see the best way to do this. I > have > > an NVME partition that I want to use for really fast IO but it is not the > > default one the containers are created in... > > > > Appreciate any advice.. > > Are you using lxd or lxc? > > The easiest way is probably to just bind mount the fast directory onto > /var/lib/lxc or /var/lib/lxd. If I'm understanding you right. > > Personally on my laptop I have a little 16G m.2 ssd formatted as btrfs > and mounted onto /var/lib/lxd to give me something like .5-second container > creations. > > -serge > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users