-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | ||
iptables -I DOCKER-USER -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | ||
iptables -I DOCKER-USER -i br1 -o eth0 -j ACCEPT | ||
iptables -A INPUT -i br1 -p udp -m udp --dport 67 -j ACCEPT | ||
|
||
# TODO: create a path and/or zfs pool with a space in it to test if jlmkr.py still works properly when ran from inside | ||
# mkdir -p "/tmp/path with space/jailmaker" | ||
|
||
# TODO: many more test cases and checking if actual output (text, files on disk etc.) is correct instead of just a 0 exit code | ||
|
||
./jlmkr.py create --start examiner --network-bridge=br1 --resolv-conf=bind-host | ||
echo "About to run debug logging in jail" | ||
cat <<EOF > jails/examiner/rootfs/root/debug.sh | ||
for path in /etc/systemd/network* /etc/systemd/resolve* /etc/resolv.conf ; do | ||
echo "✳️ \$path" | ||
[ -d "\$path" ] && ls -la "\$path" || cat "\$path" | ||
echo | ||
done | ||
netstat -n -r | ||
sleep 3 | ||
ip addr | ||
resolvectl query deb.debian.org | ||
EOF | ||
|
||
sleep 5 | ||
./jlmkr.py exec examiner bash /root/debug.sh | ||
|
||
# TODO: test jlmkr.py from inside another working directory, with a relative path to a config file to test if it uses the config file (and doesn't look for it relative to the jlmkr.py file itself) | ||
|
||
./jlmkr.py create --start --config=./templates/docker/config test | ||
./jlmkr.py exec test docker run hello-world |