How to upgrade push-jobs cookbook

We are trying to upgrade chef-client version and push job cookbook is not getting deployed. It seems that i might need to upgrade the cookbook.

chef-client version - chef-16.5.64-1.el7.x86_64

[2021-03-19T08:53:41-07:00] WARN: Resource windows_user_privilege built into Chef Infra Client is being overridden by the resource from a cookbook. Please upgrade your cookbook or remove the cookbook from your run_list.
/var/chef/cache/cookbooks/push-jobs/libraries/helpers.rb:29: warning: URI.unescape is obsolete


Recipe Compile Error in /var/chef/cache/cookbooks/push-jobs/recipes/default.rb


undefined method `chef_ingredient' for cookbook: push-jobs, recipe: package :Chef::Recipe

Cookbook Trace: (most recent call first)

/var/chef/cache/cookbooks/push-jobs/recipes/package.rb:52:in from_file' /var/chef/cache/cookbooks/push-jobs/recipes/install.rb:23:in from_file'
/var/chef/cache/cookbooks/push-jobs/recipes/default.rb:29:in `from_file'

Relevant File Content:


45:"Neither ['push_jobs']['local_package_path'] nor ['push_jobs']['package_url'] and ['push_jobs']['package_checksum'] set. Chef Push Jobs client will be installed from")
46: package_version = node['push_jobs']['package_version']
47: end
49: #
50: # This uses by default.
51: #
52>> chef_ingredient 'push-jobs-client' do
53: version package_version if package_version
54: package_source local_package_path if local_package_path
55: platform_version_compatibility_mode true
56: action :upgrade
57: end

System Info:

ruby=ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]

Running handlers:
[2021-03-19T08:53:43-07:00] ERROR: Running exception handlers
Running handlers complete
[2021-03-19T08:53:43-07:00] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 07 seconds
[2021-03-19T08:53:43-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2021-03-19T08:53:43-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2021-03-19T08:53:43-07:00] FATAL: NoMethodError: undefined method `chef_ingredient' for cookbook: push-jobs, recipe: package :Chef::Recipe

push-jobs were deprecated in the middle of last year, and hit end of life in December. Too, the cookbook has been moved to the boneyard. Your best option for a replacement right now is chef-run. Sorry I don't have better news, but let us know if we can help with anything else!

Thanks for your quick response!!

What is the alternative of push-jobs? The idea of using push jobs was to perform job without ssh-ing into machine.

should we completely stop using push-jobs?


Yeah, unfortunately, there's no 1:1 replacement. chef-run is the best option.