Skip to content

Commit d83652f

Browse files
committed
improve assemble; update base and cloud-filesystem versions; disable quorum stuff by default
1 parent 467f822 commit d83652f

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

g-cloudfs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
make cloud-filesystem && make push-cloud-filesystem
2+
3+
if [ `uname -m` = 'x86_64' ]; then
4+
make assemble-cloud-filesystem
5+
fi

images.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
"icon": "disk-round",
5656
"url": "https://github.com/sagemathinc/cocalc-compute-docker/tree/main/src/cloud-filesystem",
5757
"source": "https://github.com/sagemathinc/cocalc-compute-docker/tree/main/src/cloud-filesystem",
58-
"versions": [{ "tag": "1.16.13", "tested": false }],
58+
"versions": [
59+
{ "tag": "1.16.13", "tested": false },
60+
{ "tag": "1.16.14", "tested": false }
61+
],
5962
"description": "Highly scalable distributed POSIX Cloud File System built using JuiceFS, Google Cloud Storage and KeyDB."
6063
},
6164
"vpn": {
@@ -86,7 +89,8 @@
8689
{ "tag": "1.1", "tested": true },
8790
{ "tag": "1.2", "tested": true },
8891
{ "tag": "1.3", "tested": true },
89-
{ "tag": "1.5.1", "tested": true }
92+
{ "tag": "1.5.1", "tested": true },
93+
{ "tag": "1.5.2", "tested": true }
9094
],
9195
"description": "Base container that many others derive from."
9296
},

src/cloud-filesystem/scripts/cloud_filesystem.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,32 @@
9797
# to close to this parameter.
9898
MAX_DATA_LOSS_S = 60
9999

100-
# do not make this TOO small, e.g., it better be bigger than the typical unmount
101-
# and shutdown time
100+
# do not make this TOO small, e.g., it better be bigger than the
101+
# typical unmount and shutdown time
102102
MAX_REPLICA_LAG_S = max(10, MAX_DATA_LOSS_S - 10)
103103

104-
MAX_LOG_SIZE_MB = 100
104+
# We need more testing with this first.
105+
# Right now it seems to cause juicefs to crash when one node is running
106+
# and we start another and it takes a while to start. That's just
107+
# really annoying, obviously. So for now we turn off this requirement,
108+
# and will implement something at a different level to avoid split brain.
109+
# In most cases we only have a single client at a time for cocalc right now.
110+
QUORUM_ENABLED_BY_DEFAULT = False
111+
112+
# The logfiles can get really big, especially from keydb.
113+
# We trim that periodically to be at most this large.
114+
MAX_LOG_SIZE_MB = 50
105115

106116
# when waiting for new state, we wait at most this
107117
# long to make sure we regularly have a chance to
108118
# do misc maintenance, e.g., mounting unmounted filesystems.
109-
MAX_WAIT_TIME_S = 45
119+
MAX_WAIT_TIME_S = 30
110120

111121
# TODO: This is NOT at all tested or working yet. Just something to work
112122
# on someday.
113123
ENABLE_FLASH = False
114124

125+
115126
###
116127
# Utilities
117128
###
@@ -1112,7 +1123,7 @@ def get_min_replicas_to_write(port):
11121123

11131124

11141125
def get_quorum(filesystem, network):
1115-
enabled = filesystem.get('quorum', True)
1126+
enabled = filesystem.get('quorum', QUORUM_ENABLED_BY_DEFAULT)
11161127
if not enabled:
11171128
# quorum requirement is disabled
11181129
return 1

src/scripts/assemble.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo TAG=$TAG
1818
attempt=0
1919
until docker manifest create $IMAGE:$TAG $IMAGE-x86_64:$ARCH_TAG $IMAGE-arm64:$ARCH_TAG --amend; do
2020
attempt=$((attempt+1))
21-
if [[ $attempt -ge 30 ]]; then
21+
if [[ $attempt -ge 50 ]]; then
2222
echo "Command failed after 30 attempts, exiting..."
2323
exit 1
2424
fi

0 commit comments

Comments
 (0)