mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
support/testing: test_docker_compose: Bump kernel version to last LTS (6.18)
This commit bump the kernel version of this docker test (5.4->6.18), and thus
fixes several issues preventing the Docker Compose runtime test from
succeeding due to this bump:
Kernel Infrastructure:
The Docker daemon failed to start because the 'nat' table could not
be initialized. This was due to missing legacy Netfilter support.
- Enable CONFIG_NETFILTER_XTABLES_LEGACY to support iptables nat table.
- Enable CONFIG_NAMESPACES and CONFIG_USER_NS for container isolation.
- Enable CONFIG_TUN and CONFIG_VETH for container networking.
- Enable CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC for easier debugging.
Build Fixes:
While building the kernel tools, the libelf header was missing because
objtool was not handled correctly for this kernel version. This resulted
in a fatal error: "gelf.h: No such file or directory".
- Select BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y to build host-libelf.
Resources and Stability:
The previous 512MB of RAM was tight for the stack (Kernel +
Docker + Containerd + Python), potentially leading to Out-Of-Memory kills.
Idem for the disk size for Docker images/layers storage.
- Increase QEMU RAM to 1024MB (-m 1024M).
- Increase rootfs size to 1024MB.
- Switch to EXT4 (BR2_TARGET_ROOTFS_EXT2_4=y) for better stability
and modern feature support required by Docker's storage drivers.
Test Script Adjustments:
- Update rootfs path in the test script to point to rootfs.ext4.
Signed-off-by: Dowan Gullient <dowan.gullient@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
64944bcf64
commit
3430d8200e
@@ -1,8 +1,10 @@
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
# CONFIG_CROSS_MEMORY_ATTACH is not set
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
@@ -13,11 +15,10 @@ CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_SMP=y
|
||||
# CONFIG_X86_EXTENDED_PLATFORM is not set
|
||||
CONFIG_MCORE2=y
|
||||
# CONFIG_X86_MCE is not set
|
||||
# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set
|
||||
CONFIG_LEGACY_VSYSCALL_NONE=y
|
||||
@@ -25,10 +26,13 @@ CONFIG_LEGACY_VSYSCALL_NONE=y
|
||||
# CONFIG_ACPI is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
# CONFIG_GCC_PLUGINS is not set
|
||||
CONFIG_BLK_DEV_THROTTLING=y
|
||||
# CONFIG_MQ_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_MQ_IOSCHED_KYBER is not set
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
# CONFIG_SWAP is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
@@ -38,7 +42,9 @@ CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
# CONFIG_IPV6_SIT is not set
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_BRIDGE_NETFILTER=y
|
||||
CONFIG_NF_CONNTRACK=y
|
||||
CONFIG_NETFILTER_XTABLES_LEGACY=y
|
||||
CONFIG_NETFILTER_XT_MARK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
|
||||
@@ -47,17 +53,9 @@ CONFIG_IP_VS=y
|
||||
CONFIG_IP_VS_RR=y
|
||||
CONFIG_IP_VS_NFCT=y
|
||||
CONFIG_IP_NF_IPTABLES=y
|
||||
CONFIG_IP_NF_FILTER=y
|
||||
CONFIG_IP_NF_NAT=y
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=y
|
||||
CONFIG_IP_NF_MANGLE=y
|
||||
CONFIG_IP_NF_RAW=y
|
||||
CONFIG_IP6_NF_IPTABLES=y
|
||||
CONFIG_IP6_NF_FILTER=y
|
||||
CONFIG_IP6_NF_MANGLE=y
|
||||
CONFIG_IP6_NF_RAW=y
|
||||
CONFIG_IP6_NF_NAT=y
|
||||
CONFIG_IP6_NF_TARGET_MASQUERADE=y
|
||||
CONFIG_BRIDGE=y
|
||||
# CONFIG_WIRELESS is not set
|
||||
CONFIG_PCI=y
|
||||
@@ -65,6 +63,7 @@ CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_TUN=y
|
||||
CONFIG_VETH=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
# CONFIG_ETHERNET is not set
|
||||
@@ -73,13 +72,13 @@ CONFIG_VIRTIO_NET=y
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_SERIO is not set
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
# CONFIG_DEVMEM is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
# CONFIG_HW_RANDOM_INTEL is not set
|
||||
# CONFIG_HW_RANDOM_AMD is not set
|
||||
# CONFIG_HW_RANDOM_VIA is not set
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
# CONFIG_DEVMEM is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_RTC_CLASS=y
|
||||
@@ -94,5 +93,4 @@ CONFIG_TMPFS=y
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_SECURITYFS=y
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
CONFIG_UNWINDER_FRAME_POINTER=y
|
||||
|
||||
@@ -17,9 +17,10 @@ class BaseTestDockerCompose(infra.basetest.BRTest):
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="{}"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.296"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.21"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="{}"
|
||||
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_DOCKER=y
|
||||
BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
@@ -27,7 +28,10 @@ class BaseTestDockerCompose(infra.basetest.BRTest):
|
||||
BR2_PACKAGE_DOCKER_COMPOSE=y
|
||||
BR2_PACKAGE_DOCKER_ENGINE=y
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT2_GEN=4
|
||||
BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs"
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="1024M"
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
""".format(
|
||||
infra.filepath("tests/package/copy-sample-script-to-target.sh"),
|
||||
@@ -55,12 +59,12 @@ class BaseTestDockerCompose(infra.basetest.BRTest):
|
||||
|
||||
def do_test(self):
|
||||
kernel = os.path.join(self.builddir, "images", "bzImage")
|
||||
rootfs = os.path.join(self.builddir, "images", "rootfs.ext2")
|
||||
rootfs = os.path.join(self.builddir, "images", "rootfs.ext4")
|
||||
self.emulator.boot(arch="x86_64",
|
||||
kernel=kernel,
|
||||
kernel_cmdline=["root=/dev/vda", "console=ttyS0"],
|
||||
options=["-cpu", "Haswell",
|
||||
"-m", "512M",
|
||||
"-m", "1024M",
|
||||
"-device", "virtio-rng-pci",
|
||||
"-drive", "file={},format=raw,if=virtio".format(rootfs),
|
||||
"-net", "nic,model=virtio",
|
||||
|
||||
Reference in New Issue
Block a user