Skip to content

Commit 7137a68

Browse files
authored
fix: cap CI devbox hostname (#23591)
Running ci.sh grind was failing with `sethostname: invalid argument`. Codex attributed the failure to a long branch name, causing a long instance name, which was too long for `sethostname`. Confirmed that switching to a shorter branch name fixed the issue. ``` --- request build instance (SSH) --- Requesting m6a.48xlarge spot instance (name: spl_fix-web3signer-pipelining-test_amd64_grind-test-cdfb13e6637062de) (type: m6a.48xlarge) (ami: ami-067627aa971a1dcbb) (bid: 8.3136)... Waiting for instance id for spot request: sir-dvtzjepj... Timeout waiting for spot request. Requesting m6a.48xlarge on-demand instance (name: spl_fix-web3signer-pipelining-test_amd64_grind-test-cdfb13e6637062de) (type: m6a.48xlarge) (ami: ami-067627aa971a1dcbb) (bid: 8.3136)... Instance id: i-0fd2be01d28ec47e5 Waiting for SSH at 13.58.96.227... --- connect via SSH --- Stdout is not a tty, running in background... Host processes pinned to OS CPUs: 88-95,184-191 HOST: fetching EC2 metadata token... HOST: metadata token acquired. HOST: decoding credentials... HOST: starting devbox container... HOST: devbox container launched (pid=10513). Monitoring for spot termination... HOST: preparing devbox (uid/gid, docker run)... docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: sethostname: invalid argument ```
1 parent 740b7e7 commit 7137a68

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ci3/bootstrap_ec2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ else
8383
fi
8484

8585
[ -n "${INSTANCE_POSTFIX:-}" ] && instance_name+="_$INSTANCE_POSTFIX"
86+
docker_hostname=$(echo -n "$instance_name" | tr '_' '-' | cut -c 1-63)
8687

8788
if [ "$use_ssh" -eq 1 ]; then
8889
echo_header "request build instance (SSH)"
@@ -298,7 +299,7 @@ start_build() {
298299
299300
docker run --privileged --rm \${docker_args:-} \
300301
--name aztec_build \
301-
--hostname $instance_name \
302+
--hostname $docker_hostname \
302303
-v bootstrap_ci_local_docker:/var/lib/docker \
303304
-v bootstrap_ci_repo:/home/aztec-dev/aztec-packages \
304305
-v \$HOME/.ssh:/home/aztec-dev/.ssh:ro \

0 commit comments

Comments
 (0)