Skip to content

OpenShift runner provisioning should complete with one script invocation #8148

Closed

Description

@ggallen

What happens

Provisioning a new OpenShift GitLab runner with hack/gitlab-runner-vm/create-openshift-vm.sh 05 required manual repairs and a temporary script to resume provisioning. The create script should own the entire provisioning workflow.

On a fresh Fedora 44 cloud-image VM, cloud-init failed in package_update_upgrade_install before the script reached setup.sh:

  • The VM template comments out metalink= and enables the stock baseurl=, which points to the placeholder http://download.example/....
  • The enabled fedora-cisco-openh264 repository then has no usable metadata source.
  • The create script exits when cloud-init status --wait reports an error, leaving the VM created but unconfigured.
  • Calling the create script again refuses the existing VM, so fixing the repository settings does not provide a supported way to finish the interrupted invocation.

setup.sh already contains repository repair logic, but it runs after cloud-init has to install packages. It cannot repair this earlier failure.

The operator had to repair repository settings on the VM, rerun the cloud-init package module, and run a temporary copy of the create script starting at registration to finish provisioning.

Expected behavior

With cluster access and the documented provisioning inputs supplied, one invocation of the create script should produce a working runner without manual SSH repairs, configuration copying, or a modified script.

Acceptance criteria:

  • A fresh VM completes cloud-init package installation using usable repositories, including on Fedora 44 cloud images with placeholder base URLs and the optional OpenH264 repository.
  • The script installs and configures the runner, custom executor, OpenShell, CA trust, warm-cache images, and cleanup timer, then verifies the resulting service and registration.
  • The supplied GitLab URL is the sole registration target. A self-hosted-only invocation using a shared runner authentication token produces only that registration; no GitLab.com registration is required.
  • A failed provisioning attempt has a documented, script-driven recovery path that does not require editing the script or duplicating registrations.
  • Regression coverage exercises bootstrap configuration before cloud-init installs packages and the self-hosted/shared-token provisioning path.

Reproduction

  1. Use an authenticated OpenShift cluster with OpenShift Virtualization and the Fedora 44 cloud image available through the template's Fedora DataSource.
  2. Supply the documented namespace, GitLab URL, runner image, and either a runner authentication token or registration credentials.
  3. Run bash hack/gitlab-runner-vm/create-openshift-vm.sh 05 for a previously unused VM number.
  4. Observe the cloud-init package installation failure and the partially provisioned VM left behind.

Context

Observed while adding the fifth OpenShift runner. The intended fleet serves only a self-hosted GitLab instance using a shared runner registration.

The GitLab.com registration created during this session was an operator error, not evidence that the script selects GitLab.com automatically.

A local, staged, uncommitted change to hack/gitlab-runner-vm/vm.yaml repairs the mirror URL and disables the optional OpenH264 repository before package installation. A new vm_test.sh exercises those bootstrap commands against representative repository files. That regression test, the existing setup tests, and make lint pass. These local changes have not been published in a PR and do not yet address the full recovery workflow.

Activity

  1. fullsend-ai-triage commented on Oct 7, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 3:46 PM UTC · Completed 3:48 PM UTC

    Commit: eaa4a5c · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.26

  2. added
    ready-to-code
    on Oct 7, 2026
  3. fullsend-ai-triage commented on Oct 7, 2026

    @fullsend-ai-triage

    Triage notes (net-new context only):

    • No open PR or sub-issue addresses this. Related closed work provides context: the drain-safe delete + --recreate lifecycle, RUNNER_TOKEN mode for the VM scripts, and the earlier GCE cloud-init findings. None of these is a blocker.
    • The staged local change you describe (repo repair in vm.yaml plus a vm_test.sh) is the right first slice but is unpublished, so it will need to be re-created. It covers only the bootstrap criteria. The recovery path, registration verification and README documentation are still needed.
    • The script already has a RUNNER_TOKEN path that skips user-token registration, so the self-hosted/shared-token criterion looks like a regression-test and verification task rather than new logic. This is worth confirming during implementation.
    • Design point for the implementer: the recovery path should be idempotent (detect existing registration/config before re-registering) and should be consistent with the existing drain-safe delete/recreate guidance. A resume mode on the create script and a documented delete + recreate are both reasonable; either must avoid duplicate registrations.
    • Suggested test case:
    Given Fedora 44-style repo files (placeholder baseurl, enabled openh264)
    When the vm.yaml bootstrap commands run before package install
    Then no enabled repo points at the placeholder host and openh264 is disabled
    
    Given RUNNER_TOKEN + GITLAB_URL (self-hosted) with stubbed oc/curl
    When create-openshift-vm.sh runs
    Then exactly one registration targets GITLAB_URL and none targets gitlab.com
    
    Given an existing, unconfigured VM
    When the documented recovery path runs (twice)
    Then provisioning completes and no duplicate registration is created
    

    The fix is confined to hack/gitlab-runner-vm/ shell scripts, vm.yaml and docs, so no CI workflow changes are needed.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  4. fullsend-ai-coder commented on Oct 7, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 3:50 PM UTC · Completed 4:05 PM UTC

    Commit: eaa4a5c · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $4.08

  5. added 4 commits that reference this issue on Oct 7, 2026
  6. added a commit that references this issue on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-to-code

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions