Comments (8)
As it says above, your system appears to be missing <asm/types.h>
configure: error: Missing/unusable kernel header file <asm/types.h>
However, checking the code, the check for that file appears to be superfluous, since the presence of the file defines HAVE_ASM_TYPE_H, but the keepalived code never tests for that definition.
Can you please edit your configure.ac at around line 1168 to change
AC_CHECK_HEADERS([asm/types.h linux/ethtool.h linux/icmpv6.h linux/if_ether.h linux/if_packet.h linux/ip.h linux/sockios.h linux/types.h],
to
AC_CHECK_HEADERS([linux/ethtool.h linux/icmpv6.h linux/if_ether.h linux/if_packet.h linux/ip.h linux/sockios.h linux/types.h],
(i.e. remove asm/types.h
) and try building with that change.
If this fixes your problem, I will push a patch to remove the check for asm/types.h.
from keepalived.
Hi @pqarmitage
I have made changes to configure.ac according to the method you provided, but the problem still remains unsolved.
The error log is as follows:
#0 28.82 checking for syslog.h... yes
#0 28.88 checking for unistd.h... (cached) yes
#0 28.89 checking linux/errqueue.h needs sys/time.h... yes
#0 28.92 checking for linux/ethtool.h... no
#0 28.97 configure: error: Missing/unusable kernel header file <linux/ethtool.h>
------
Dockerfile:19
--------------------
18 | # 3. remove keepalived sources and unnecessary libraries and tools
19 | >>> RUN apk --no-cache add \
20 | >>> binutils \
21 | >>> # file \
22 | >>> # file-dev \
23 | >>> gcc \
24 | >>> # glib \
25 | >>> # glib-dev \
26 | >>> # ipset \
27 | >>> # ipset-dev \
28 | >>> # iptables \
29 | >>> # iptables-dev \
30 | >>> # libmnl-dev \
31 | >>> # libnftnl-dev \
32 | >>> libnl3 \
33 | >>> libnl3-dev \
34 | >>> make \
35 | >>> musl-dev \
36 | >>> # net-snmp-dev \
37 | >>> openssl \
38 | >>> openssl-dev \
39 | >>> # pcre2 \
40 | >>> # pcre2-dev \
41 | >>> autoconf \
42 | >>> automake \
43 | >>> && cd /tmp/keepalived-2.2.8/ \
44 | >>> && ./autogen.sh \
45 | >>> && ./configure \
46 | >>> --disable-dynamic-linking \
47 | >>> --prefix=/usr \
48 | >>> --exec-prefix=/usr \
49 | >>> --bindir=/usr/bin \
50 | >>> --sbindir=/usr/sbin \
51 | >>> --sysconfdir=/etc \
52 | >>> --datadir=/usr/share \
53 | >>> --localstatedir=/var \
54 | >>> --mandir=/usr/share/man \
55 | >>> # --with-dbus-data-dir=/usr/share \
56 | >>> --enable-bfd \
57 | >>> # --enable-dbus \
58 | >>> # --enable-regex \
59 | >>> # --enable-snmp \
60 | >>> # --enable-snmp-rfc \
61 | >>> # --enable-nftables \
62 | >>> --disable-iptables \
63 | >>> # --disable-libipset \
64 | >>> # --enable-json \
65 | >>> && make && make install \
66 | >>> && strip /usr/sbin/keepalived \
67 | >>> && cd - \
68 | >>> && rm -rf /tmp/keepalived-2.2.8 \
69 | >>> && apk --no-cache del \
70 | >>> binutils \
71 | >>> # file-dev \
72 | >>> gcc \
73 | >>> # glib-dev \
74 | >>> # ipset-dev \
75 | >>> # iptables-dev \
76 | >>> # libmnl-dev \
77 | >>> libnl3-dev \
78 | >>> # libnftnl-dev \
79 | >>> make \
80 | >>> musl-dev \
81 | >>> openssl-dev \
82 | >>> # pcre2-dev \
83 | >>> autoconf \
84 | >>> automake
85 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apk --no-cache add \tbinutils \tgcc \tlibnl3 \tlibnl3-dev \tmake \tmusl-dev \topenssl \topenssl-dev \tautoconf \tautomake && cd /tmp/keepalived-2.2.8/ && ./autogen.sh && ./configure \t\t--disable-dynamic-linking \t\t--prefix=/usr \t\t--exec-prefix=/usr \t\t--bindir=/usr/bin \t\t--sbindir=/usr/sbin \t\t--sysconfdir=/etc \t\t--datadir=/usr/share \t\t--localstatedir=/var \t\t--mandir=/usr/share/man \t\t--enable-bfd \t\t--disable-iptables && make && make install && strip /usr/sbin/keepalived && cd - && rm -rf /tmp/keepalived-2.2.8 && apk --no-cache del \tbinutils \tgcc \tlibnl3-dev \tmake \tmusl-dev \topenssl-dev \tautoconf \tautomake" did not complete successfully: exit code: 1
make: *** [docker] Error 1
from keepalived.
You appear not to have the kernel-headers package (or whatever your distro calls the package) installed. Although the check checking linux/errqueue.h needs sys/time.h... yes
appears to imply that linux/errqueue.h is installed, the way the check is done the result of the test will be yes
if linux/errqueue.h is NOT installed. Your tests so far have shown that asm/types.h and linux/ethtool.h are not installed, hence the kernel headers package is not installed, at least not in the place that the build expects to find the headers.
from keepalived.
Following looking at this issue I realised that some kernel header files where checked (in configure) and included at compile time when they weren't needed (i.e. if building without VRRP or IPVS functionality). Commit 6eb9303 tidies that up.
from keepalived.
Hi @pqarmitage
I'm using the Dockerfile to build the image, and I think the problem may be with the base image or the lack of some necessary packages that prevent the successful building of the image. The modifications you made still can't successfully execute "make docker".
from keepalived.
I wouldn't expect the modifications I made to resolve your problem, it was just some tidying up that I noticed could be done.
I notice in the logs you provide that there are 27 packages upgraded/installed. I don't know where it is specified what packages should be installed, but you need to add the kernel-headers package into the list of installed packages.
from keepalived.
@pqarmitage
Here is the generated Dockerfile from Dockerfile.in, which uses alpine as the base image. Do you have any solutions? I've tried downloading kernel-headers using apt, but it didn't solve the issue.
FROM alpine:latest
ARG GIT_VER=
ENV VER=2.2.8
LABEL version=2.2.8${GIT_VER}
LABEL author="Alexandre Cassen <[email protected]>"
LABEL project="https://github.com/acassen/keepalived"
LABEL homepage="https://www.keepalived.org"
# add keepalived sources to /tmp/keepalived-2.2.8
ADD keepalived-2.2.8.tar.gz /tmp
# Add keepalived default script user to make sure their IDs get assigned consistently,
# regardless of whatever dependencies get added
RUN addgroup -S keepalived_script && adduser -D -S -G keepalived_script keepalived_script
# 1. install required libraries and tools
# 2. compile and install keepalived
# 3. remove keepalived sources and unnecessary libraries and tools
RUN apk --no-cache add \
binutils \
# file \
# file-dev \
gcc \
# glib \
# glib-dev \
# ipset \
# ipset-dev \
# iptables \
# iptables-dev \
# libmnl-dev \
# libnftnl-dev \
libnl3 \
libnl3-dev \
make \
musl-dev \
# net-snmp-dev \
openssl \
openssl-dev \
# pcre2 \
# pcre2-dev \
autoconf \
automake \
linux-headers \
&& cd /tmp/keepalived-2.2.8/ \
&& ./autogen.sh \
&& ./configure \
--disable-dynamic-linking \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/share/man \
# --with-dbus-data-dir=/usr/share \
--enable-bfd \
# --enable-dbus \
# --enable-regex \
# --enable-snmp \
# --enable-snmp-rfc \
# --enable-nftables \
--disable-iptables \
# --disable-libipset \
# --enable-json \
&& make && make install \
&& strip /usr/sbin/keepalived \
&& cd - \
&& rm -rf /tmp/keepalived-2.2.8 \
&& apk --no-cache del \
binutils \
# file-dev \
gcc \
# glib-dev \
# ipset-dev \
# iptables-dev \
# libmnl-dev \
libnl3-dev \
# libnftnl-dev \
make \
musl-dev \
openssl-dev \
# pcre2-dev \
autoconf \
automake
ADD docker/keepalived.conf /etc/keepalived/keepalived.conf
# set keepalived as image entrypoint with --dont-fork and --log-console (to make it docker friendly)
# define /etc/keepalived/keepalived.conf as the configuration file to use
ENTRYPOINT ["/usr/sbin/keepalived","--dont-fork","--log-console", "-f","/etc/keepalived/keepalived.conf"]
# example command to customise keepalived daemon:
# CMD ["--log-detail","--dump-conf"]
from keepalived.
Unfortunately I have no experience of using Docker, and next to no experience of Alpine.
A google search for "alpine linux kernel headers package" suggests that the kernel headers package is called linux-headers. It would seem likely that in the apk --no-cache add \
list of packages, and also in the apk --no-cache del
list of packages, you need to add linux-headers
.
from keepalived.
Related Issues (20)
- unable to recover from split brain problem HOT 6
- Configure virtual server only on master but not on backups HOT 6
- v2.2.8: nopreempt is configured, the notify_xxx method will not be triggered. HOT 2
- One-off symlink resolution causes fragile setups on NixOS HOT 6
- Add documentation for notify script option HOT 1
- restart keepalived not work , systemd: Can't open PID file /etc/keepalived/logs/keepalived.pid (yet?) after start: No such file or directory HOT 1
- restart keepalived donot work, Can't open PID file /var/run/keepalived.pid (yet?) after start: No such file or directory HOT 1
- Need to know why both VMs became MASTER instead of a clean failover HOT 6
- Keepalived High Availability Issue: Both Nodes Selected as Master in RHOSP 16.2 Setup HOT 3
- keepalived standby not receiving advertise packets HOT 1
- keepalived can't call notify_master script timely HOT 4
- Last status of misc check sometimes not updated in keepalived_check.data HOT 5
- Do not go to FAULT state when announce link is down HOT 1
- TCP disconnection upon master switchover HOT 3
- SLAVE unknown state HOT 2
- 2.3.0 crashes if using /etc/keepalived/keepalived.conf HOT 5
- Code analysis: Buffer overflow at memcpy v2.2.8 libipvs.c HOT 1
- Code analysis: deref after free in ipwrapper.c HOT 1
- ip_total_len and received length mismatch due to padding HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keepalived.