File tree Expand file tree Collapse file tree 4 files changed +20
-5
lines changed
Expand file tree Collapse file tree 4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 22
33This file is used to list changes made in each version of the chef_client_updater cookbook.
44
5- ## 3.13.0 (2206-01-19)
5+ ## 3.13.1 (2026-01-28)
6+
7+ - Fixed the issue with failure to restart Windows EventLog Service
8+
9+ ## 3.13.0 (2026-01-19)
610
711- Added license_id to resource for mixlib-install 3.14.0 support of new chef downloads api requiring license key for chef-client downloads
812
Original file line number Diff line number Diff line change 33maintainer_email 'cookbooks@chef.io'
44license 'Apache-2.0'
55description 'Upgrades chef-client to specified releases'
6- version '3.13.0 '
6+ version '3.13.1 '
77
88chef_version '>= 11' if respond_to? ( :chef_version ) # cookstyle: disable ChefModernize/RespondToInMetadata
99
Original file line number Diff line number Diff line change @@ -506,14 +506,25 @@ def event_log_ps_code
506506 Where-Object Status -eq 'Running' | Select-Object -ExpandProperty Name
507507 # Attempt to preemptively stop Dependent Services
508508 $depsvcsrunning | ForEach-Object {
509- Stop-Service -Name "$_" -Force -ErrorAction SilentlyContinue
509+ $depsvc = $_
510+ try {
511+ Stop-Service -Name "$($depsvc)" -Force -ErrorAction Stop
512+ } catch {
513+ $process='svchost.exe'
514+ $data = Get-CimInstance Win32_Process -Filter "name = '$process'" | Select-Object ProcessId, CommandLine |
515+ Where-Object {$_.CommandLine -Match "$($depsvc)"}
516+ $data = $data.ProcessId
517+ Stop-Process -Id $data -Force
518+ Start-Sleep -Seconds 3
519+ }
510520 }
511521 # Stop EventLog Service - First Politely, then Forcibly
512522 try {
513523 Stop-Service -Name 'EventLog' -Force -ErrorAction Stop
514524 } catch {
515525 $process='svchost.exe'
516- $data = Get-CimInstance Win32_Process -Filter "name = '$process'" | Select-Object ProcessId, CommandLine | Where-Object {$_.CommandLine -Match "LocalServiceNetworkRestricted"}
526+ $data = Get-CimInstance Win32_Process -Filter "name = '$process'" | Select-Object ProcessId, CommandLine |
527+ Where-Object {$_.CommandLine -Match "LocalServiceNetworkRestricted"}
517528 $data = $data.ProcessId
518529 Stop-Process -Id $data -Force
519530 Start-Sleep -Seconds 10
Original file line number Diff line number Diff line change 3737 context 'when license_id is provided' do
3838 before do
3939 allow_any_instance_of ( Object ) . to receive ( :update_necessary? ) . and_return ( false )
40- chef_run . node . normal [ 'chef_client_updater' ] [ 'license_id' ] = 'test-license-123'
40+ chef_run . node . default [ 'chef_client_updater' ] [ 'license_id' ] = 'test-license-123'
4141 end
4242
4343 it 'does not log a warning about missing license_id' do
You can’t perform that action at this time.
0 commit comments