Problem:
I’ve been running Foreman for many years now. Suddenly, all of my hosts are shown as out of sync (all stopped around 36 hours ago) and no Puppet reports from after that time are listed.
But Puppet reports are being sent and Foreman is sending correct ENC data to Puppet.
When hosts call in the Foreman logs look correct:
2021-10-02T02:11:19 [I|app|4f05af6d] Started GET ""/node/*****?format=yml"" for 172.31.84.205 at 2021-10-02 02:11:19 +0000
2021-10-02T02:11:19 [I|app|4f05af6d] Processing by HostsController#externalNodes as YML
2021-10-02T02:11:19 [I|app|4f05af6d] Parameters: {""name""=>""*****""}
2021-10-02T02:11:19 [I|app|4f05af6d] Rendering text template
2021-10-02T02:11:19 [I|app|4f05af6d] Rendered text template (Duration: 0.0ms | Allocations: 2)
2021-10-02T02:11:19 [I|app|4f05af6d] Completed 200 OK in 95ms (Views: 0.5ms | ActiveRecord: 39.6ms | Allocations: 28054)
2021-10-02T02:11:26 [I|app|6e8a9513] Started POST ""/api/hosts/facts"" for 172.31.84.205 at 2021-10-02 02:11:26 +0000
2021-10-02T02:11:26 [I|app|6e8a9513] Processing by Api::V2::HostsController#facts as JSON
2021-10-02T02:11:26 [I|app|6e8a9513] Parameters: {""facts""=>""[FILTERED]"", ""name""=>""*****"", ""certname""=>""*****"", ""apiv""=>""v2"", ""host""=>{""certname""=>""*****"", ""name""=>""*****""}}
2021-10-02T02:11:26 [W|app|6e8a9513] Some subtrees exceeded 100 limit of facts, dropped 101 keys
2021-10-02T02:11:28 [I|app|6e8a9513] Import facts for '*****' completed. Added: 0, Updated: 17, Deleted 0 facts
2021-10-02T02:11:28 [I|app|6e8a9513] Completed 201 Created in 1465ms (Views: 2.7ms | ActiveRecord: 764.9ms | Allocations: 316626)
2021-10-02T02:11:28 [I|app|44dd3bb8] Started GET ""/node/*****?format=yml"" for 172.31.84.205 at 2021-10-02 02:11:28 +0000
2021-10-02T02:11:28 [I|app|44dd3bb8] Processing by HostsController#externalNodes as YML
2021-10-02T02:11:28 [I|app|44dd3bb8] Parameters: {""name""=>""*****""}
2021-10-02T02:11:28 [I|app|44dd3bb8] Rendering text template
2021-10-02T02:11:28 [I|app|44dd3bb8] Rendered text template (Duration: 0.0ms | Allocations: 2)
2021-10-02T02:11:28 [I|app|44dd3bb8] Completed 200 OK in 84ms (Views: 0.6ms | ActiveRecord: 35.9ms | Allocations: 28054)
Expected outcome:
That Foreman continues to know the reports it is receiving.
Foreman and Proxy versions:
Foreman and proxies all 2.5.3
Foreman and Proxy plugin versions:
foreman_bootdisk 17.1.0
foreman_setup 6.0.0
Distribution and version:
Ubuntu 18.04
Other relevant data:
Both Foreman and Puppet are configured through Puppet. So I am pretty certain no configuration has changed.
But, Ubuntu’s unattended-upgrades did run during the time frame this issue happened (it should only apply security fixes) and made the following changes on the Foreman server:
Start-Date: 2021-09-29 14:04:26
Commandline: /usr/bin/unattended-upgrade
Upgrade: apache2-data:amd64 (2.4.29-1ubuntu4.17, 2.4.29-1ubuntu4.18), apache2-bin:amd64 (2.4.29-1ubuntu4.17, 2.4.29-1ubuntu4.18), apache2:amd64 (2.4.29-1ubuntu4.17, 2.4.29-1ubuntu4.18), apache2-utils:amd64 (2.4.29-1ubuntu4.17, 2.4.29-1ubuntu4.18)
End-Date: 2021-09-29 14:04:30
I imagine this could affect Foreman since it uses Apache (I think so?). I tried to downgrade back to 2.4.29-1ubuntu4.17 but that version doesn’t seem to exist:
root@foreman:~# apt-cache madison apache2
apache2 | 2.4.29-1ubuntu4.18 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
apache2 | 2.4.29-1ubuntu4.18 | http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
apache2 | 2.4.29-1ubuntu4 | http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
Yes, I have rebooted both the Foreman and Puppet servers.