BUILDBOT: Fix worker setfacl failing on non-owned folders

This commit is contained in:
Le Philousophe committed 2023-07-15 11:25:55 +02:00
1 parent 54a49a396c
commit 6db1de3a8a
1 file changed
+10 -3
+10 -3
View File
@@ -37,14 +37,21 @@ def setup_uid_gid(client, worker_uid, worker_gid):
class DockerWorker(worker.DockerLatentWorker):
@defer.inlineCallbacks
def start_instance(self, build):
print("VOLUMES", self.volumes)
volumes = yield build.render(self.volumes)
print("R VOLUMES", volumes)
for volume_string in (volumes or []):
try:
bind, _ = volume_string.split(":", 1)
bind, dst_mode = volume_string.split(":", 1)
except ValueError:
continue
# Don't try to apply ACLs or create dirs on read-only mounts
# They must have been applied earlier
try:
dst, mode = dst_mode.split(":", 1)
if mode == "ro":
continue
except ValueError:
# No : so no ro
pass
os.makedirs(bind, exist_ok=True)
self.apply_acls(bind)
res = yield super().start_instance(build)