Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keepalived #65

Merged
merged 14 commits into from
Apr 23, 2024
Merged

Add keepalived #65

merged 14 commits into from
Apr 23, 2024

Conversation

jsalatiel
Copy link
Contributor

Add keepalived sysext
Currently there is no official container for keepalived, so this recipe builds it statically from a github tag.
It requires docker for the building process.


FROM alpine:3.19 as build
ARG VERSION=not_set_force_fail
RUN apk --no-cache add \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we could do here is to put all the commands in a temporary "install" script (bash heredoc writing to ${SYSEXTNAME}/install), and then use docker run -v "${SYSEXTNAME}":/work /work/install to run it and prepare the binary in /work/usr/bin/.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the build process.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, works well now. I also wanted to test arm64 but am hitting the Docker hub API limit even though I just downloaded one image so far…

create_keepalived_sysext.sh Outdated Show resolved Hide resolved
create_keepalived_sysext.sh Outdated Show resolved Hide resolved
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
create_keepalived_sysext.sh Outdated Show resolved Hide resolved
create_keepalived_sysext.sh Outdated Show resolved Hide resolved
create_keepalived_sysext.sh Outdated Show resolved Hide resolved
create_keepalived_sysext.sh Outdated Show resolved Hide resolved
create_keepalived_sysext.sh Outdated Show resolved Hide resolved
jsalatiel and others added 7 commits April 22, 2024 11:41
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
@jsalatiel
Copy link
Contributor Author

The updated version triggers
./create_keepalived_sysext.sh: line 25: ARCH: unbound variable

if  [ "${ARCH}" = "x86-64" ] || [ "${ARCH}" = "x86_64" ]; then

Does an unbound variable still fails inside a IF?

Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
create_keepalived_sysext.sh Outdated Show resolved Hide resolved
@jsalatiel
Copy link
Contributor Author

stat: unrecognized option: format=%u:%g

create_keepalived_sysext.sh Outdated Show resolved Hide resolved
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
@jsalatiel
Copy link
Contributor Author

Working. Tested with create_keepalived_sysext.sh v2.2.8 keepalived

Parallel mksquashfs: Using 20 processors
Creating 4.0 filesystem on keepalived.raw, block size 131072.
[===============================================================================================================================================================================================================================|] 49/49 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
	compressed data, compressed metadata, compressed fragments,
	compressed xattrs, compressed ids
	duplicates are removed
Filesystem size 2279.78 Kbytes (2.23 Mbytes)
	41.43% of uncompressed filesystem size (5502.75 Kbytes)
Inode table size 404 bytes (0.39 Kbytes)
	47.20% of uncompressed inode table size (856 bytes)
Directory table size 275 bytes (0.27 Kbytes)
	49.55% of uncompressed directory table size (555 bytes)
Number of duplicate files found 0
Number of inodes 21
Number of files 7
Number of fragments 1
Number of symbolic links 1
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 13
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
Created keepalived.raw

create_keepalived_sysext.sh Outdated Show resolved Hide resolved
@pothos pothos merged commit 8380278 into flatcar:main Apr 23, 2024
@pothos
Copy link
Member

pothos commented Apr 23, 2024

Tested the arm64 build and it worked, yet quite slow due to the qemu-user translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants