-
Improvement
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
I prepared an interesting test to analyze the bootstrap phase inside an LXD container to compare the two branch of the macaroni project:
- macaroni/funtoo-minimal: based on openrc that use funtoo script
- macaroni/funtoo-systemd-minimal: based on systemd + systemd-networkd.
I attached the script that setup the directory for the test and run the test locally.
To use a remote node already configured as remote, it's needed just run:
$> lxd-compose a test-bootstrap --render-env "connection=<remote-name>"
PRE: Locally is needed to have the macaroni simplestreams server configured.
See https://www.macaroni.funtoo.org/docs/getting-started/#using-an-lxd-container
Here the result of the test in local and in funtoo ci node:
$ lxd-compose a test-bootstrap Apply project test-bootstrap Searching image: macaroni/funtoo-minimal For image macaroni/funtoo-minimal found fingerprint 6cb1b495a4ff489f93912c211f17bd9273c8c512908135c02cd22fe71d934534 >>> Creating container test-dhcp-openrc... - 🏭 >>> [test-dhcp-openrc] - [started] 💣 >>> [test-dhcp-openrc] - wait=true ; timems=$(date +%s%3N) ; while ${wait} ; do withip=$(ip r list | grep "dev eth0" | wc -l) ; if [ "${withip}" = "0" ] ; then sleep 0.001 ; else wait=false ; fi ; done ; endtimems=$(date +%s%3N) ; ms=$((endtimems-timems)) ; echo "Time to get ip (ms): ${ms}" ; exit 0 - ☕ Time to get ip (ms): 4984 Searching image: macaroni/funtoo-systemd-minimal For image macaroni/funtoo-systemd-minimal found fingerprint 958806a4b4fb5d2fe4bad7494cabf76925cfac5c1f47c6767dc601f292739efc >>> Creating container test-dhcp-systemd... - 🏭 >>> [test-dhcp-systemd] - [started] 💣 >>> [test-dhcp-systemd] - wait=true ; timems=$(date +%s%3N) ; while ${wait} ; do withip=$(ip r list | grep "dev eth0" | wc -l) ; if [ "${withip}" = "0" ] ; then sleep 0.001 ; else wait=false ; fi ; done ; endtimems=$(date +%s%3N) ; ms=$((endtimems-timems)) ; echo "Time to get ip (ms): ${ms}" ; exit 0 - ☕ Time to get ip (ms): 276 All done.
$> lxd-compose a test-bootstrap --render-env "connection=funtoo-ci" Apply project test-bootstrap Searching image: macaroni/funtoo-minimal For image macaroni/funtoo-minimal found fingerprint 6cb1b495a4ff489f93912c211f17bd9273c8c512908135c02cd22fe71d934534 Try to download image 6cb1b495a4ff489f93912c211f17bd9273c8c512908135c02cd22fe71d934534 from remote macaroni... >>> Creating container test-dhcp-openrc... - 🏭 >>> [test-dhcp-openrc] - [started] 💣 >>> [test-dhcp-openrc] - wait=true ; timems=$(date +%s%3N) ; while ${wait} ; do withip=$(ip r list | grep "dev eth0" | wc -l) ; if [ "${withip}" = "0" ] ; then sleep 0.001 ; else wait=false ; fi ; done ; endtimems=$(date +%s%3N) ; ms=$((endtimems-timems)) ; echo "Time to get ip (ms): ${ms}" ; if [ -z "${skippoweroff}" ] ; then poweroff ; fi - ☕ Time to get ip (ms): 3085 Searching image: macaroni/funtoo-systemd-minimal For image macaroni/funtoo-systemd-minimal found fingerprint 958806a4b4fb5d2fe4bad7494cabf76925cfac5c1f47c6767dc601f292739efc >>> Creating container test-dhcp-systemd... - 🏭 >>> [test-dhcp-systemd] - [started] 💣 >>> [test-dhcp-systemd] - wait=true ; timems=$(date +%s%3N) ; while ${wait} ; do withip=$(ip r list | grep "dev eth0" | wc -l) ; if [ "${withip}" = "0" ] ; then sleep 0.001 ; else wait=false ; fi ; done ; endtimems=$(date +%s%3N) ; ms=$((endtimems-timems)) ; echo "Time to get ip (ms): ${ms}" ; if [ -z "${skippoweroff}" ] ; then poweroff ; fi - ☕ Time to get ip (ms): 5 All done.