From 789b3a1b1ad88677d949c48013a750f45d635c97 Mon Sep 17 00:00:00 2001 From: Yanks Yoon <37652070+yanksyoon@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:07:26 +0800 Subject: [PATCH] change hostname of the runner to mitigate too long hostname (#352) --- .github/workflows/e2e_test_run.yaml | 2 ++ templates/openstack-userdata.sh.j2 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/e2e_test_run.yaml b/.github/workflows/e2e_test_run.yaml index 1ecc238e1..4eeeccbe1 100644 --- a/.github/workflows/e2e_test_run.yaml +++ b/.github/workflows/e2e_test_run.yaml @@ -36,6 +36,8 @@ jobs: name: End-to-End Test Run runs-on: [self-hosted, linux, "${{ inputs.runner-tag }}"] steps: + - name: Hostname is set to "github-runner" + run: sudo hostnamectl hostname | grep github-runner # Snapd can have some issues in privileged LXD containers without setting # security.nesting=True and this. - name: Fix snap issue in privileged LXD containers diff --git a/templates/openstack-userdata.sh.j2 b/templates/openstack-userdata.sh.j2 index 3f0ff7be6..047a62be1 100644 --- a/templates/openstack-userdata.sh.j2 +++ b/templates/openstack-userdata.sh.j2 @@ -2,6 +2,8 @@ set -e +hostnamectl set-hostname github-runner + # Write .env contents su - ubuntu -c 'cd ~/actions-runner && echo "{{ env_contents }}" > .env'