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

docker: use tini as entrypoint unilaterally #8861

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

wesl-ee
Copy link
Contributor

@wesl-ee wesl-ee commented Jun 16, 2021

Use tini to reap zombies and forward signals to the script. Also start watchfrr.sh directly instead of using sleep 365d in many of the Docker containers.

To build and test:

# centos-8
./docker/centos-8/build.sh
# centos-7
./docker/centos-7/build.sh
# debian
docker build ./docker/debian

# Run with no arguments starts watchfrr.sh as usual
w@kvm-gentoo .../code/frr $ docker run -it frr:centos-8-b7a223b691 
2021/06/16 02:14:56 WATCHFRR: [T83RR-8SM5G] watchfrr 8.1-dev_git788699264657 starting: vty@0
[...]

# PID1 is tini!
w@kvm-gentoo .../code/frr $ docker run -it frr:centos-8-b7a223b691 bash
[root@39cfa2832151 /]# ps 1
  PID TTY      STAT   TIME COMMAND
    1 pts/0    Ss     0:00 /sbin/tini -- bash

I wanted to fix the Alpine build with this PR as there is no LY2 in the Alpine repos but that's proving to be a more-than-trivial task :) it will take more work in the Alpine repository so not really much to do in FRR until that is in their package repo

Closes: #8788

tini is a hyper-minimal PID 0 which spawns a child process (watchfrr.sh
in our case), reaps zombies and forwards signals to the script. Starting
watchfrr.sh directly instead of through the old `tail /dev/null` or
`sleep 365d` helps keep things clean too :)

While tini was previously only used in the Alpine container it is useful
to apply this PID 0 to all containers except the special CI ones.

Fixes: FRRouting#8788
Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 16, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/8861 7266ad4
Date 06/15/2021
Start 22:40:44
Finish 23:06:13
Run-Time 25:29
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-06-15-22:40:44.txt
Log autoscript-2021-06-15-22:41:57.log.bz2
Memory 514 480 430

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 16, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-19636/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topotests Ubuntu 18.04 arm8 part 9: Failed (click for details) Topotests Ubuntu 18.04 arm8 part 9: No useful log found
Successful on other platforms/tests
  • Addresssanitizer topotests part 3
  • Topotests Ubuntu 18.04 i386 part 5
  • Addresssanitizer topotests part 1
  • IPv6 protocols on Ubuntu 18.04
  • Topotests debian 10 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 5
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 4
  • IPv4 protocols on Ubuntu 18.04
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests Ubuntu 18.04 arm8 part 1
  • Addresssanitizer topotests part 6
  • Topotests debian 10 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 2
  • Debian 10 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 7
  • Ubuntu 20.04 deb pkg check
  • IPv4 ldp protocol on Ubuntu 18.04
  • Debian 9 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 4
  • Topotests Ubuntu 18.04 i386 part 0
  • Topotests debian 10 amd64 part 9
  • CentOS 7 rpm pkg check
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 9
  • Addresssanitizer topotests part 2
  • Fedora 29 rpm pkg check
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests debian 10 amd64 part 5
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests debian 10 amd64 part 1
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests Ubuntu 18.04 arm8 part 7
  • Addresssanitizer topotests part 9
  • Addresssanitizer topotests part 4
  • Topotests debian 10 amd64 part 6
  • Ubuntu 16.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 0
  • Addresssanitizer topotests part 5
  • Topotests Ubuntu 18.04 amd64 part 2
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 i386 part 6
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests debian 10 amd64 part 2
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 0
  • Addresssanitizer topotests part 0
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests debian 10 amd64 part 4
  • Topotests Ubuntu 18.04 amd64 part 1
  • Topotests debian 10 amd64 part 3
  • Static analyzer (clang)
  • Ubuntu 18.04 deb pkg check

@wesl-ee
Copy link
Contributor Author

wesl-ee commented Jun 16, 2021

ci:rerun

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-19651/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@Frankkkkk
Copy link
Contributor

Looks good to me 👍 Thanks !

@mjstapp mjstapp merged commit 95209a7 into FRRouting:master Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerfile: missing "real" init process
6 participants