hackerrun 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -6
- package/package.json +1 -1
- package/src/lib/cluster.ts +9 -6
package/dist/index.js
CHANGED
|
@@ -846,18 +846,21 @@ systemctl restart docker
|
|
|
846
846
|
sleep 3
|
|
847
847
|
|
|
848
848
|
# Step 4: Recreate uncloud network with IPv6 enabled
|
|
849
|
+
# Must stop containers first - can't remove network while containers are attached
|
|
849
850
|
CONTAINERS=$(docker ps -aq --filter network=uncloud 2>/dev/null || true)
|
|
850
851
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
852
|
+
if [ -n "$CONTAINERS" ]; then
|
|
853
|
+
echo "Stopping containers on uncloud network..."
|
|
854
|
+
docker stop $CONTAINERS 2>/dev/null || true
|
|
855
|
+
fi
|
|
854
856
|
|
|
855
857
|
docker network rm uncloud 2>/dev/null || true
|
|
856
858
|
docker network create --driver bridge --subnet 10.210.0.0/24 --gateway 10.210.0.1 --ipv6 --subnet fd00:a10:210::/64 --gateway fd00:a10:210::1 uncloud
|
|
857
859
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
860
|
+
if [ -n "$CONTAINERS" ]; then
|
|
861
|
+
echo "Restarting containers..."
|
|
862
|
+
docker start $CONTAINERS 2>/dev/null || true
|
|
863
|
+
fi
|
|
861
864
|
|
|
862
865
|
# Step 5: Start the iptables service
|
|
863
866
|
systemctl start docker-ipv6-nat64
|
package/package.json
CHANGED
package/src/lib/cluster.ts
CHANGED
|
@@ -412,11 +412,13 @@ systemctl restart docker
|
|
|
412
412
|
sleep 3
|
|
413
413
|
|
|
414
414
|
# Step 4: Recreate uncloud network with IPv6 enabled
|
|
415
|
+
# Must stop containers first - can't remove network while containers are attached
|
|
415
416
|
CONTAINERS=$(docker ps -aq --filter network=uncloud 2>/dev/null || true)
|
|
416
417
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
if [ -n "$CONTAINERS" ]; then
|
|
419
|
+
echo "Stopping containers on uncloud network..."
|
|
420
|
+
docker stop $CONTAINERS 2>/dev/null || true
|
|
421
|
+
fi
|
|
420
422
|
|
|
421
423
|
docker network rm uncloud 2>/dev/null || true
|
|
422
424
|
docker network create --driver bridge \
|
|
@@ -424,9 +426,10 @@ docker network create --driver bridge \
|
|
|
424
426
|
--ipv6 --subnet fd00:a10:210::/64 --gateway fd00:a10:210::1 \
|
|
425
427
|
uncloud
|
|
426
428
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
429
|
+
if [ -n "$CONTAINERS" ]; then
|
|
430
|
+
echo "Restarting containers..."
|
|
431
|
+
docker start $CONTAINERS 2>/dev/null || true
|
|
432
|
+
fi
|
|
430
433
|
|
|
431
434
|
# Step 5: Start the iptables service
|
|
432
435
|
systemctl start docker-ipv6-nat64
|