kata-containers / packaging

Kata Containers version 1.x packaging (for version 2.x see https://github.com/kata-containers/kata-containers).
https://katacontainers.io/
Apache License 2.0
119 stars 92 forks source link

ERROR: Failed to construct requested .config file #1170

Closed magnate3 closed 3 years ago

magnate3 commented 3 years ago

./build-kernel.sh -e setup /opt/gopath/src/github.com/kata-containers/tests /opt/gopath/src/github.com/kata-containers/packaging/kernel /opt/gopath/src/github.com/kata-containers/packaging/kernel INFO: Config version: 89 INFO: Kernel version: kata-v5.6-april-09-2020 INFO: kernel path does not exist, will download kernel % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 168M 0 168M 0 0 28.7M 0 --:--:-- 0:00:05 --:--:-- 25.5M INFO: Applying patch /opt/gopath/src/github.com/kata-containers/packaging/kernel/patches//kata-v5.6-april-09-2020.x/0001-net-virtio_vsock-Fix-race-condition-between-bind-and.patch patching file net/vmw_vsock/virtio_transport_common.c Hunk #1 succeeded at 1151 (offset 103 lines). INFO: Constructing config from fragments: /opt/gopath/src/github.com/kata-containers/packaging/kernel/configs/fragments/arm64/.config INFO: Some CONFIG elements failed to make the final .config: INFO: Value requested for CONFIG_REFCOUNT_FULL not in final .config Value requested for CONFIG_MEMORY_HOTREMOVE not in final .config Value requested for CONFIG_ZONE_DEVICE not in final .config Value requested for CONFIG_DEV_PAGEMAP_OPS not in final .config Value requested for CONFIG_ND_PFN not in final .config Value requested for CONFIG_NVDIMM_PFN not in final .config Value requested for CONFIG_NVDIMM_DAX not in final .config INFO: Generated config file can be found in /opt/gopath/src/github.com/kata-containers/packaging/kernel/configs/fragments/arm64/.config ERROR: Failed to construct requested .config file ERROR: failed to find default config

jodh-intel commented 3 years ago

@magnate3 - This works for me, so it looks like an arm64-specific issue:

$ ./build-kernel.sh -e setup
~/go/src/github.com/kata-containers/tests ~/go/src/github.com/kata-containers/packaging/kernel
~/go/src/github.com/kata-containers/packaging/kernel
versions file (versions-master.yaml) does not exist
Download from https://raw.githubusercontent.com/kata-containers/runtime/master/versions.yaml
INFO: Config version: 89
INFO: Kernel version: kata-v5.6-april-09-2020
INFO: kernel path does not exist, will download kernel
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  168M    0  168M    0     0  2954k      0 --:--:--  0:00:58 --:--:-- 3141k
INFO: Applying patch /home/james/go/src/github.com/kata-containers/packaging/kernel/patches//kata-v5.6-april-09-2020.x/0001-net-virtio_vsock-Fix-race-condition-between-bind-and.patch
patching file net/vmw_vsock/virtio_transport_common.c
Hunk #1 succeeded at 1151 (offset 103 lines).
ls: cannot access '/home/james/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/../common/experimental/*.conf': No such file or directory
INFO: Constructing config from fragments: /home/james/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/.config
INFO: Copying config file from: /home/james/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/.config
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
Kernel source ready: /home/james/go/src/github.com/kata-containers/packaging/kernel/kata-linux-experimental-kata-v5.6-april-09-2020-89
$ echo $?
0

/cc @jongwu

jongwu commented 3 years ago

thanks @jodh-intel @magnate3, I'll fix it.

magnate3 commented 3 years ago

thank you @jongwu . execellent expert

edvgui commented 3 years ago

Hello, any update on this? I got a similar issue on x86_64: (Or at least the error message at the end is the same)

$ ./build-kernel.sh -v 4.15 -b -f setup
INFO: Config version: 91
INFO: Kernel version: 4.15
INFO: kernel path does not exist, will download kernel
INFO: Download kernel checksum file: sha256sums.asc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  440k  100  440k    0     0  1482k      0 --:--:-- --:--:-- --:--:-- 1477k
INFO: Download kernel version 4.15
INFO: Download kernel
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   162  100   162    0     0    993      0 --:--:-- --:--:-- --:--:--   993
100 97.4M  100 97.4M    0     0  3922k      0  0:00:25  0:00:25 --:--:-- 5054k
linux-4.15.tar.xz: OK
INFO: Apply patches from /home/guillaume/go/src/github.com/kata-containers/packaging/kernel/patches//4.15.x
INFO: Patches directory does not exist
ls: cannot access '/home/guillaume/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/../common/experimental/*.conf': No such file or directory
INFO: Constructing config from fragments: /home/guillaume/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/.config
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:773:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  773 |  sprintf(newname, "%s%s", dirname, basename);
      |                   ^~~~~~
scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes
In file included from /usr/include/stdio.h:867,
                 from scripts/kconfig/zconf.tab.c:82:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 1 or more bytes (assuming 4104) into a destination of size 4097
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c:776:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  776 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |                    ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from scripts/kconfig/zconf.tab.c:82:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 4119 bytes into a destination of size 4097
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: Some CONFIG elements failed to make the final .config:
INFO: Value requested for CONFIG_ARCH_SUPPORTS_ACPI not in final .config
Value requested for CONFIG_IKHEADERS not in final .config
Value requested for CONFIG_DEV_PAGEMAP_OPS not in final .config
Value requested for CONFIG_AUTOFS_FS not in final .config
Value requested for CONFIG_VIRTIO_FS not in final .config
Value requested for CONFIG_NETFILTER_FAMILY_ARP not in final .config
Value requested for CONFIG_NETFILTER_NETLINK_OSF not in final .config
Value requested for CONFIG_NETFILTER_CONNCOUNT not in final .config
Value requested for CONFIG_NF_NAT not in final .config
Value requested for CONFIG_NF_NAT_AMANDA not in final .config
Value requested for CONFIG_NF_NAT_FTP not in final .config
Value requested for CONFIG_NF_NAT_IRC not in final .config
Value requested for CONFIG_NF_NAT_SIP not in final .config
Value requested for CONFIG_NF_NAT_TFTP not in final .config
Value requested for CONFIG_NF_NAT_REDIRECT not in final .config
Value requested for CONFIG_NETFILTER_XT_NAT not in final .config
Value requested for CONFIG_NETFILTER_XT_TARGET_NETMAP not in final .config
Value requested for CONFIG_NETFILTER_XT_TARGET_REDIRECT not in final .config
Value requested for CONFIG_IP_VS_FTP not in final .config
Value requested for CONFIG_NF_TPROXY_IPV4 not in final .config
Value requested for CONFIG_NF_NAT_SNMP_BASIC not in final .config
Value requested for CONFIG_NF_NAT_PPTP not in final .config
Value requested for CONFIG_NF_NAT_H323 not in final .config
Value requested for CONFIG_IP_NF_NAT not in final .config
Value requested for CONFIG_IP_NF_TARGET_MASQUERADE not in final .config
Value requested for CONFIG_IP_NF_TARGET_NETMAP not in final .config
Value requested for CONFIG_IP_NF_TARGET_REDIRECT not in final .config
Value requested for CONFIG_IP_NF_TARGET_CLUSTERIP not in final .config
Value requested for CONFIG_NF_DEFRAG_IPV6 not in final .config
Value requested for CONFIG_FAILOVER not in final .config
Value requested for CONFIG_VIRTIO_PMEM not in final .config
Value requested for CONFIG_STACKPROTECTOR not in final .config
Value requested for CONFIG_STACKPROTECTOR_STRONG not in final .config
Value requested for CONFIG_VIRTIO_MENU not in final .config
Value requested for CONFIG_PVH not in final .config
INFO: Generated config file can be found in /home/guillaume/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/.config
ERROR: Failed to construct requested .config file
ERROR: failed to find default config
jongwu commented 3 years ago

Hello @edvgui -, you can try kernel 5.4 as the guest kernel in kata. Since some kernel patches are needed, only one or two specific version of kernel is supported in kata. Currently, it's kernel 5.4. Also you can install guest kernel just try
"install_kata_kernel.sh" under kata-containers/tests/.ci.

edvgui commented 3 years ago

Thank you @jongwu for your response. Unfortunately, the whole point of using this tool for me was to be able to use a specific version of the kernel (4.15). Is this limitation in the available kernel version referenced somewhere that I missed?

jongwu commented 3 years ago

Hi @edvgui -, you can find kernel version info at version

fidencio commented 3 years ago

This issue is being automatically closed as Kata Containers 1.x has now reached EOL (End of Life). This means it is no longer being maintained.

Important:

All users should switch to the latest Kata Containers 2.x release to ensure they are using a maintained release that contains the latest security fixes, performance improvements and new features.

This decision was discussed by the @kata-containers/architecture-committee and has been announced via the Kata Containers mailing list:

If you believe this issue still applies to Kata Containers 2.x, please open an issue against the Kata Containers 2.x repository, pointing to this one, providing details to allow us to migrate it.