Skip to content

signals: add aix build constraint and SIGVTALRM#2159

Open
AdamTylerLynch wants to merge 1 commit into
hashicorp:mainfrom
AdamTylerLynch:fix/main/aix-signals
Open

signals: add aix build constraint and SIGVTALRM#2159
AdamTylerLynch wants to merge 1 commit into
hashicorp:mainfrom
AdamTylerLynch:fix/main/aix-signals

Conversation

@AdamTylerLynch

Copy link
Copy Markdown

Summary

Adds aix to the build constraint of signals/signals_unix.go and SIGVTALRM to SignalLookup, so the package compiles for GOOS=aix GOARCH=ppc64.

Fixes #2158

Background

GOOS=aix go build ./signals/ currently fails with undefined: SignalLookup. Every signal referenced in the unix lookup map exists on aix/ppc64 with the stock Go toolchain, so the constraint addition is sufficient — no platform-specific file needed. SIGVTALRM is added to the map for AIX workloads that configure it (e.g. as a kill/reload signal).

This patch has been validated by the IBM Power integration team, who have been carrying it as a fork patch for AIX builds of Vault Agent (which vendors consul-template for template rendering); credited as commit co-author.

Testing

  • GOOS=aix GOARCH=ppc64 go build ./signals/ — compiles
  • Native go build / go test ./signals/ — green
  • git diff --check clean; constraint-only change for existing platforms (plus one new map entry available on all of them)

GOOS=aix builds fail with 'undefined: SignalLookup' because
signals_unix.go excludes aix and no aix implementation exists. Every
signal in the unix SignalLookup map is available on aix/ppc64, so adding
the constraint is sufficient. Also adds SIGVTALRM to the lookup map for
AIX workloads that use it.

Validated by the IBM Power integration team in AIX builds of Vault
Agent, which vendors consul-template for template rendering.

Fixes hashicorp#2158

Co-authored-by: Hari G Muralidharan <harimura@in.ibm.com>
@AdamTylerLynch AdamTylerLynch requested review from a team as code owners July 13, 2026 21:32
@AdamTylerLynch

Copy link
Copy Markdown
Author

CI failures are pre-existing flakes, unrelated to this change

The two red jobs (Run test cases (with consul) / (with consul-enterprise)) failed on tests in packages this PR does not touch. This change is scoped to signals/signals_unix.go (a build-constraint addition + one SignalLookup map entry), so it cannot affect dependency or manager behavior.

The actual failures:

1. dependencyTestFileQuery_Fetch/fires_changes (file_test.go:192)

expected: "goodbye"
actual  : ""

A filesystem-watch timing test — the watcher hadn't observed the write yet. Timing flake.

2. managerTestDedup_IsLeader (test-race)

WARNING: DATA RACE
Read at ...  createSession()      dedup.go:188      (goroutine from a prior test still alive)
Previous write ... TestDedup_IsLeader() dedup_test.go:27

A latent, pre-existing race: dedup_test.go:27 writes the package-global sessionCreateRetry, while a goroutine spawned by the earlier TestDedup_StartStop (blocked on time.After(sessionCreateRetry) at dedup.go:188) reads it. The -race flag turns this into a hard failure.

Supporting evidence that these are repo-wide flakes rather than regressions from this PR:

  • Recent ci runs on main and on the unrelated compliance/add-headers branch also show failures on these same jobs.
  • All cross-platform build jobs (including the ones that actually compile the signals package), linters, and Docker builds passed.

A re-run of the two failed jobs should go green. No code change is needed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

signals package does not build on AIX (GOOS=aix)

1 participant