Add a configurable delay to Nova Evacuate calls
Add a configurable delay to Nova Evacuate calls In case /var/lib/nova/instances resides on NFS we have seen migrations failing with 'Failed to get "write" lock - Is another process using the image' errors. This has been tracked down to grace/lease timeouts not having expired before attempting the migration/evacuate, so in this cases it might be desirable to delay the nova evacuate call to give the storage time to release the locks. Related resource-agents change: https://review.opendev.org/#/c/684777/ Change-Id: I5ec6a5b0c66579e068e811f49aae10a5f406158a Resolves: rhbz#1740069
This commit is contained in:
parent
52c877f89e
commit
72487d804e
|
@ -60,6 +60,10 @@
|
|||
# Variable that defines the no_shared_storage for the nova evacuate resource
|
||||
# Defaults to hiera('tripleo::instanceha::no_shared_storage', true)
|
||||
#
|
||||
# [*evacuate_delay*]
|
||||
# (Optional) Integer, seconds to wait before starting the nova evacuate
|
||||
# Defaults to hiera('tripleo::instanceha::evacuate_delay', 0)
|
||||
#
|
||||
class tripleo::profile::base::pacemaker::instance_ha (
|
||||
$step = Integer(hiera('step')),
|
||||
$pcs_tries = hiera('pcs_tries', 20),
|
||||
|
@ -71,6 +75,7 @@ class tripleo::profile::base::pacemaker::instance_ha (
|
|||
$project_domain = hiera('nova::keystone::authtoken::project_domain_name', 'Default'),
|
||||
$region_name = hiera('nova::keystone::authtoken::region_name', 'regionOne'),
|
||||
$no_shared_storage = hiera('tripleo::instanceha::no_shared_storage', true),
|
||||
$evacuate_delay = hiera('tripleo::instanceha::evacuate_delay', 0),
|
||||
) {
|
||||
if $step >= 2 {
|
||||
class { '::pacemaker::resource_defaults':
|
||||
|
@ -117,10 +122,15 @@ class tripleo::profile::base::pacemaker::instance_ha (
|
|||
} else {
|
||||
$iha_no_shared_storage = 'no_shared_storage=false'
|
||||
}
|
||||
if $evacuate_delay > 0 {
|
||||
$evacuate_param = " evacuate_delay=${evacuate_delay}"
|
||||
} else {
|
||||
$evacuate_param = ''
|
||||
}
|
||||
pacemaker::resource::ocf { 'nova-evacuate':
|
||||
ocf_agent_name => 'openstack:NovaEvacuate',
|
||||
# lint:ignore:140chars
|
||||
resource_params => "auth_url=${keystone_endpoint_url} username=${keystone_admin} password=${keystone_password} user_domain=${user_domain} project_domain=${project_domain} tenant_name=${keystone_admin} region_name=${region_name} ${iha_no_shared_storage}",
|
||||
resource_params => "auth_url=${keystone_endpoint_url} username=${keystone_admin} password=${keystone_password} user_domain=${user_domain} project_domain=${project_domain} tenant_name=${keystone_admin} region_name=${region_name} ${iha_no_shared_storage}${evacuate_param}",
|
||||
# lint:endignore
|
||||
tries => $pcs_tries,
|
||||
location_rule => {
|
||||
|
|
Loading…
Reference in New Issue