mikma / lxd-openwrt Goto Github PK
View Code? Open in Web Editor NEWScripts for building LXD images from OpenWrt rootfs tarballs.
License: MIT License
Scripts for building LXD images from OpenWrt rootfs tarballs.
License: MIT License
lxd-openwrt =========== Scripts for building LXD images from OpenWrt rootfs tarballs. The OpenWrt SDK is used to build a patched procd package. Requirements ------------ It's recommended you use Debian or Ubuntu on the build system. The following additional packages are required on Ubuntu 18.04: * fakeroot Configuration ------------- Refer to the top of build.sh. Usage ----- ./build.sh [-a|--arch x86_64|i686|aarch64] [-v|--version <version>] [-p|--packages <packages>] [-f|--files] [-t|--type lxd|plain] [-s|--super fakeroot|sudo] [-u|--upgrade] [--help] Example ------- ./build.sh lxc image import bin/openwrt-*-lxd.tar.gz --alias openwrt lxc launch openwrt router lxc exec router passwd root
x-x86_64/build_dir/target-x86_64_musl/libubox-2019-12-28-cd75136b/.autoremove 2>/dev/null >/dev/null
find /vol/git/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64/build_dir/target-x86_64_mus
l/libubox-2019-12-28-cd75136b -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -nam
echo "ubus" >> /vol/git/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64/staging_dir/targe
l/ubus-2019-12-27-041c9d1c -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '
make[2]: Entering directory '/vol/git/lxd-openwrt/dl/procd-openwrt-19.07'
touch /vol/git/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64/build_dir/target-x86_64_mu
sl/procd-2020-01-24-31e4b2df/.prepared_dc975911d1c1dda8cfcd8ca9e8e9320d_18f1e190c5d53547fed41a3eaa76e9e9_check
. /vol/git/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64/include/shell.sh; xzcat /vol/g
it/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64/dl/procd-2020-01-24-31e4b2df.tar.xz |
Applying ./patches/0001-state-support-reboot-of-containers.patch using plaintext:
patching file state.c
Hunk #1 FAILED at 172.
1 out of 1 hunk FAILED -- saving rejects to file state.c.rej
Patch failed! Please fix ./patches/0001-state-support-reboot-of-containers.patch!
make[2]: *** [Makefile:127: /vol/git/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64/buil
d_dir/target-x86_64_musl/procd-2020-01-24-31e4b2df/.prepared_dc975911d1c1dda8cfcd8ca9e8e9320d_18f1e190c5d53547fed41a3e
aa76e9e9] Error 1
make[2]: Leaving directory '/vol/git/lxd-openwrt/dl/procd-openwrt-19.07'
time: package/lxd-procd/compile#0.62#0.45#1.02
make[1]: *** [package/Makefile:113: package/lxd-procd/compile] Error 2
make[1]: Leaving directory '/vol/git/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64'
make: *** [/vol/git/lxd-openwrt/build_dir/openwrt-sdk-19.07.0-x86-64_gcc-7.5.0_musl.Linux-x86_64/include/toplevel.mk:2
20: package/lxd-procd/compile] Error 2
Hello,
I'm using your script to build an LXC container at each new OpenWrt release, and it is still flawless. Question: is it possible to specify multiple values for --packages? If I try a space separated list, it won't accept it.
Fail to build the docker image with the following errors:
Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)
Build dependency: Please install 'unzip'
Build dependency: Please install Python >= 3.5
Build dependency: Please install Python >= 3.5
Build dependency: Please install the 'file' package
Prerequisite check failed. Use FORCE=1 to override.
make: *** [/root/lxd-openwrt/build_dir/openwrt-sdk-x86-64_gcc-7.4.0_musl.Linux-x86_64/include/toplevel.mk:168: staging_dir/host/.prereq-build] Error 1
The command '/bin/sh -c (cd lxd-openwrt && ./build.sh -v snapshot --type plain)' returned a non-zero code: 2
Any idea? Thanks.
./build.sh -a aarch64
……
Configuring iptables-mod-checksum.
Disabling sysfixtime
Disabling sysntpd
Disabling led
Enabling ./etc/init.d/container_init
Pack rootfs
tar: rootfs/usr/share/luci: Read error at byte 0, while reading 60 bytes: Is a directory
tar: Exiting with failure status due to previous errors
Hello,
I just created and installed the latest build (19.07.1) using your build script. All is nice, however, before starting the container, I modified the size of the filesystem to 512M (the default is 120M as I have seen). Not exactly sure this is OpenWrt specific or LXC or Proxmox, but when I log in into OpenWrt-s console I can only see 93M of available / space on the "filesystem". Is there a way to expand this to the maximum specified available for this container?
Thank You!
Hi, I'm trying to reboot the OpenWrt container from inside the container, but it shuts down permanently rather than restart. Rebooting is especially useful with the watchdog plugin, that allows to restart the router when an event happens or just to perform a periodical reboot of the router.
I have tested with an Alpine Linux container and a Debian 9 container and in both cases when I run "reboot now" inside the container, the container reboots and starts again without any issues.
I guess that the init or procd process needs to somehow signal the parent lxc monitor process that it is trying to reboot rather than to shut down (Via ACPI?). Looking at htop when rebooting a Alpine or Debian container, I was able to observe that the whole init process of the container also shuts down, which seems like it is no "hacky soft reboot", but it is the lxc process that properly restarts the container there.
I'm running the container in LXC 3.1.0.
EDIT:
Some potential information: http://man7.org/linux/man-pages/man2/reboot.2.html (Behavior inside PID namespaces)
EDIT 2:
When I kill "procd" with signal SIGBUS the container reboots successfully. Maybe the issue is with the reboot command?
LXC containers work fine, but Docker contains print
ip: RTNETLINK answers: Operation not permitted
which is executed in the preinit scripts (/lib/preinit/10_indicate_preinit). The command ip -4 address flush dev $pi_ifname
actually causes 100% CPU usage.
You got a fix for that?
Thanks for this work. I have built a container image and uploaded it to my personal (public) image server.
I have not yet been able to launch an instance and get an IP on the LAN iface.
I would gladly assist in writing the readme/wiki for a PR with help determining the steps required.
Don't assume LXD is available on the build system. I ran ./build.sh in an Ubuntu 18.04 container (where else?), where there is no LXD daemon. build.sh attempts to import the image with "lxc image import". I don't want to import it in the container, but in the host. Or somewhere else.
Perhaps you can move this part in another script (install.sh or import.sh).
I built the image and it works! Congratulations.
./build.sh -v '18.06.0-rc1' works up until procd is about to be compiled.
make[1] package/lxd-procd/compile
make[2] -C package/toolchain clean-build
make[2] -C package/toolchain compile
make[2] -C /home/me/lxd-openwrt/dl/procd-openwrt-18.06 clean-build
make[2] -C /home/me/lxd-openwrt/dl/procd-openwrt-18.06 compile
make -r package/lxd-procd/compile: build failed. Please re-run make with -j1 V=s to see what's going on
/home/me/lxd-openwrt/build_dir/openwrt-sdk-18.06.0-rc1-x86-64_gcc-7.3.0_musl.Linux-x86_64/include/toplevel.mk:209: recipe for target 'package/lxd-procd/compile' failed
make: *** [package/lxd-procd/compile] Error 1
Building default 17.01.4 and snapshot works.
How can I help you troubleshoot this if needed?
Hi, I've been working on a patch for procd
so the mount removal-patch is no longer required. Before I request these changes upstream, I'd be happy if some more people could test it!
The patch is found here
Hi!
I'm running 18.06.2 in lxd for 3 months now, my only issue is the already open reboot problem (#14).
Is there any way to upgrade to 18.06.4 with keeping the existing configurations?
Hello,
We're building daily openwrt images which use your tool, however around a week ago this has started breaking:
https://jenkins.linuxcontainers.org/job/image-openwrt/architecture=amd64,release=19.07,variant=default/996/console
It looks like a package conflict between openwrt-keyring and base-files with now duplicated files.
It's quite possible that the issue is with upstream openwrt but a workaround would be nice ;)
Unable to build the rootfs.. compilation fails with "recipe for target 'package/lxd-procd/compile' failed". Any all arch have the same issue. Any idea what is wrong here? I have installed all dependencies listed on the README.
Here is an extract of the output of ./build.sh:
...
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/package-metadata.pl
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/fixup-makefile.pl
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/qemustart
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/ipkg-make-index.sh
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/symlink-tree.sh
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/clean-package.sh
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/getver.sh
openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/scripts/mkhash.c
A dl/procd-openwrt-18.06
A dl/procd-openwrt-18.06/Makefile
A dl/procd-openwrt-18.06/files
A dl/procd-openwrt-18.06/files/hotplug-preinit.json
A dl/procd-openwrt-18.06/files/hotplug.json
A dl/procd-openwrt-18.06/files/procd.sh
A dl/procd-openwrt-18.06/files/reload_config
Exported revision 84790.
rm: cannot remove 'build_dir/openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64//package/lxd-procd': No such file or directory
Updating feed 'base' from 'https://git.openwrt.org/openwrt/openwrt.git;v18.06.1' ...
Cloning into './feeds/base'...
remote: Enumerating objects: 7775, done.
remote: Counting objects: 100% (7775/7775), done.
remote: Compressing objects: 100% (6602/6602), done.
remote: Total 7775 (delta 1298), reused 3868 (delta 605)/s
Receiving objects: 100% (7775/7775), 10.05 MiB | 6.37 MiB/s, done.
Resolving deltas: 100% (1298/1298), done.
Note: checking out '70255e3d624cd393612069aae0a859d1acbbeeae'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
Create index file './feeds/base.index'
Collecting package info: done
Collecting target info: done
Collecting package info: done
Collecting target info: done
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'r8169-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'e100-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'bnx2-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'ar3k-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'mwifiex-sdio-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb2', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'edgeport-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb3', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'prism54-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'rtl8192su-firmware', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubusd', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubus', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libjson-script', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubox', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libubox', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libubus', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libubox', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libblobmsg-json', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libubox', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libblobmsg-json', which does not exist
Ignoring feed 'packages' - index missing
Ignoring feed 'luci' - index missing
Ignoring feed 'routing' - index missing
Ignoring feed 'telephony' - index missing
Installing package 'libubox' from base
Installing package 'lua' from base
Installing package 'libjson-c' from base
Collecting package info: done
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'r8169-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'e100-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'bnx2-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'ar3k-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'mwifiex-sdio-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb2', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'edgeport-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb3', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'prism54-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'rtl8192su-firmware', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubusd', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubus', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubox', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'libubus', which does not exist
Ignoring feed 'packages' - index missing
Ignoring feed 'luci' - index missing
Ignoring feed 'routing' - index missing
Ignoring feed 'telephony' - index missing
Installing package 'ubus' from base
Collecting package info: done
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'r8169-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'e100-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'bnx2-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'ar3k-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'mwifiex-sdio-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb2', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'edgeport-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb3', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'prism54-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'rtl8192su-firmware', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubox', which does not exist
tmp/.config-package.in:36:warning: ignoring type redefinition of 'PACKAGE_libc' from 'boolean' to 'tristate'
tmp/.config-package.in:64:warning: ignoring type redefinition of 'PACKAGE_libgcc' from 'boolean' to 'tristate'
tmp/.config-package.in:149:warning: ignoring type redefinition of 'PACKAGE_libpthread' from 'boolean' to 'tristate'
tmp/.config-package.in:177:warning: ignoring type redefinition of 'PACKAGE_librt' from 'boolean' to 'tristate'
tmp/.config-package.in:290:warning: ignoring type redefinition of 'PACKAGE_procd' from 'boolean' to 'tristate'
tmp/.config-package.in:358:warning: ignoring type redefinition of 'PACKAGE_ubus' from 'boolean' to 'tristate'
tmp/.config-package.in:373:warning: ignoring type redefinition of 'PACKAGE_ubusd' from 'boolean' to 'tristate'
tmp/.config-package.in:446:warning: ignoring type redefinition of 'PACKAGE_lua' from 'boolean' to 'tristate'
tmp/.config-package.in:502:warning: ignoring type redefinition of 'PACKAGE_libblobmsg-json' from 'boolean' to 'tristate'
tmp/.config-package.in:516:warning: ignoring type redefinition of 'PACKAGE_libjson-c' from 'boolean' to 'tristate'
tmp/.config-package.in:529:warning: ignoring type redefinition of 'PACKAGE_liblua' from 'boolean' to 'tristate'
tmp/.config-package.in:545:warning: ignoring type redefinition of 'PACKAGE_libubox' from 'boolean' to 'tristate'
tmp/.config-package.in:571:warning: ignoring type redefinition of 'PACKAGE_libubus' from 'boolean' to 'tristate'
tmp/.config-package.in:584:warning: ignoring type redefinition of 'PACKAGE_libubus-lua' from 'boolean' to 'tristate'
tmp/.config-package.in:602:warning: ignoring type redefinition of 'PACKAGE_jshn' from 'boolean' to 'tristate'
tmp/.config-package.in:673:warning: ignoring type redefinition of 'PACKAGE_libjson-script' from 'boolean' to 'tristate'
#
# configuration written to .config
#
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'r8169-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'e100-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'bnx2-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'ar3k-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'mwifiex-sdio-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb2', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'edgeport-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb3', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'prism54-firmware', which does not exist
WARNING: Makefile 'package/linux/Makefile' has a dependency on 'rtl8192su-firmware', which does not exist
WARNING: Makefile 'package/lxd-procd/Makefile' has a dependency on 'ubox', which does not exist
tmp/.config-package.in:36:warning: ignoring type redefinition of 'PACKAGE_libc' from 'boolean' to 'tristate'
tmp/.config-package.in:64:warning: ignoring type redefinition of 'PACKAGE_libgcc' from 'boolean' to 'tristate'
tmp/.config-package.in:149:warning: ignoring type redefinition of 'PACKAGE_libpthread' from 'boolean' to 'tristate'
tmp/.config-package.in:177:warning: ignoring type redefinition of 'PACKAGE_librt' from 'boolean' to 'tristate'
tmp/.config-package.in:290:warning: ignoring type redefinition of 'PACKAGE_procd' from 'boolean' to 'tristate'
tmp/.config-package.in:358:warning: ignoring type redefinition of 'PACKAGE_ubus' from 'boolean' to 'tristate'
tmp/.config-package.in:373:warning: ignoring type redefinition of 'PACKAGE_ubusd' from 'boolean' to 'tristate'
tmp/.config-package.in:446:warning: ignoring type redefinition of 'PACKAGE_lua' from 'boolean' to 'tristate'
tmp/.config-package.in:502:warning: ignoring type redefinition of 'PACKAGE_libblobmsg-json' from 'boolean' to 'tristate'
tmp/.config-package.in:516:warning: ignoring type redefinition of 'PACKAGE_libjson-c' from 'boolean' to 'tristate'
tmp/.config-package.in:529:warning: ignoring type redefinition of 'PACKAGE_liblua' from 'boolean' to 'tristate'
tmp/.config-package.in:545:warning: ignoring type redefinition of 'PACKAGE_libubox' from 'boolean' to 'tristate'
tmp/.config-package.in:571:warning: ignoring type redefinition of 'PACKAGE_libubus' from 'boolean' to 'tristate'
tmp/.config-package.in:584:warning: ignoring type redefinition of 'PACKAGE_libubus-lua' from 'boolean' to 'tristate'
tmp/.config-package.in:602:warning: ignoring type redefinition of 'PACKAGE_jshn' from 'boolean' to 'tristate'
tmp/.config-package.in:673:warning: ignoring type redefinition of 'PACKAGE_libjson-script' from 'boolean' to 'tristate'
#
# configuration written to .config
#
make[1] package/lxd-procd/compile
make[2] -C package/toolchain clean-build
make -r package/lxd-procd/compile: build failed. Please re-run make with -j1 V=s to see what's going on
/home/rkkoszewski/lxd-openwrt/build_dir/openwrt-sdk-18.06.1-x86-64_gcc-7.3.0_musl.Linux-x86_64/include/toplevel.mk:209: recipe for target 'package/lxd-procd/compile' failed
make: *** [package/lxd-procd/compile] Error 1
I have built an OpenWRT 18.06.5 template from this repo, and successfully created a container in Proxmox 6.1. Out of the box, PPPoE does not work, giving an error of "NO_KERNEL_SUPPORT". To fix this, I loaded the pppoe
kernel module on the host, added the corresponding cgroup entry in the config file, and ran mknod /dev/ppp c 108 0
inside the container. This allowed PPPoE to work correctly, but after rebooting, the device file is no longer there, and I have to rerun the mknod
command by hand.
What is the proper way to add this device file automatically on boot? I tried, but haven't found what is responsible for creating device nodes in the container.
I imagine I can simply create a script in /etc/init.d
, but is there a more "official" way?
I created 19.07.0 and 19.07.1 use the script, Neither of their "NAT loopback“ functions work, Then I install offical openwrt 19.07.1 to my PC directly(no lxd), it is works fine.
Doesn't openwrt under lxd support nat loopback? Or is there something wrong with my configuration?
NAT loopback allows to use the external IP inside your local network and still be able to reach the server you want.
I got a global ipv4 address using pppoe in wan. I bind this ip address into a domain name. I hope to use this domain name to access my server on both the local area network and the Internet. Now only other places can do it. Not under the same network as my server.
It would be great if these images could also support LXD virtual machines.
First, I tried compiling OpenWRT 19.07.1 so I changed the version in build.sh. However, the process kept failing with:
(...)
Configuring ppp-mod-pppoe.
Install iptables-mod-checksum
Installing iptables-mod-checksum (1.8.3-1) to root...
Copying dl/packages/x86/64/iptables-mod-checksum_1.8.3-1_x86_64.ipk.
Installing kmod-ipt-checksum (4.14.167-1) to root...
Copying dl/packages/x86/64/kmod-ipt-checksum_4.14.167-1_x86_64.ipk.
Configuring kmod-ipt-checksum.
Configuring iptables-mod-checksum.
Disabling sysfixtime
Disabling sysntpd
/tmp/build.412617/rootfs/lib/functions/procd.sh: line 54:
/tmp/build.412617/rootfs/var/lock/procd_sysntpd.lock: No such file or directory
Then, I switched back to original 19.07.0 of the script, and compile process got further and produced this output:
(...)
Upgrading urngd
Upgrading urngd on root from 2019-06-17-c057e177-1 to 2020-01-21-c7f7b6b6-1...
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/x86_64/base/urngd_2020-01-21-c7f7b6b6-1_x86_64.ipk
Configuring urngd.
Upgrading ppp-mod-pppoe
Upgrading ppp-mod-pppoe on root from 2.4.7.git-2019-05-25-2 to 2.4.7.git-2019-05-25-3...
Copying dl/packages/x86/64/ppp-mod-pppoe_2.4.7.git-2019-05-25-3_x86_64.ipk.
Configuring ppp-mod-pppoe.
Install iptables-mod-checksum
Installing iptables-mod-checksum (1.8.3-1) to root...
Copying dl/packages/x86/64/iptables-mod-checksum_1.8.3-1_x86_64.ipk.
Collected errors:
- opkg_install_pkg: Package iptables-mod-checksum sha256sum mismatch. Either the opkg or the package index are corrupt. Try 'opkg update'.
- opkg_install_cmd: Cannot install package iptables-mod-checksum.
However, I can't find compiled file anywhere.
./build.sh -v 18.06.2
...fails on building procd-lxd
if you run make package/lxd-procd/compile V=s
in sdk-dir you'll see that the patches don't apply:
[ ! -d ./src/ ] || cp -fpR ./src/. /home/mt/lxd-openwrt/build_dir/openwrt-sdk-18.06.2-x86-64_gcc-7.3.0_musl.Linux-x86_64/build_dir/target-x86_64_musl/procd-2018-03-28-dfb68f85
Applying ./patches/0001-lxd-no-mounts.patch using plaintext:
patching file initd/early.c
patching file initd/zram.c
patching file plug/coldplug.c
Applying ./patches/0002-lxd-shutdown-on-SIGPWR.patch using plaintext:
patching file initd/init.c
patching file signal.c
Applying ./patches/0003-docker-fix-problem-stopping-container.patch using plaintext:
patching file state.c
Applying ./patches/001_lxd_no_mounts.patch using plaintext:
patching file initd/early.c
Hunk #1 FAILED at 27.
Hunk #2 FAILED at 56.
2 out of 2 hunks FAILED -- saving rejects to file initd/early.c.rej
patching file initd/zram.c
Hunk #1 FAILED at 116.
1 out of 1 hunk FAILED -- saving rejects to file initd/zram.c.rej
patching file plug/coldplug.c
Hunk #1 FAILED at 43.
1 out of 1 hunk FAILED -- saving rejects to file plug/coldplug.c.rej
Patch failed! Please fix ./patches/001_lxd_no_mounts.patch!
make[2]: *** [Makefile:123: /home/mt/lxd-openwrt/build_dir/openwrt-sdk-18.06.2-x86-64_gcc-7.3.0_musl.Linux-x86_64/build_dir/target-x86_64_musl/procd-2018-03-28-dfb68f85/.prepared_0b00605d5a7934e7037e1118904bf544_18f1e190c5d53547fed41a3eaa76e9e9] Error 1
make[2]: Leaving directory '/home/mt/lxd-openwrt/dl/procd-openwrt-18.06'
time: package/lxd-procd/compile#0.44#0.36#0.74
make[1]: *** [package/Makefile:109: package/lxd-procd/compile] Error 2
make[1]: Leaving directory '/home/mt/lxd-openwrt/build_dir/openwrt-sdk-18.06.2-x86-64_gcc-7.3.0_musl.Linux-x86_64'
make: *** [/home/mt/lxd-openwrt/build_dir/openwrt-sdk-18.06.2-x86-64_gcc-7.3.0_musl.Linux-x86_64/include/toplevel.mk:211: package/lxd-procd/compile] Error 2
Thanks for getting openwrt work with LXD. Very nice!
lxc stop <container>
does not work.
I do not know why. Apparently openwrt wants SIGUSR1 or SIGUSR2 to poweroff. I do not know what LXD sends but LXC sends SIGPWR which openwrt does not understand.
https://git.openwrt.org/?p=project/procd.git;a=blob_plain;f=signal.c;hb=HEAD
https://linuxcontainers.org/lxc/manpages/man1/lxc-stop.1.html
https://clockworkbird9.wordpress.com/2016/09/29/openwrtlede-system-boot-sequence/
http://man7.org/linux/man-pages/man5/lxc.container.conf.5.html
Here is part of lxc config edit <container>
raw.lxc: |-
lxc.signal.halt=SIGUSR2
lxc.signal.reboot=SIGTERM
lxc.init.cmd=/sbin/init
But it does not make a difference. Any ideas?
lxc exec <container> kill -SIGUSR2 1
works.
Hi! I´ve been running Promox 6.x w/ kernel 5.3.13-1-pve trying out openwrt1907-rc2 but something is causing the kernel to throw a warning, please see attached files for more context.
There´s a lot of wildcards in this mix, the "free" and probably a bit more unstable proxmox repo, an openwrt release. As soon as I disabled the LXC openwrt container I no longer got these kernel warnings. The container is unprivileged
Any ideas why may be causing it?
load_kernel_modules_hook.sh.txt
openwrt.common.conf.txt
proxmox container settings.txt
dmesg.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.