[PRODENG-3588] Restore SLES 12 worker in TestLegacyCluster - #649
Open
james-nesbitt wants to merge 1 commit into
Open
[PRODENG-3588] Restore SLES 12 worker in TestLegacyCluster#649james-nesbitt wants to merge 1 commit into
james-nesbitt wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes
LinuxConfigurer.LocalAddresses()so it no longer hard-fails on SLES 12 SP5, and re-adds theWrkSles12worker toTestLegacyCluster.Why
hostname --all-ip-addressesis a GNU net-tools extension. SLES 12 SP5's olderhostnamedoesn't support it and exits status 4, which theValidate Hostsphase 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 parsingip -4 -o addr show scope globalwhenhostname --all-ip-addressesfails.strings.Split->strings.Fieldson the hostname path (a trailing space was producing a spurious empty address)."WrkSles12": test.Platforms["Sles12"].GetWorker()toTestLegacyCluster.Testing
TestLocalAddresses_Hostname,TestLocalAddresses_IPFallback,TestLocalAddresses_BothFail- all pass.go build ./...,go vet ./...,go test -short ./pkg/...all clean.smoke-legacyCI 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, owner013907871322, us-east-1).Links
Checklist
Written by AI: claude-opus-4-8