Skip to content

Commit

Permalink
Merge pull request #82 from simondeziel/join-token
Browse files Browse the repository at this point in the history
Small improvements
  • Loading branch information
tomponline authored Feb 26, 2024
2 parents c97f9f4 + 6e6bd2c commit b04148e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ jobs:
# disable dpkg from calling sync()
echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io
- name: Reclaim some space
- name: Reclaim some space (storage tests only)
if: ${{ startsWith(matrix.test, 'storage') }}
run: |
set -eux
df -h
Expand Down
11 changes: 6 additions & 5 deletions bin/helpers
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ createPowerFlexPool() (

# cleanup: report if the test passed or not and return the appropriate return code.
cleanup() {
# Run any extra cleanup function
if command -v extra_cleanup > /dev/null; then
trap
extra_cleanup
fi

set +e
echo ""
if [ "${FAIL}" = "1" ]; then
Expand All @@ -188,11 +194,6 @@ cleanup() {
exit 1
fi

# Run any extra cleanup function only on success
if command -v extra_cleanup > /dev/null; then
extra_cleanup || true
fi

echo "Test passed"
exit 0
}
Expand Down
2 changes: 1 addition & 1 deletion tests/cluster
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ for i in $(seq "${SIZE}"); do
MEMBER_IP=$(lxc exec "${PREFIX}-$i" -- ip -4 addr show dev eth0 scope global | grep inet | cut -d' ' -f6 | cut -d/ -f1)

# Get a join token
TOKEN="$(lxc exec "${PREFIX}-1" -- lxc cluster add "${PREFIX}-${i}" | tail -n1)"
TOKEN="$(lxc exec "${PREFIX}-1" -- lxc cluster add --quiet "${PREFIX}-${i}")"

lxc exec "${PREFIX}-$i" -- lxd init --preseed << EOF
cluster:
Expand Down

0 comments on commit b04148e

Please sign in to comment.