Skip to content

Commit bcc0ee2

Browse files
committed
chore: add gpg cookbook dependency
Signed-off-by: Dan Webb <dan.webb@damacus.io>
1 parent 754b47d commit bcc0ee2

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

FAILING_TESTS.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ GPG Keys are configured as: file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY
3131
Error: GPG check FAILED
3232
```
3333

34-
**Root Cause**:
34+
**Root Cause**:
3535
PostgreSQL uses **architecture-specific GPG keys** for signing packages. The aarch64 builds are signed with a different key (b9738825) than x86_64 builds (08b40d20). The cookbook was only downloading the generic RHEL key, not the aarch64-specific key.
3636

3737
**Reproduction Steps**:
@@ -66,24 +66,28 @@ kitchen test ident-16-centos-stream-9
6666

6767
**Affected Suites**: ident-* suites
6868

69-
**Platforms Affected**:
69+
**Platforms Affected**:
70+
7071
- Seen in CI on centos-stream-9 (from CI logs)
7172
- **NOT reproducible locally on debian-12** (test passes)
7273
- Need to verify on RHEL platforms once GPG issue is fixed
7374

7475
**Error Message** (from CI):
75-
```
76+
77+
```text
7678
Command: `sudo -u shef bash -c "psql -U sous_chef -d postgres -c 'SELECT 1;'"`
7779
exit_status is expected to eq 0
7880
got: 1
7981
```
8082

8183
**Root Cause**: Unknown - may be related to:
84+
8285
- Service reload vs restart for ident changes
8386
- Timing issue with ident file application
8487
- Platform-specific peer authentication behavior
8588

8689
**Reproduction Steps**:
90+
8791
```bash
8892
# Passes locally:
8993
kitchen test ident-16-debian-12
@@ -93,6 +97,7 @@ kitchen test ident-16-centos-stream-9
9397
```
9498

9599
**Fix Strategy**:
100+
96101
- First fix GPG issue to test on RHEL platforms
97102
- Compare working Debian vs failing RHEL behavior
98103
- May need to change from `:reload` to `:restart` for ident changes
@@ -119,13 +124,16 @@ None identified yet.
119124
## Test Results Summary
120125

121126
### Passing Platforms
127+
122128
- debian-12 (ident-16 suite confirmed passing)
123129
- ubuntu-* (likely passing, not yet tested)
124130

125-
### Failing Platforms
131+
### Failing Platforms
132+
126133
- All RHEL-based platforms (GPG issue)
127134

128135
### Not Yet Tested
136+
129137
- amazonlinux-2023
130138
- fedora-latest
131139
- opensuse-leap-15

libraries/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def default_yum_gpg_key_uri
152152
if platform_family?('rhel')
153153
rhel_version = node['platform_version'].to_i
154154
arch = node['kernel']['machine']
155-
155+
156156
if rhel_version == 7
157157
arch == 'aarch64' ? 'https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-AARCH64-RHEL7' : 'https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-RHEL7'
158158
elsif arch == 'aarch64'

metadata.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
chef_version '>= 18.0'
1010

1111
depends 'yum', '>= 7.2'
12+
depends 'gpg'
1213

1314
gem 'deepsort', '~> 0.5.0'
1415
gem 'inifile', '~> 3.0'

0 commit comments

Comments
 (0)