1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-15 11:22:43 +03:00

Fail on Init Action Failure

* If an init action fails, tiny-cloud should terminate instead of proceeding.
* Also, if bootstrap is incomplete, always re/load user-data, even if user-data file exists.
This commit is contained in:
Jake Buchholz Göktürk 2023-09-25 18:09:44 +00:00
parent e628e9817d
commit 79e770a8fc
4 changed files with 14 additions and 6 deletions

View File

@ -1,9 +1,13 @@
# CHANGELOG
## UNRELEASED - Tiny Cloud v3.0.x
## 2023-09-25 - Tiny Cloud v3.0.2
* Replace non-functioning `tiny-cloud --setup` with working `--enable` and
`--disable` to enable/disable the set of Tiny Cloud init scripts.
* Reload user-data if bootstrap is incomplete, even if previous user-data file
exists.
* Init actions that fail sould cause the `tiny-cloud` to also terminate with an
error.
## 2023-06-12 - Tiny Cloud v3.0.1

View File

@ -21,6 +21,11 @@
* Feature parity with current [amazon-ec2-net-utils](
https://github.com/amazonlinux/amazon-ec2-net-utils)
* Support for non-AWS clouds
* daemonize to pick up IMDS network changes between reboots
* Daemonize to pick up IMDS network changes between reboots
* ***OR DEPRECATE AND NOT INSTALL FOR AWS BY DEFAULT***
* `dhcpcd` seems to work just fine with multiple IPv6 delivered via DHCPv6
* secondary IPv4 on an interface may be an edge case
* probably want to keep the `vnic-eth-hotplug` portion around for adding
and removing VNICs
* Support LVM partitioning and non-`ext[234]` filesystems

View File

@ -200,10 +200,6 @@ init__enable_sshd() {
init__save_userdata() {
local userdata="$TINY_CLOUD_VAR/user-data"
if [ -f "$userdata" ]; then
log -i -t "$phase" info "$ACTION: user-data already saved"
return
fi
local tmpfile=$(mktemp "$userdata.XXXXXX")
imds -e @userdata > "$tmpfile"

View File

@ -131,4 +131,7 @@ for ACTION in $INIT_ACTIONS; do
fi
printf ' ++ ' >&2
log -i -t "$phase" "$LEVEL" "$ACTION: $RESULT"
if [ "$RESULT" = "failed" ]; then
exit 1
fi
done