Skip to content

[PRODENG-3588] Restore SLES 12 worker in TestLegacyCluster - #649

Open
james-nesbitt wants to merge 1 commit into
mainfrom
PRODENG-3588
Open

[PRODENG-3588] Restore SLES 12 worker in TestLegacyCluster#649
james-nesbitt wants to merge 1 commit into
mainfrom
PRODENG-3588

Conversation

@james-nesbitt

@james-nesbitt james-nesbitt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What

Fixes LinuxConfigurer.LocalAddresses() so it no longer hard-fails on SLES 12 SP5, and re-adds the WrkSles12 worker to TestLegacyCluster.

Why

hostname --all-ip-addresses is a GNU net-tools extension. SLES 12 SP5's older hostname doesn't support it and exits status 4, which the Validate Hosts phase treats as fatal - blocking the MCR/MKE install before it starts. This is why SLES 12 was dropped again after PRODENG-3393 added it.

How

  • LocalAddresses() now falls back to parsing ip -4 -o addr show scope global when hostname --all-ip-addresses fails.
  • Also switched strings.Split -> strings.Fields on the hostname path (a trailing space was producing a spurious empty address).
  • Re-added "WrkSles12": test.Platforms["Sles12"].GetWorker() to TestLegacyCluster.
  • Added unit tests covering the hostname path, the ip(8) fallback path, and the both-fail error path.

Testing

  • Unit tests added: TestLocalAddresses_Hostname, TestLocalAddresses_IPFallback, TestLocalAddresses_BothFail - all pass.
  • go build ./..., go vet ./..., go test -short ./pkg/... all clean.
  • Not yet verified against a live SLES 12 SP5 instance - recommend running the smoke-legacy CI job on this PR before merge to confirm the fix against real hardware (AMI confirmed available: suse-sles-12-sp5-v20260617-hvm-ssd-x86_64, owner 013907871322, us-east-1).

Links

Checklist

  • Tests added
  • Docs updated - N/A, internal configurer fix
  • No debug output or dead code left in

Written by AI: claude-opus-4-8

…esses

LinuxConfigurer.LocalAddresses() ran 'hostname --all-ip-addresses'
unconditionally. SLES 12 SP5's hostname (net-tools, ~2018) does not
support this GNU extension and exits status 4, which ValidateHosts
surfaces as a hard failure before any MCR/MKE install work starts.

Fall back to parsing 'ip -4 -o addr show scope global' when the
hostname command fails. Also switch strings.Split -> strings.Fields
on the hostname path so a trailing space no longer produces an empty
address element.

Re-add the WrkSles12 worker to TestLegacyCluster now that the
Validate Hosts blocker is fixed.

PRODENG-3588
@james-nesbitt james-nesbitt added the smoke-legacy Run legacy smoke test label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

smoke-legacy Run legacy smoke test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant