Merge "Do not use FQDN during upgrade"
This commit is contained in:
commit
63596262b5
|
@ -86,16 +86,31 @@ class openstack::barbican::service (
|
|||
}
|
||||
}
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
#use FQDN after bootstrap completed
|
||||
if (str2bool($::is_bootstrap_completed) or
|
||||
$fqdn_ready) {
|
||||
if ($fqdn_ready) {
|
||||
$api_fqdn = $controller_fqdn
|
||||
$api_host = $controller_fqdn
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Returns true is this is the initial config for this node
|
||||
|
||||
Facter.add("is_upgrade_do_not_use_fqdn") do
|
||||
setcode do
|
||||
File.exist?('/etc/platform/.upgrade_do_not_use_fqdn')
|
||||
end
|
||||
end
|
||||
|
|
@ -9,23 +9,7 @@ class platform::amqp::params (
|
|||
$protocol = 'tcp',
|
||||
$ssl_enabled = false,
|
||||
) {
|
||||
include ::platform::params
|
||||
include ::platform::network::mgmt::params
|
||||
|
||||
$system_mode = $::platform::params::system_mode
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
if (str2bool($::is_bootstrap_completed) or $fqdn_ready) {
|
||||
$transport_url = "rabbit://${auth_user}:${auth_password}@${host}:${port}"
|
||||
} else {
|
||||
$transport_url = "rabbit://${auth_user}:${auth_password}@${host_url}:${port}"
|
||||
}
|
||||
$transport_url = "rabbit://${auth_user}:${auth_password}@${host_url}:${port}"
|
||||
}
|
||||
|
||||
class platform::amqp::rabbitmq (
|
||||
|
|
|
@ -30,15 +30,34 @@ class platform::dcdbsync::api
|
|||
if $service_create {
|
||||
include ::platform::network::mgmt::params
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
include ::platform::params
|
||||
|
||||
$system_mode = $::platform::params::system_mode
|
||||
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
if (str2bool($::is_bootstrap_completed) or
|
||||
$fqdn_ready) {
|
||||
if ($fqdn_ready) {
|
||||
$api_host = $::platform::params::controller_fqdn
|
||||
} else {
|
||||
$api_host = $::platform::network::mgmt::params::controller_address
|
||||
|
@ -80,17 +99,34 @@ class platform::dcdbsync::stx_openstack::runtime
|
|||
if $service_create and
|
||||
$::platform::params::stx_openstack_applied {
|
||||
|
||||
include ::platform::network::mgmt::params
|
||||
include ::platform::params
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
$system_mode = $::platform::params::system_mode
|
||||
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
if (str2bool($::is_bootstrap_completed) or
|
||||
$fqdn_ready) {
|
||||
if ($fqdn_ready) {
|
||||
$api_host = $::platform::params::controller_fqdn
|
||||
} else {
|
||||
$api_host = $::platform::network::mgmt::params::controller_address
|
||||
|
|
|
@ -15,15 +15,32 @@ class platform::dcmanager::params (
|
|||
|
||||
include ::platform::network::mgmt::params
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
$system_mode = $::platform::params::system_mode
|
||||
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
if (str2bool($::is_bootstrap_completed) or
|
||||
$fqdn_ready) {
|
||||
if ($fqdn_ready) {
|
||||
$api_host = $::platform::params::controller_fqdn
|
||||
} else {
|
||||
$api_host = $::platform::network::mgmt::params::controller_address
|
||||
|
@ -42,15 +59,33 @@ class platform::dcmanager
|
|||
include ::dcmanager::db::postgresql
|
||||
}
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
$system_mode = $::platform::params::system_mode
|
||||
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
class { '::dcmanager':
|
||||
rabbit_host => (str2bool($::is_bootstrap_completed) or $fqdn_ready) ? {
|
||||
rabbit_host => (str2bool($fqdn_ready)) ? {
|
||||
true => $::platform::amqp::params::host,
|
||||
default => $::platform::amqp::params::host_url,
|
||||
},
|
||||
|
|
|
@ -22,15 +22,32 @@ class platform::dcorch::params (
|
|||
|
||||
include ::platform::network::mgmt::params
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
$system_mode = $::platform::params::system_mode
|
||||
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
if (str2bool($::is_bootstrap_completed) or
|
||||
$fqdn_ready) {
|
||||
if ($fqdn_ready) {
|
||||
$api_host = $::platform::params::controller_fqdn
|
||||
} else {
|
||||
$api_host = $::platform::network::mgmt::params::controller_address
|
||||
|
@ -49,15 +66,33 @@ class platform::dcorch
|
|||
include ::dcorch::db::postgresql
|
||||
}
|
||||
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
$system_mode = $::platform::params::system_mode
|
||||
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
class { '::dcorch':
|
||||
rabbit_host => (str2bool($::is_bootstrap_completed) or $fqdn_ready) ? {
|
||||
rabbit_host => (str2bool($fqdn_ready)) ? {
|
||||
true => $::platform::amqp::params::host,
|
||||
default => $::platform::amqp::params::host_url,
|
||||
},
|
||||
|
|
|
@ -71,15 +71,30 @@ class platform::dockerdistribution::config
|
|||
include ::platform::dockerdistribution::registries
|
||||
|
||||
$system_mode = $::platform::params::system_mode
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
# FQDN can be used after:
|
||||
# - after the bootstrap for any installation
|
||||
# - mate controller uses FQDN if mgmt::params::fqdn_ready is present
|
||||
# mate controller can use FQDN before the bootstrap flag
|
||||
# - just AIO-SX can use FQDN during the an upgrade. For other installs
|
||||
# the active controller in older release can resolve the .internal FQDN
|
||||
# when the mate controller is updated to N+1 version
|
||||
if (!str2bool($::is_upgrade_do_not_use_fqdn) or $system_mode == 'simplex') {
|
||||
if (str2bool($::is_bootstrap_completed)) {
|
||||
$fqdn_ready = true
|
||||
} else {
|
||||
if ($::platform::network::mgmt::params::fqdn_ready != undef) {
|
||||
$fqdn_ready = $::platform::network::mgmt::params::fqdn_ready
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fqdn_ready = false
|
||||
}
|
||||
|
||||
if (str2bool($::is_bootstrap_completed) or
|
||||
$fqdn_ready == true) {
|
||||
if ($fqdn_ready == true) {
|
||||
$docker_registry_host = $::platform::params::controller_fqdn
|
||||
} else {
|
||||
$docker_registry_host = $::platform::network::mgmt::params::controller_address_url
|
||||
|
|
|
@ -160,6 +160,17 @@ class platform::network::addresses (
|
|||
}
|
||||
|
||||
|
||||
class platform::network::upgrade_fqdn_cleanup {
|
||||
# Remove this flag after the upgrade complete/abort
|
||||
# during the upgrade the controller-0 runs version X
|
||||
# and controller-1 runs version X+1
|
||||
# to use the FQDN the active controller must run dnsmasq
|
||||
# with the FQDN entries. It doesn't happen during an upgrade
|
||||
file {'/etc/platform/.upgrade_do_not_use_fqdn':
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
|
||||
# TODO(fcorream): update_platform_nfs_ip_references is just necessary to allow
|
||||
# an upgrade from StarlingX releases 6 or 7 to new releases.
|
||||
# remove this class when StarlingX rel. 6 or 7 are not being used anymore
|
||||
|
@ -535,3 +546,7 @@ class platform::network::routes::runtime {
|
|||
command => 'apply_network_config.sh --routes',
|
||||
}
|
||||
}
|
||||
|
||||
class platform::network::upgrade_fqdn_cleanup::runtime {
|
||||
include platform::network::upgrade_fqdn_cleanup
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue