chef-cookbooks / chef_client_updater

Chef Cookbook to update the chef client on nodes
https://supermarket.chef.io/cookbooks/chef_client_updater
Apache License 2.0
54 stars 79 forks source link

Restart chef-client.service after upgrade #248

Open TimRots opened 1 year ago

TimRots commented 1 year ago

While upgrading Chef infra client 17.x to 18.2.7 chef-client.service is not restarted. This will result in failing chef-client runs as shown below, until the service is restarted

chef-client[748]: [2023-04-26T07:49:43+00:00] INFO: SIGUSR1 received, will run now or after the current run
chef-client[748]: [2023-04-26T07:49:43+00:00] INFO: Forking Chef Infra Client instance to converge...
chef-client[715809]: [2023-04-26T07:49:43+00:00] ERROR: Running exception handlers
chef-client[715809]: [2023-04-26T07:49:43+00:00] ERROR: Exception handlers complete
chef-client[715809]: [2023-04-26T07:49:43+00:00] ERROR: undefined method `URI' for Chef::DataCollector::RunStartMessage:Module
chef-client[748]: [2023-04-26T07:49:43+00:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef Infra Client run process exited unsuccessfully (exit code 1)

I would expect the chef-client.service to be restarted during the upgrade flow. Can be reproduced by running kill -USR1 $(pidof ruby):