CI/CD: container step seemingly not mounting mounts

Hello

I'm having some difficulty with container steps in Space On-Prem (2023.3) jobs. For example:

    container(image = "alpine:latest") {
       shellScript {
           content = "date"
       }
   }

Produces:

[Bootstrap] Download from Space endpoint pipelines/system/gradle/init-script into `system/gradle/init.gradle`
15:34:03
[Bootstrap] Download from Space endpoint pipelines/system/gradle/init-script into `system/gradle/init.gradle` - Done
15:34:03
[Bootstrap] Download from Space endpoint pipelines/system/gradle/listener into `system/gradle/circlet-gradle-listener.jar`
15:34:03
[Bootstrap] Download from Space endpoint pipelines/system/gradle/listener into `system/gradle/circlet-gradle-listener.jar` - Done
15:34:03
[Bootstrap] Download from Space endpoint pipelines/system/docker/config into `system/docker/config.json`
15:34:03
[Bootstrap] Download from Space endpoint pipelines/system/docker/config into `system/docker/config.json` - Done
15:34:03
[Bootstrap] Setting up permissions in /tmp/jetbrains/space/automation/worker/data/step-4AI8AP4DNSrp/step-data...
15:34:12
/bin/sh: can't open '/mnt/space/system/scripts/shell/24ee470c-699e-4f91-932d-e41aaed5c702': No such file or directory

Using args works except we'd like to run a script from our repo and it looks like /mnt/space is empty so we can't see the repo.

    container(image = "alpine:latest") {
       args("/bin/sh", "-c", "ls", "/mnt/space/")
   }

yields no output from ls:

[Bootstrap] Download from Space endpoint pipelines/system/gradle/init-script into `system/gradle/init.gradle`
15:44:06
[Bootstrap] Download from Space endpoint pipelines/system/gradle/init-script into `system/gradle/init.gradle` - Done
15:44:06
[Bootstrap] Download from Space endpoint pipelines/system/gradle/listener into `system/gradle/circlet-gradle-listener.jar`
15:44:07
[Bootstrap] Download from Space endpoint pipelines/system/gradle/listener into `system/gradle/circlet-gradle-listener.jar` - Done
15:44:07
[Bootstrap] Download from Space endpoint pipelines/system/docker/config into `system/docker/config.json`
15:44:07
[Bootstrap] Download from Space endpoint pipelines/system/docker/config into `system/docker/config.json` - Done
15:44:07
[Bootstrap] Setting up permissions in /tmp/jetbrains/space/automation/worker/data/step-1ZdS6B0Jid69/step-data...

Can someone please beat me with the clue stick here?

Thanks in advance

 

0
2 comments

mount output:

overlay on / type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/V5LGQUZ4UFDRQLHU4SOCDWV6MY:/var/lib/docker/overlay2/l/CB6D7VL62Q6DYLSAM7CTHRV2W5,upperdir=/var/lib/docker/overlay2/fa43941ee3d36d7e0f3213eb2858653352d204e8368e6d96fa2730e369329217/diff,workdir=/var/lib/docker/overlay2/fa43941ee3d36d7e0f3213eb2858653352d204e8368e6d96fa2730e369329217/work)
15:57:33
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
15:57:33
tmpfs on /dev type tmpfs (rw,nosuid,size=65536k,mode=755,inode64)
15:57:33
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
15:57:33
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
15:57:33
cgroup on /sys/fs/cgroup type cgroup2 (ro,nosuid,nodev,noexec,relatime)
15:57:33
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
15:57:33
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k,inode64)
15:57:33
none on /mnt/space type tmpfs (rw,relatime,inode64)
15:57:33
/dev/vdb1 on /etc/resolv.conf type ext4 (rw,relatime,discard,errors=remount-ro)
15:57:33
/dev/vdb1 on /etc/hostname type ext4 (rw,relatime,discard,errors=remount-ro)
15:57:33
/dev/vdb1 on /etc/hosts type ext4 (rw,relatime,discard,errors=remount-ro)

 

0

I think this is due to the container job being nested in the Space container, putting docker-in-docker, and therefore falling into the region of unsupported scenarios. Time to reconsider how we run the workers here.

BTW, this is just because we need git-lfs in Space.

0

Please sign in to leave a comment.