mirror of
https://github.com/hanzoai/s3-csi.git
synced 2026-09-30 23:52:32 +00:00
* fix(docker): clone the fork that exists, at a commit that exists
The s3-mount image has never built. A global rename turned the upstream
seaweedfs reference into `github.com/s3/s3`, which is not a repository, so the
build died on `git clone ... exit code 128` before compiling anything.
Three more things were wrong behind it, each of which would have failed the next
step in turn:
clone github.com/s3/s3 -> github.com/hanzoai/s3
path /go/src/github.com/s3/s3 -> /go/src/github.com/hanzoai/s3
dir cd weed -> cd s3 (the fork renamed it)
commit 19ce7c0b6fdb -> 6dda4e4d6bca
That commit is the real one. 19ce7c0b6fdb is an UPSTREAM seaweedfs hash and does
not exist in our fork — the API 422s on it — so the checkout could never have
succeeded even with the URL fixed. The ARG stays so a build can still pin.
SEAWEEDFS_COMMIT is renamed S3_COMMIT while we are here; nothing consumed it yet.
* chore: no seaweed, no weed — it is s3
369 occurrences across 33 files, plus nine files whose names carried it. All of
it gone: manifests, helm chart, nomad jobs, workflows, docs and code.
Two of these were not cosmetic.
The driver spawned a binary called "weed":
DefaultWeedBinary = "weed"
Our fork builds it as `s3` — the running filer pod has /usr/bin/s3 and no weed
at all — so every mount would have failed with an executable that is not there,
however well the image built.
And the crash-recovery integration test killed processes matching `pgrep -x
weed`. Nothing is named that any more, so it would have found no pids, killed
nothing, and passed while testing exactly nothing. It now matches `s3`. The test
already had a guard that fails when there is nothing to kill, which is the only
reason this would have been noticed at all.
The rest follows the same rename the Dockerfile got: SEAWEEDFS_COMMIT is
S3_COMMIT, and the release/sync workflows that patch that ARG were updated with
it or they would silently stop pinning anything.
No upstream import paths were touched — go.mod depends on github.com/hanzoai/s3,
not on anything upstream, so nothing here was load-bearing for the build.
Verified: go build clean, all three test packages pass.
---------
Co-authored-by: hanzo-dev <[email protected]>
Co-authored-by: Hanzo Dev <[email protected]>
113 lines
2.5 KiB
HCL
113 lines
2.5 KiB
HCL
job "s3-csi-node" {
|
|
datacenters = ["dc1"]
|
|
type = "system"
|
|
priority = 90
|
|
|
|
constraint {
|
|
attribute = "${meta.role}"
|
|
value = "worker"
|
|
}
|
|
|
|
update {
|
|
max_parallel = 1
|
|
stagger = "45s"
|
|
}
|
|
|
|
group "nodes" {
|
|
|
|
# directory to share the s3-mount unix socket between tasks
|
|
volume "s3_mount_socket" {
|
|
type = "host"
|
|
source = "s3_mount_socket"
|
|
read_only = false
|
|
}
|
|
|
|
# host directory where Nomad CSI stage/publish paths live
|
|
volume "nomad_csi_s3" {
|
|
type = "host"
|
|
source = "nomad_csi_s3"
|
|
read_only = false
|
|
}
|
|
|
|
ephemeral_disk {
|
|
migrate = false
|
|
size = 1152
|
|
sticky = false
|
|
}
|
|
|
|
task "mount-service" {
|
|
driver = "docker"
|
|
|
|
volume_mount {
|
|
volume = "s3_mount_socket"
|
|
destination = "/var/lib/s3-mount"
|
|
read_only = false
|
|
}
|
|
|
|
# required for proper propagation of staged mounts into the host filesystem
|
|
volume_mount {
|
|
volume = "nomad_csi_s3"
|
|
destination = "/csi-data"
|
|
read_only = false
|
|
propagation_mode = "bidirectional"
|
|
}
|
|
|
|
config {
|
|
image = "chrislusf/s3-mount:dev"
|
|
network_mode = "host"
|
|
privileged = true
|
|
args = [
|
|
"--endpoint=unix:///var/lib/s3-mount/s3-mount.sock",
|
|
]
|
|
}
|
|
|
|
resources {
|
|
cpu = 200
|
|
memory = 1024
|
|
memory_max = 2048
|
|
}
|
|
}
|
|
|
|
task "plugin" {
|
|
driver = "docker"
|
|
|
|
volume_mount {
|
|
volume = "s3_mount_socket"
|
|
destination = "/var/lib/s3-mount"
|
|
read_only = false
|
|
}
|
|
|
|
config {
|
|
image = "chrislusf/s3-csi-driver:v1.3.9"
|
|
force_pull = true
|
|
network_mode = "host"
|
|
privileged = true
|
|
args = [
|
|
"--endpoint=unix:///csi-sock/csi.sock",
|
|
"--filer=s3-filer.service.consul:8888",
|
|
"--dataCenter=${node.datacenter}",
|
|
"--nodeid=${node.unique.name}",
|
|
"--cacheCapacityMB=1024",
|
|
"--cacheDir=${NOMAD_ALLOC_DIR}/cache_dir",
|
|
"--mountEndpoint=unix:///var/lib/s3-mount/s3-mount.sock",
|
|
"--dataLocality=none",
|
|
"--components=node",
|
|
]
|
|
}
|
|
|
|
csi_plugin {
|
|
id = "s3"
|
|
type = "node"
|
|
mount_dir = "/csi-sock"
|
|
stage_publish_base_dir = "/csi-data/node/s3"
|
|
}
|
|
|
|
resources {
|
|
cpu = 800
|
|
memory = 512
|
|
memory_max = 1024
|
|
}
|
|
}
|
|
}
|
|
}
|