How a failed Puppet run, misleading GPG errors and apparently missing system libraries revealed a corrupted RPM database.
I have always described Puppet as a damn steamroller.
Give it a catalogue describing the desired state of a system, and it will relentlessly try to make reality match that description. Configuration files, packages, permissions, services — everything is supposed to end up where it belongs.
That is precisely why I find it particularly interesting when Puppet is unable to apply a configuration.
When the steamroller cannot get through, something underneath deserves investigation.
On November 25, 2026, I encountered exactly this situation on a Red Hat Enterprise Linux 8 server.
What initially appeared to be a configuration management failure eventually led me through GPG signature verification, contradictory package information, missing GLIBC dependencies and, ultimately, a corrupted RPM database.
1. When the steamroller stops
The first indication of a problem came from Puppet’s execution logs in /var/log/messages.
The agent successfully contacted its Puppet server, requested its catalogue and started applying the configuration.
Nov 25 14:13:29 rhel8-node01 puppet-agent[1824837]: Requesting catalog from puppetmaster.example.net:8140
Nov 25 14:13:45 rhel8-node01 puppet-agent[1824837]: Catalog compiled by puppetmaster.example.net
Nothing particularly unusual so far.
However, less than thirty seconds later, things started going wrong.
Nov 25 14:14:12 rhel8-node01 puppet-agent[1824837]: Execution of '/usr/bin/yum -d 0 -e 0 -y install device-mapper-multipath' returned 1:
Nov 25 14:14:12 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Disk_storage::Install/Package[device-mapper-multipath]/ensure) change from 'purged' to 'present' failed
As expected, Puppet started skipping resources that depended on the failed package installation.
Nov 25 14:14:12 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Disk_storage::Config/File[/etc/lvm]) Skipping because of failed dependencies
Nov 25 14:14:12 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Disk_storage::Config/File[/etc/lvm/lvm.conf]) Skipping because of failed dependencies
Nov 25 14:14:12 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Disk_storage::Config/File[/etc/multipath.conf]) Skipping because of failed dependencies
Nov 25 14:14:12 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Disk_storage::Service/Service[multipathd]) Skipping because of failed dependencies
Twenty seconds later, another completely unrelated package failed.
Nov 25 14:14:32 rhel8-node01 puppet-agent[1824837]: Execution of '/usr/bin/yum -d 0 -e 0 -y install logrotate' returned 1:
Nov 25 14:14:32 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Logrotate::Install/Package[logrotate]/ensure) change from 'purged' to 'present' failed
This caused another cascade of skipped resources, including logging configuration, scheduled log rotation and service management.
Nov 25 14:14:32 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Logrotate::Config/File[/etc/logrotate.d]) Skipping because of failed dependencies
Nov 25 14:14:32 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Syslog::Client::Service/Service[systemd-journald]) Skipping because of failed dependencies
Nov 25 14:15:55 rhel8-node01 puppet-agent[1824837]: (/Stage[main]/Syslog::Client::Service/Service[rsyslog]) Skipping because of failed dependencies
And the list kept growing.
Nov 25 14:14:59 rhel8-node01 puppet-agent[1824837]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y update package-b-1.6.0' returned 1:
Nov 25 14:15:12 rhel8-node01 puppet-agent[1824837]: Execution of '/usr/bin/yum -d 0 -e 0 -y install lsof' returned 1:
Nov 25 14:15:24 rhel8-node01 puppet-agent[1824837]: Execution of '/usr/bin/yum -d 0 -e 0 -y install mtr' returned 1:
Nov 25 14:15:37 rhel8-node01 puppet-agent[1824837]: Execution of '/usr/bin/yum -d 0 -e 0 -y install screen' returned 1:
Nov 25 14:15:49 rhel8-node01 puppet-agent[1824837]: Execution of '/usr/bin/yum -d 0 -e 0 -y install sg3_utils' returned 1:
Nov 25 14:16:07 rhel8-node01 puppet-agent[1824837]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y --disableplugin=versionlock update amtool-0.34.0-1' returned 1:
Nov 25 14:16:20 rhel8-node01 puppet-agent[1824837]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y --disableplugin=versionlock update promtool-3.14.0-1' returned 1:
Nov 25 14:16:33 rhel8-node01 puppet-agent[1824837]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y --disableplugin=versionlock update grafana-agent-converter-0.12.0-1' returned 1:
Within approximately two and a half minutes, Puppet had encountered failures involving storage management, log rotation, system utilities, proprietary software and observability tooling.
Interestingly, unrelated catalogue resources were still being executed successfully.
Puppet itself was working. Catalogue compilation was working. Resource dependency management was working.
The common denominator was package management.
Following the dependency chain
This is an excellent example of how a single underlying infrastructure failure can propagate through a configuration management system.
Package management failure
|
+-- device-mapper-multipath
| |
| +-- LVM configuration skipped
| +-- Multipath configuration skipped
| +-- Storage rules skipped
| +-- multipathd management skipped
|
+-- logrotate
| |
| +-- Log rotation configuration skipped
| +-- Scheduled tasks skipped
| +-- Logging service management skipped
|
+-- System utilities
|
+-- Internal software
|
+-- Observability tooling
The skipped resources were not independent failures. They were the consequences of Puppet correctly enforcing its dependency graph.
There was little point in investigating the individual Puppet modules.
It was time to dig underneath the configuration management layer and interact directly with the package manager.
2. Investigating DNF: a misleading GPG signature failure
To investigate why Puppet was unable to apply the configuration, I started executing package management operations manually.
On RHEL 8, YUM uses the DNF-based package management stack, so interacting directly with DNF was the natural next step.
The following error appeared during the investigation:
Internal packages for Enterprise Linux 8 - x86_64
Importing GPG key 0xD1A6B2C3:
Userid : "Infrastructure RPM signing key <redacted>"
Fingerprint: A1B2 C3D4 E5F6 0718 192A 3B4C 0123 4567 D1A6 B2C3
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-Internal2021
Key imported successfully
Import of key(s) didn't help, wrong key(s)?
Public key for package-a-1.3.0.x86_64.rpm is not installed.
Public key for package-b-1.6.0-1.el8.x86_64.rpm is not installed.
Having worked with RPM-based distributions for more than two decades, GPG signature verification issues were not particularly unfamiliar territory. However, I had not encountered this particular combination of symptoms since the RHEL 7 days.
The interesting part was not the missing public key itself, but these two consecutive messages:
Key imported successfully
Import of key(s) didn't help, wrong key(s)?
DNF was able to import the configured GPG key, but it was still unable to validate the packages.
The obvious hypothesis was that the packages had been signed using a different key.
Obvious, reasonable — and wrong.
3. Checking the actual RPM signatures
DNF retains downloaded packages in its cache following a failed transaction. This allows us to inspect the RPM files directly without downloading them again.
find /var/cache/dnf -type f \
\( -name 'package-a*.rpm' -o -name 'package-b*.rpm' \) \
-exec rpm -qp --qf '%{NAME}: %{RSAHEADER:pgpsig}\n' {} \;
The result:
warning: package-b-1.6.0-1.el8.x86_64.rpm:
Header V4 RSA/SHA256 Signature, key ID 5f27c5d7: NOKEY
package-b: RSA/SHA256, Wed 02 Sep 2026 02:34:55 PM GMT,
Key ID 01234567d1a6b2c3
warning: package-a-1.3.0.x86_64.rpm:
Header V4 RSA/SHA256 Signature, key ID 5f27c5d7: NOKEY
package-a: RSA/SHA256, Thu 01 Jan 1970 12:00:00 AM GMT,
Key ID 01234567d1a6b2c3
Both packages reported the same signing key ID:
01234567d1a6b2c3
Which matches the final 64 bits of the configured public key fingerprint:
A1B2 C3D4 E5F6 0718 192A 3B4C 0123 4567 D1A6 B2C3
This makes a signing-key mismatch considerably less likely. It does not, by itself, cryptographically validate the signatures.
Something appeared to be wrong with how the system registered or retrieved the imported key.
As a side note, one of the packages reported a signature timestamp of January 1, 1970. An interesting anomaly, but not the focus of this investigation.
4. Going old-school: RPM instead of DNF
At this point, I decided to interact directly with RPM to understand whether the problem was specific to DNF.
rpm -Uvh /var/cache/dnf/.../packages/package-a-1.3.0.x86_64.rpm
The first package was successfully upgraded, although RPM still reported the missing public key:
warning: Header V4 RSA/SHA256 Signature,
key ID 5f27c5d7: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:package-a-1.3.0-1 ################################# [ 50%]
Cleaning up / removing...
2:package-a-0:1.0.2-1 ################################# [100%]
The second package, however, revealed something considerably more interesting.
rpm -Uvh /var/cache/dnf/.../packages/package-b-1.6.0-1.el8.x86_64.rpm
error: Failed dependencies:
libc.so.6()(64bit) is needed by package-b-1.6.0-1.el8.x86_64
libc.so.6(GLIBC_2.14)(64bit) is needed by package-b-1.6.0-1.el8.x86_64
libc.so.6(GLIBC_2.2.5)(64bit) is needed by package-b-1.6.0-1.el8.x86_64
libc.so.6(GLIBC_2.3.3)(64bit) is needed by package-b-1.6.0-1.el8.x86_64
libjson-c.so.4()(64bit) is needed by package-b-1.6.0-1.el8.x86_64
libjson-c.so.4(JSONC_0.14)(64bit) is needed by package-b-1.6.0-1.el8.x86_64
rtld(GNU_HASH) is needed by package-b-1.6.0-1.el8.x86_64
Missing GLIBC dependencies?
On a running RHEL 8 system?
With GLIBC having just been updated?
Now we had a different problem entirely.
Direct RPM installation was used during the investigation. It is not the recommended workaround for signature verification failures, as RPM may allow installation despite reporting an unavailable signing key.
5. When RPM and DNF disagree
The next logical step was to query the installed packages.
rpm -q glibc glibc-common json-c
package glibc is not installed
glibc-common-2.28-251.el8_10.53.x86_64
package json-c is not installed
According to RPM, GLIBC was not installed.
Let’s ask DNF.
dnf -y install glibc
Package glibc-2.28-251.el8_10.53.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Wait. What?
| Package management tool | GLIBC status |
|---|---|
| RPM | Not installed |
| DNF | Already installed |
Two package management tools on the same server, running against the same system, reporting contradictory information about one of its most fundamental libraries.
This was the turning point of the investigation.
We were no longer troubleshooting Puppet modules, GPG keys or missing dependencies. We were troubleshooting the package management infrastructure itself.
6. Dependency resolution versus transaction validation
Attempting to install json-c provided further evidence.
dnf -y install json-c
DNF successfully resolved the dependencies and prepared the transaction:
Dependencies resolved.
Installing:
json-c x86_64 0.13.1-3.el8 rhel-8-x86_64-baseos-rpms
Transaction Summary
Install 1 Package
But then:
Running transaction check
Error: transaction check vs depsolve:
ld-linux-x86-64.so.2()(64bit) is needed by json-c-0.13.1-3.el8.x86_64
ld-linux-x86-64.so.2(GLIBC_2.3)(64bit) is needed by json-c-0.13.1-3.el8.x86_64
libc.so.6()(64bit) is needed by json-c-0.13.1-3.el8.x86_64
libc.so.6(GLIBC_2.14)(64bit) is needed by json-c-0.13.1-3.el8.x86_64
libc.so.6(GLIBC_2.2.5)(64bit) is needed by json-c-0.13.1-3.el8.x86_64
libc.so.6(GLIBC_2.3)(64bit) is needed by json-c-0.13.1-3.el8.x86_64
libc.so.6(GLIBC_2.3.4)(64bit) is needed by json-c-0.13.1-3.el8.x86_64
libc.so.6(GLIBC_2.4)(64bit) is needed by json-c-0.13.1-3.el8.x86_64
libc.so.6(GLIBC_2.8)(64bit) is needed by json-c-0.13.1-3.el8.x86_64
rtld(GNU_HASH) is needed by json-c-0.13.1-3.el8.x86_64
Followed by the message that finally connected all the symptoms:
To diagnose the problem, try running:
'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb'
might fix the issue.
DNF’s dependency solver believed the necessary packages were installed, while RPM’s transaction validation was unable to resolve their provided capabilities.
This discrepancy was consistent with an inconsistent or corrupted RPM database.
7. Understanding the underlying problem
On a standard RHEL 8 installation, RPM uses a Berkeley DB-based database, traditionally located at:
/var/lib/rpm/
The database contains installed package metadata and indexes used to retrieve information efficiently.
These include package names, dependencies, provided capabilities, file ownership and imported GPG public keys, which are represented as special package records.
The observed symptoms were consistent with problems affecting these lookups.
| Symptom | Potential explanation |
|---|---|
| Puppet unable to install or update unrelated packages | Package management subsystem failure |
| Puppet skipping dependent resources | Expected dependency graph behaviour |
| GPG key imported but not recognised | Public key record lookup failure |
| GLIBC installed but not found by RPM | Package name index inconsistency |
| Missing libc dependencies | Provided capability lookup failure |
| DNF resolves dependencies but RPM rejects the transaction | Inconsistent package database views |
The precise damaged database structure was not independently identified during this investigation. However, the combination of symptoms strongly pointed towards RPMDB inconsistency rather than several independent package management problems.
8. Recovering the RPM database
Before performing any recovery operation, ensure that no other process is accessing or modifying the database.
In this particular scenario, that also means ensuring that Puppet and any automated patching processes cannot initiate package management transactions during the recovery.
lsof +D /var/lib/rpm
If lsof is unavailable, as could happen given the failed Puppet package installations, use another available process inspection mechanism.
Back up the existing database
cp -a /var/lib/rpm \
/var/lib/rpm.bak.$(date +%Y%m%d-%H%M%S)
If possible, preserve a list of currently registered packages:
rpm -qa | sort > /root/rpm-list.before
Verify the database
rpm --verifydb
Rebuild the database
rpm --rebuilddb
On RHEL systems with SELinux enabled, restore the expected security contexts:
restorecon -RF /var/lib/rpm
Validate the recovery
rpm --verifydb
rpm -qa | sort > /root/rpm-list.after
diff -u /root/rpm-list.before /root/rpm-list.after
Check whether RPM can now retrieve the previously missing package:
rpm -q glibc
In this particular incident, rebuilding the RPM database restored RPM’s ability to locate the installed GLIBC package.
No forced GLIBC installation was required.
An old-school solution to an old-school problem.
9. Post-recovery checks
Restoring package lookups is a good sign, but it should not be the end of the investigation.
Check the previously problematic signing key:
rpm -qi gpg-pubkey-5f27c5d7
Check whether the library capabilities can be resolved:
rpm -q --whatprovides 'libc.so.6()(64bit)'
rpm -q --whatprovides 'libc.so.6(GLIBC_2.14)(64bit)'
rpm -q --whatprovides 'rtld(GNU_HASH)'
Invalidate DNF’s cached information and check package consistency:
dnf clean all
dnf check
Retry the failed package operations through the normal package management workflow, with GPG verification enabled.
Finally, return to the original problem: Puppet.
puppet agent --test --noop
Review the proposed changes before allowing Puppet to apply the configuration again.
puppet agent --test --detailed-exitcodes
The objective is not simply to have a working RPM command.
The objective is to restore the system’s ability to converge towards its desired configuration.
These checks are important because rebuilding an RPM database does not guarantee that all package records have been recovered or that the original cause of the corruption has disappeared.
10. What caused the corruption?
Recovering a corrupted database and understanding why it became corrupted are two different tasks.
Potential causes worth investigating include:
- Interrupted package management transactions.
- Unexpected system shutdowns.
- Filesystem or storage errors.
- Exhausted disk space or inodes.
- Database locking or recovery issues.
Some basic diagnostic commands:
df -h /var/lib/rpm
df -i /var/lib/rpm
journalctl -k | grep -Ei 'I/O error|corrupt|xfs|ext4'
rpm -Va --nofiles --nodigest
The original trigger of the database inconsistency was not established in this incident.
11. What not to do
When facing these symptoms, it is tempting to bypass the errors and complete the update.
For example:
dnf update --nogpgcheck
Or:
rpm -Uvh --nodeps package.rpm
Neither addresses the underlying problem.
Even worse, forcing the reinstallation of fundamental system libraries such as GLIBC while the package database is inconsistent could introduce additional problems.
Similarly, modifying Puppet manifests to remove failed dependencies or suppress package installation errors would merely hide the symptoms from the configuration management layer.
Before bypassing a failed safety check, understand why it is failing.
Conclusion
What initially appeared to be a Puppet configuration management failure turned out to be consistent with a corrupted RPM database.
The investigation followed an interesting path through several layers of the system:
Puppet unable to apply configuration
|
v
Multiple unrelated package operations fail
|
v
Manual DNF investigation
|
v
GPG signature verification failure
|
v
Verify actual RPM signing key IDs
|
v
Signing key IDs match
|
v
Direct RPM dependency resolution failure
|
v
RPM and DNF report contradictory package status
|
v
Transaction validation failure
|
v
RPM database rebuild
|
v
Package lookup restored
The most valuable part of this incident was not the recovery command itself. rpm --rebuilddb has been around for decades.
It was recognising that apparently unrelated errors were symptoms of the same underlying problem, and following the evidence through each layer of the system.
A failed Puppet run does not necessarily mean there is a problem with your Puppet code.
A missing GPG key does not necessarily mean the key is missing.
A missing dependency does not necessarily mean the library is missing.
And a successful dependency resolution does not necessarily mean the package database is healthy.
Automation is exceptionally good at enforcing a desired state. But automation still relies on the underlying components of the system being functional.
Even steamrollers need solid ground.
Error messages are evidence, not diagnoses.
Don’t just fix the symptom. Dig deeper.
Originally investigated on November 25, 2026, on a Red Hat Enterprise Linux 8 system. Internal infrastructure identifiers, proprietary package names and unrelated configuration details have been anonymised or omitted. Cryptographic identifiers are synthetic. Log excerpts have been shortened for readability.
digdeeper.systems — Engineering beyond the error message.