Skip to content

Commit

Permalink
Merge pull request #818 from jsuchome/neutron-ha-tool
Browse files Browse the repository at this point in the history
upgrade: switch neutron-ha-tool to use v3 API
  • Loading branch information
jsuchome authored Nov 22, 2016
2 parents 7247287 + bf64a9d commit 4232291
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
15 changes: 1 addition & 14 deletions chef/cookbooks/crowbar/recipes/prepare-upgrade-scripts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,14 @@
# Following script executes all actions that are needed directly on the node
# directly before the OS upgrade is initiated.

# Find out v2 auth URL that is needed for neutron-ha-tool
os_auth_url_v2 = ""
if use_ha && node["run_list_map"].key?("neutron-network")
keystone_settings = KeystoneHelper.keystone_settings(node, @cookbook_name)
os_auth_url_v2 = KeystoneHelper.versioned_service_URL(
keystone_settings["protocol"],
keystone_settings["internal_url_host"],
keystone_settings["service_port"],
"2.0"
)
end

template "/usr/sbin/crowbar-pre-upgrade.sh" do
source "crowbar-pre-upgrade.sh.erb"
mode "0755"
owner "root"
group "root"
action :create
variables(
use_ha: use_ha,
os_auth_url_v2: os_auth_url_v2
use_ha: use_ha
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [[ -f /usr/bin/neutron-ha-tool ]] ; then
set +x
source /root/.openrc
set -x
OS_AUTH_URL="<%= @os_auth_url_v2 %>" neutron-ha-tool --l3-agent-evacuate $(hostname)
neutron-ha-tool --l3-agent-evacuate $(hostname)
fi

# Shutdown pacemaker so the remaining OpenStack services are stopped
Expand Down

0 comments on commit 4232291

Please sign in to comment.