Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Stop eucanetd spawned dhcpd in faststart nuke #376

Open
wants to merge 1 commit into
base: euca-4.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions recipes/nuke.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
# used for platform_version comparison
require 'chef/version_constraint'

# cache the dhcpd pid for use later
ruby_block 'read dhcpd pid from /var/run/eucalyptus/net/euca-dhcp.pid' do
block do
$dhcpdpid = `cat /var/run/eucalyptus/net/euca-dhcp.pid`
end
action :run
end

## Stop all euca components

# on el6 the init scripts are named differently than on el7
Expand Down Expand Up @@ -83,6 +91,11 @@
end
end

# Stop eucanetd spawned dhcpd
execute "Stop eucalyptus dhcpd" do
command lazy { "/usr/bin/kill #{$dhcpdpid}" }
end

## Remove euca packages chef yum_package does not seem to like wildcard
execute 'remove euca packages' do
command "yum -y remove 'euca*'"
Expand Down