cem_acpt 0.12.2 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e37459e007c8e05a53fddf7920cefb42223e7e490785a3601372fdf172de82f
4
- data.tar.gz: 1147801fce2be7b5d0a1847d817449ad2492c8ec04707d5a82713663b2406804
3
+ metadata.gz: 40d059ce2fbf022d431d61c48d54b20e3b7ded34912c431c646e23886ca4b27e
4
+ data.tar.gz: 65e50ed28c0fb2884fa3e336e499e2eba9ad3f883cf238c86b0b2a01d8a52623
5
5
  SHA512:
6
- metadata.gz: e3e28851afbfdeeb9a2d4ca0cfc0fb10f304ba121111422416f5a50757fc9ea50bdc30db20149d00b0d04dcf91d548e73c03276863601037417ce1c39a914090
7
- data.tar.gz: 232de289f1ba433d6e5c25737cadffc8641dae7052075e359e663f935225547b44f3e430f8509c9f2519f8d8abf41204b83c76964eee387cf554f45bafd04b49
6
+ metadata.gz: 67e2180ae47a96d4563d650787498816d448e60fcb101031cbe3c00c4d7ceafa9fe8101f1ea7c4c9195eea665a7bbbc3295fc5d17ea3d0e97637bb92ec15a476
7
+ data.tar.gz: fa47ea0174cbcba601d9caaa09001c616c69cf845f0fce346b1ae16c3e503b97387a9ba02965d2fbcad9b9211a8711aedde7d138ad5a5b1aa3983a272a49ece2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cem_acpt (0.12.2)
4
+ cem_acpt (0.12.3)
5
5
  async-http (>= 0.60, < 0.70)
6
6
  bcrypt_pbkdf (>= 1.0, < 2.0)
7
7
  deep_merge (>= 1.2, < 2.0)
@@ -6,6 +6,9 @@ module CemAcpt
6
6
  module Provision
7
7
  # Class provides methods for gathering provision data for Linux nodes
8
8
  class Linux < OsData
9
+ GOSS_VERSION = 'v0.4.9'
10
+ GOSS_DOWNLOAD_URL = "https://github.com/goss-org/goss/releases/download/#{GOSS_VERSION}/goss-linux-amd64"
11
+
9
12
  def self.valid_names
10
13
  %w[centos rhel oel alma rocky ubuntu]
11
14
  end
@@ -29,7 +32,7 @@ module CemAcpt
29
32
  def provision_commands
30
33
  commands = [
31
34
  "sudo /opt/puppetlabs/puppet/bin/puppet module install #{destination_provision_directory}/#{remote_module_package_name}",
32
- 'curl -fsSL https://goss.rocks/install | sudo sh',
35
+ "sudo curl -fsSL #{GOSS_DOWNLOAD_URL} -o /usr/local/bin/goss && sudo chmod +rx /usr/local/bin/goss",
33
36
  'sudo /opt/puppetlabs/puppet/bin/gem install webrick',
34
37
  'sudo chmod +x /opt/cem_acpt/log_service/log_service.rb',
35
38
  'sudo /opt/cem_acpt/log_service/log_service.rb',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CemAcpt
4
- VERSION = '0.12.2'
4
+ VERSION = '0.12.3'
5
5
  end
@@ -0,0 +1,91 @@
1
+ # CEM-6827 — Fix Goss installation to bypass broken upstream install script
2
+
3
+ ## Summary
4
+
5
+ All acceptance tests across all branches are failing with `ECONNREFUSED` on ports 8080–8083.
6
+ The `cem_acpt` gem installs Goss on test VMs via `curl -fsSL https://goss.rocks/install | sudo sh`
7
+ (`lib/cem_acpt/provision/terraform/linux.rb:32`). The upstream install script was recently changed
8
+ to construct download URLs using a new naming convention (`goss_0.4.9_linux_x86_64.tar.gz`), but
9
+ existing releases still publish assets under the old format (`goss-linux-amd64`). The constructed
10
+ URL returns a 404, Goss is never installed, the health-check sidecar never starts, and every
11
+ acceptance test fails.
12
+
13
+ Replace the `curl | sh` invocation with a direct binary download from the GitHub releases page,
14
+ hard-pinned to Goss v0.4.9.
15
+
16
+ ## Goals
17
+
18
+ - Goss installs successfully on test VMs regardless of the state of the upstream install script.
19
+ - Acceptance tests pass the health-check stage and connect on ports 8080–8083.
20
+ - The Goss version is pinned to a known-good release (v0.4.9) so future upstream changes cannot silently break provisioning.
21
+
22
+ ## Non-goals
23
+
24
+ - Supporting architectures other than amd64 (all test VMs are x86_64).
25
+ - Adding SHA-256 checksum verification for the downloaded binary (the previous `curl | sh` had no verification either).
26
+ - Making the Goss version configurable via `cem_acpt` config.
27
+ - Windows Goss support (Windows nodes do not use Goss).
28
+ - Fixing or working around the upstream install script itself.
29
+
30
+ ## Proposed Design
31
+
32
+ ### `lib/cem_acpt/provision/terraform/linux.rb`
33
+
34
+ Add two constants at the top of the `Linux` class for the pinned version and download URL:
35
+
36
+ ```ruby
37
+ GOSS_VERSION = 'v0.4.9'
38
+ GOSS_DOWNLOAD_URL = "https://github.com/goss-org/goss/releases/download/#{GOSS_VERSION}/goss-linux-amd64"
39
+ ```
40
+
41
+ Replace the `curl | sh` line in `provision_commands`:
42
+
43
+ ```ruby
44
+ # before
45
+ 'curl -fsSL https://goss.rocks/install | sudo sh',
46
+
47
+ # after
48
+ "curl -fsSL #{GOSS_DOWNLOAD_URL} -o /usr/local/bin/goss && sudo chmod +rx /usr/local/bin/goss",
49
+ ```
50
+
51
+ This downloads the binary directly to `/usr/local/bin/goss` (the same location the old install script used) and makes it executable.
52
+
53
+ ## Edge Cases
54
+
55
+ - **Upstream install script is fixed later** — the direct download is stable regardless; no action needed. We can evaluate returning to the install script in a future ticket if desired.
56
+ - **Goss v0.4.9 release assets are removed from GitHub** — unlikely for a tagged release, but if it happens the download would 404 and `curl -f` would fail fast with a clear error rather than silently installing nothing.
57
+ - **Network failure during download** — `curl -f` returns a non-zero exit code, Terraform `remote-exec` aborts, and the provisioning error is surfaced to the operator. Same behavior as before.
58
+
59
+ ## Constraints / Invariants
60
+
61
+ - The Goss binary must land at `/usr/local/bin/goss` — all three systemd service units (`goss-acpt.service`, `goss-idempotent.service`, `goss-noop.service`) invoke `goss` by that path.
62
+ - `scan_provision_commands` is unaffected — it intentionally skips Goss installation.
63
+ - The `provision_commands_wrapper` method is unchanged; it delegates to `provision_commands` which picks up the new install command.
64
+
65
+ ## Test Plan
66
+
67
+ ### `spec/cem_acpt/provision/terraform/linux_spec.rb`
68
+
69
+ 1. Assert that `provision_commands` includes a command containing the `GOSS_DOWNLOAD_URL` constant value.
70
+ 2. Assert that `provision_commands` does **not** contain `goss.rocks/install`.
71
+ 3. Assert that the Goss install command writes to `/usr/local/bin/goss`.
72
+
73
+ ### Existing specs
74
+
75
+ Run the full spec suite (`bundle exec rake spec`) to confirm no regressions.
76
+
77
+ ## Acceptance Criteria
78
+
79
+ - [ ] `provision_commands` no longer references `goss.rocks/install`.
80
+ - [ ] `provision_commands` downloads Goss v0.4.9 directly from the GitHub releases page.
81
+ - [ ] The Goss binary is placed at `/usr/local/bin/goss` with execute permissions.
82
+ - [ ] `GOSS_VERSION` and `GOSS_DOWNLOAD_URL` are defined as constants on `CemAcpt::Provision::Linux`.
83
+ - [ ] `scan_provision_commands` is unchanged (no Goss installation in scan mode).
84
+ - [ ] All existing specs pass.
85
+ - [ ] New unit tests verify the download URL and absence of `goss.rocks`.
86
+
87
+ ## Files Touched
88
+
89
+ - `lib/cem_acpt/provision/terraform/linux.rb` — replace `curl | sh` with direct download; add `GOSS_VERSION` and `GOSS_DOWNLOAD_URL` constants.
90
+ - `spec/cem_acpt/provision/terraform/linux_spec.rb` — add tests for new Goss install command.
91
+ - `specifications/CEM-6827.md` — this file.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cem_acpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - puppetlabs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-06-24 00:00:00.000000000 Z
11
+ date: 2026-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http
@@ -350,6 +350,7 @@ files:
350
350
  - specifications/CEM-6765.md
351
351
  - specifications/CEM-6798.md
352
352
  - specifications/CEM-6799.md
353
+ - specifications/CEM-6827.md
353
354
  homepage: https://github.com/puppetlabs/cem_acpt
354
355
  licenses:
355
356
  - proprietary