Comments (8)
It seems to me that the kill function does not work with the redhat 5x 6x ?
from chef_client_updater.
The kill behavior is not supposed to automatically restart chef. That task is left to the service manager, which on RHEL 5/6 does NOT restart chef for you. You will need to use an external process monitor to restart chef on these systems. There is a note about this in the Readme reproduced below:
Init System Caveats
When Chef runs as a service under a system init daemon such as Sys-V or systemd each chef run forks off from the main chef-client process being managed by the init system. For a chef-client upgrade to occur the running chef-client as well as the parent process must be killed, and a new chef-client must start using the updated binaries. This cookbook handles killing the chef-client, but your init system must properly handle starting the service back up. For systemd and upstart this can be handled via configuration, and chef-client cookbook 8.1.1 or later handles this by default. This functionality is not available in sys-v (RHEL 6, Debian 7, and others), so you will need to employ a secondary process such as a monitoring system to start the chef-client service.
from chef_client_updater.
The cookbook in version 2.0.3 works perfectly in all redhat versions.
from chef_client_updater.
I'm not one of the maintainers, so I can't speak for them, but typically incrementing the first number in a version string indicates breaking changes, so you should expect version 3 to work differently than version 2. All I can tell you is that this cookbook is documented to work the way you've described, so you should either stick to using the version you know works or use this version as it is documented.
from chef_client_updater.
Thank you for your help I will wait for the response of the dev.
thank you
from chef_client_updater.
you can use :exec
if it works. if it does not work, i don't have a solution.
from chef_client_updater.
i test version 3.0.4 and i have same problem but it works ( exit error )
CHEF_CLIENT_VERSION = '12.13.37'
DOWNLOAD_URL_OVERRIDE = 'http://pulp.cma-cgm.com/pulp/repos/opt/pulp/cma/rpm'
DOWNLOAD_URL_OVERRIDE_WINDOWS = 'http://pulp.cma-cgm.com/chef/chef-client/robby/windows'
def chef_client_updater_settings
# stable or current channel
default['chef_client_updater']['channel'] = 'stable'
# prevent a newer client "updating" to an older client
default['chef_client_updater']['prevent_downgrade'] = false
# the version to install (ex: '12.12.13') or 'latest'
Chef::Log.info("The version of chef-client to install/upgrade/downgrade is : #{CHEF_CLIENT_VERSION}")
default['chef_client_updater']['version'] = "#{CHEF_CLIENT_VERSION}"
# kill the client post install or exec the client post install for non-service based installs
default['chef_client_updater']['post_install_action'] = 'kill'
end
case node['platform']
when 'redhat'
# Red Hat Enterprise Linux Server release 7.X
if (node['platform_version'].include? '7.')
chef_client_updater_settings
# the download URL (for use in an air-gapped environment)
Chef::Log.info("Downloading pulp chef-client from #{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el7.x86_64.rpm.....")
default['chef_client_updater']['download_url_override'] = "#{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el7.x86_64.rpm"
# the checksum of the package from "download_url_override"
default['chef_client_updater']['checksum'] = '99beef40d6574e5a1e37e166b812dc80399c77cd42f239d79f4103591dcc4898'
end
# Red Hat Enterprise Linux Server release 6.X
if (node['platform_version'].include? '6.')
chef_client_updater_settings
# the download URL (for use in an air-gapped environment)
Chef::Log.info("Downloading pulp chef-client from #{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el6.x86_64.rpm.....")
default['chef_client_updater']['download_url_override'] = "#{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el6.x86_64.rpm"
# the checksum of the package from "download_url_override"
default['chef_client_updater']['checksum'] = '16d908e3d25ec99e4d3abbc080f050c902467de2b481ec226b5e10ccd7062152'
end
# Red Hat Enterprise Linux Server release 5.X (64 bits)
if (node['platform_version'].include? '5.') && if (node['kernel']['machine'].include? 'x86_64')
chef_client_updater_settings
# the download URL (for use in an air-gapped environment)
Chef::Log.info("Downloading pulp chef-client from #{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el5.x86_64.rpm.....")
default['chef_client_updater']['download_url_override'] = "#{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el5.x86_64.rpm"
# the checksum of the package from "download_url_override"
default['chef_client_updater']['checksum'] = 'afc8e0f4c60055cf08ab3914c6ae25e183e234e7efcfa81080339e2986a97e0e'
end
end
# Red Hat Enterprise Linux Server release 5.X (32 bits)
if (node['platform_version'].include? '5.') && if (node['kernel']['machine'].include? 'i686')
chef_client_updater_settings
# the download URL (for use in an air-gapped environment)
Chef::Log.info("Downloading pulp chef-client from #{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el5.i386.rpm.....")
default['chef_client_updater']['download_url_override'] = "#{DOWNLOAD_URL_OVERRIDE}/chef-#{CHEF_CLIENT_VERSION}-1.el5.i386.rpm"
# the checksum of the package from "download_url_override"
default['chef_client_updater']['checksum'] = '4ed7b04b2c62796b637c10a68b9f341023e1333c852fe9133f3d605e75ccbf4a'
end
end
when 'windows'
# Windows
chef_client_updater_settings
# the download URL (for use in an air-gapped environment)
Chef::Log.info("Downloading pulp chef-client from #{DOWNLOAD_URL_OVERRIDE_WINDOWS}/chef-client-#{CHEF_CLIENT_VERSION}-1-x64.msi.....")
default['chef_client_updater']['download_url_override'] = "#{DOWNLOAD_URL_OVERRIDE_WINDOWS}/chef-client-#{CHEF_CLIENT_VERSION}-1-x64.msi"
# the checksum of the package from "download_url_override"
default['chef_client_updater']['checksum'] = '08906cde0883f9b37deb777b482ff3fad63210139ec49c750c5d167613db9942'
end
from chef_client_updater.
Is it possible to have the function exec & kill that works for REDHAT 5x & 6x. thanks
from chef_client_updater.
Related Issues (20)
- No checksum validation of handle.zip
- The PowerShell to reschedule the upgrade does not work (Windows) HOT 2
- "cannot load such file -- highline" after upgraded. HOT 8
- Direct Download - Unable to contain self signed certificate
- Require Chef Infra Client 12.5+
- Remove support for ChefDK
- Move the upgrade logic outside of Chef
- Chef client update fails on windows 7 citrix VDIs
- Cookbook removes scheduled task HOT 5
- Chef upgrade failing in windows10 version 2004 and later
- Cookbook hangs when upgrading on Solaris HOT 1
- Assumes `C:\opscode` exists HOT 1
- Calls mixlib-install even when `download_url_override` is set HOT 1
- Create Tag 3.12 HOT 4
- Deprecation warning for `unified_mode` HOT 2
- Latest release contains mac underscore files HOT 3
- The exec_command value cannot be overridden HOT 1
- Provide basic authentication when using download_url_override?
- Restart chef-client.service after upgrade
- product_name does not allow 'cinc' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef_client_updater.