Skip to content

Fix ca-certificates duplicate declaration on elastic nodes#280

Merged
akuzminsky merged 1 commit into
mainfrom
fix-ca-certificates-duplicate-declaration
Jul 4, 2026
Merged

Fix ca-certificates duplicate declaration on elastic nodes#280
akuzminsky merged 1 commit into
mainfrom
fix-ca-certificates-duplicate-declaration

Conversation

@akuzminsky

Copy link
Copy Markdown
Member

Regression

profile::infrahouse_repo (added in #278/#279, included from profile::baseevery node) ensure_packages'd ca-certificates. On elastic_master/elastic_data, profile::elastic::tls also declared Package['ca-certificates'] natively, so the catalog failed:

Duplicate declaration: Package[ca-certificates] is already declared at
infrahouse_repo.pp:25; cannot redeclare at elastic/tls.pp:97

Seen on sandbox elastic_master ip-10-0-2-191. Development never surfaced it because only the jumphost role was exercised there.

Fix

ca-certificates is a fleet-wide TLS dependency, so let base own it:

  • Keep it in profile::infrahouse_repo's ensure_packages (single owner).
  • Drop the native package { 'ca-certificates' } block from profile::elastic::tls; its file resources keep require => Package['ca-certificates'], which now resolves to the base-level declaration (stage-ordered before the elastic files — strictly better ordering).

Behavior-preserving — both were ensure => present. curl/gnupg don't collide (no native declarations; elastic::repo uses gnupg2, a different title).

Applied to dev + sandbox; global picks it up with the Phase 3 promotion.

🤖 Generated with Claude Code

profile::infrahouse_repo (included from profile::base, i.e. every node)
ensure_packages'd ca-certificates. On elastic_master/elastic_data,
profile::elastic::tls also declared Package['ca-certificates'] *natively*,
so the catalog failed with a duplicate declaration (seen on sandbox
elastic_master ip-10-0-2-191). Development never surfaced it because only
the jumphost role was exercised there.

ca-certificates is a fleet-wide TLS dependency, so let base own it:
- Keep it in profile::infrahouse_repo's ensure_packages (single owner).
- Drop the native package block from profile::elastic::tls; its file
  resources keep `require => Package['ca-certificates']`, which now resolves
  to the base-level declaration (stage-ordered before the elastic files).

Behavior-preserving: both declared `ensure => present`. Applied to dev and
sandbox; global picks it up with the Phase 3 promotion.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@akuzminsky akuzminsky merged commit c61655f into main Jul 4, 2026
2 checks passed
@akuzminsky akuzminsky deleted the fix-ca-certificates-duplicate-declaration branch July 4, 2026 02:17
akuzminsky added a commit that referenced this pull request Jul 4, 2026
Move profile::infrahouse_repo (+ converge-infrahouse-keyring.sh) into the
global modules/profile that production uses (no env-local override), and wire
the include into profile::base. Bundle the elastic::tls ca-certificates fix in
the same change so production's elastic nodes never see the duplicate-declaration
state that briefly hit sandbox (see #280).

All four touched files are now byte-identical across global/development/sandbox,
restoring the module-parity invariant from #276.

Validated in development (jumphost + from-zero instance) and sandbox
(elastic_master + jumphost, via SSM): catalog compiles, keyring == published
bundle, source list byte-identical to cloud-init's seed, apt-get update clean.

Note: the live release-noble bundle is still single-key; this class readies the
fleet but the rotation only completes once the upstream new key is published
into the bundle (before 2026-07-20).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants