diff options
73 files changed, 2125 insertions, 163 deletions
diff --git a/environments/external-loadbalancer-vip.yaml b/environments/external-loadbalancer-vip.yaml index 1cf59825..198892cd 100644 --- a/environments/external-loadbalancer-vip.yaml +++ b/environments/external-loadbalancer-vip.yaml @@ -10,6 +10,7 @@ resource_registry: OS::TripleO::Controller::Ports::StoragePort: ../network/ports/storage_from_pool.yaml OS::TripleO::Controller::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml OS::TripleO::Controller::Ports::TenantPort: ../network/ports/tenant_from_pool.yaml + OS::TripleO::Controller::Ports::ManagementPort: ../network/ports/management_from_pool.yaml parameter_defaults: # When using an external loadbalancer set the following in parameter_defaults @@ -34,4 +35,6 @@ parameter_defaults: - 172.16.3.253 tenant: - 172.16.0.253 + management: + - 172.16.4.253 EnableLoadBalancer: false diff --git a/environments/major-upgrade-script-delivery.yaml b/environments/major-upgrade-script-delivery.yaml new file mode 100644 index 00000000..ba128d84 --- /dev/null +++ b/environments/major-upgrade-script-delivery.yaml @@ -0,0 +1,11 @@ +parameter_defaults: + UpgradeLevelNovaCompute: liberty + +resource_registry: + OS::TripleO::Tasks::UpdateWorkflow: ../extraconfig/tasks/major_upgrade_script_delivery.yaml + OS::TripleO::Tasks::PackageUpdate: ../extraconfig/tasks/yum_update_noop.yaml + OS::TripleO::ControllerPostDeployment: OS::Heat::None + OS::TripleO::ComputePostDeployment: OS::Heat::None + OS::TripleO::ObjectStoragePostDeployment: OS::Heat::None + OS::TripleO::BlockStoragePostDeployment: OS::Heat::None + OS::TripleO::CephStoragePostDeployment: OS::Heat::None diff --git a/environments/net-bond-with-vlans-v6.yaml b/environments/net-bond-with-vlans-v6.yaml new file mode 100644 index 00000000..73dda3d9 --- /dev/null +++ b/environments/net-bond-with-vlans-v6.yaml @@ -0,0 +1,20 @@ +# This template configures each role to use a pair of bonded nics (nic2 and +# nic3) and configures an IP address on each relevant isolated network +# for each role, with IPv6 on the External network. This template assumes +# use of network-isolation-v6.yaml. +# +# FIXME: if/when we add functionality to heatclient to include heat +# environment files we should think about using it here to automatically +# include network-isolation-v6.yaml. +resource_registry: + OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/cinder-storage.yaml + OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/bond-with-vlans/compute.yaml + OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/bond-with-vlans/controller-v6.yaml + OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/swift-storage.yaml + OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/ceph-storage.yaml + +parameter_defaults: + # This sets 'external_network_bridge' in l3_agent.ini to an empty string + # so that external networks act like provider bridge networks (they + # will plug into br-int instead of br-ex) + NeutronExternalNetworkBridge: "''" diff --git a/environments/net-bond-with-vlans.yaml b/environments/net-bond-with-vlans.yaml index 9600fc7e..de8f8f74 100644 --- a/environments/net-bond-with-vlans.yaml +++ b/environments/net-bond-with-vlans.yaml @@ -12,10 +12,6 @@ resource_registry: OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/swift-storage.yaml OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/ceph-storage.yaml -# We use parameter_defaults instead of parameters here because Tuskar munges -# the names of top level and role level parameters with the role name and a -# version. Using parameter_defaults makes it such that if the parameter name is -# not defined in the template, we don't get an error. parameter_defaults: # This sets 'external_network_bridge' in l3_agent.ini to an empty string # so that external networks act like provider bridge networks (they diff --git a/environments/net-multiple-nics-v6.yaml b/environments/net-multiple-nics-v6.yaml new file mode 100644 index 00000000..a2bb0bba --- /dev/null +++ b/environments/net-multiple-nics-v6.yaml @@ -0,0 +1,13 @@ +# This template configures each role to use a separate NIC for +# each isolated network with IPv6 on the External network. +# This template assumes use of network-isolation.yaml. +# +# FIXME: if/when we add functionality to heatclient to include heat +# environment files we should think about using it here to automatically +# include network-isolation-v6.yaml. +resource_registry: + OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/multiple-nics/cinder-storage.yaml + OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/multiple-nics/compute.yaml + OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/multiple-nics/controller-v6.yaml + OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/multiple-nics/swift-storage.yaml + OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/multiple-nics/ceph-storage.yaml diff --git a/environments/net-single-nic-linux-bridge-with-vlans.yaml b/environments/net-single-nic-linux-bridge-with-vlans.yaml index d5f2ed62..fd80bb9b 100644 --- a/environments/net-single-nic-linux-bridge-with-vlans.yaml +++ b/environments/net-single-nic-linux-bridge-with-vlans.yaml @@ -12,10 +12,6 @@ resource_registry: OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/swift-storage.yaml OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/ceph-storage.yaml -# We use parameter_defaults instead of parameters here because Tuskar munges -# the names of top level and role level parameters with the role name and a -# version. Using parameter_defaults makes it such that if the parameter name is -# not defined in the template, we don't get an error. parameter_defaults: # This sets 'external_network_bridge' in l3_agent.ini to an empty string # so that external networks act like provider bridge networks (they diff --git a/environments/net-single-nic-with-vlans-v6.yaml b/environments/net-single-nic-with-vlans-v6.yaml new file mode 100644 index 00000000..8210bad3 --- /dev/null +++ b/environments/net-single-nic-with-vlans-v6.yaml @@ -0,0 +1,19 @@ +# This template configures each role to use Vlans on a single nic for +# each isolated network with IPv6 on the External network. +# This template assumes use of network-isolation.yaml. +# +# FIXME: if/when we add functionality to heatclient to include heat +# environment files we should think about using it here to automatically +# include network-isolation-v6.yaml. +resource_registry: + OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/cinder-storage.yaml + OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/single-nic-vlans/compute.yaml + OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/single-nic-vlans/controller-v6.yaml + OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/swift-storage.yaml + OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/ceph-storage.yaml + +parameter_defaults: + # This sets 'external_network_bridge' in l3_agent.ini to an empty string + # so that external networks act like provider bridge networks (they + # will plug into br-int instead of br-ex) + NeutronExternalNetworkBridge: "''" diff --git a/environments/net-single-nic-with-vlans.yaml b/environments/net-single-nic-with-vlans.yaml index bdfeadd3..a61bc6e1 100644 --- a/environments/net-single-nic-with-vlans.yaml +++ b/environments/net-single-nic-with-vlans.yaml @@ -12,10 +12,6 @@ resource_registry: OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/swift-storage.yaml OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/ceph-storage.yaml -# We use parameter_defaults instead of parameters here because Tuskar munges -# the names of top level and role level parameters with the role name and a -# version. Using parameter_defaults makes it such that if the parameter name is -# not defined in the template, we don't get an error. parameter_defaults: # This sets 'external_network_bridge' in l3_agent.ini to an empty string # so that external networks act like provider bridge networks (they diff --git a/environments/network-isolation-v6.yaml b/environments/network-isolation-v6.yaml new file mode 100644 index 00000000..d1d0818e --- /dev/null +++ b/environments/network-isolation-v6.yaml @@ -0,0 +1,51 @@ +# Enable the creation of IPv6 Neutron networks for isolated Overcloud +# traffic and configure each role to assign ports (related +# to that role) on these networks. +resource_registry: + OS::TripleO::Network::External: ../network/external_v6.yaml + OS::TripleO::Network::InternalApi: ../network/internal_api_v6.yaml + OS::TripleO::Network::StorageMgmt: ../network/storage_mgmt_v6.yaml + OS::TripleO::Network::Storage: ../network/storage_v6.yaml + # IPv4 until OVS and Neutron support IPv6 tunnel endpoints + OS::TripleO::Network::Tenant: ../network/tenant.yaml + + # Port assignments for the VIPs + OS::TripleO::Network::Ports::ExternalVipPort: ../network/ports/external_v6.yaml + OS::TripleO::Network::Ports::InternalApiVipPort: ../network/ports/internal_api_v6.yaml + OS::TripleO::Network::Ports::StorageVipPort: ../network/ports/storage_v6.yaml + OS::TripleO::Network::Ports::StorageMgmtVipPort: ../network/ports/storage_mgmt_v6.yaml + OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/vip_v6.yaml + + # Port assignments for the controller role + OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/external_v6.yaml + OS::TripleO::Controller::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml + OS::TripleO::Controller::Ports::StoragePort: ../network/ports/storage_v6.yaml + OS::TripleO::Controller::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml + OS::TripleO::Controller::Ports::TenantPort: ../network/ports/tenant.yaml + + # Port assignments for the compute role + OS::TripleO::Compute::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml + OS::TripleO::Compute::Ports::StoragePort: ../network/ports/storage_v6.yaml + OS::TripleO::Compute::Ports::TenantPort: ../network/ports/tenant.yaml + + # Port assignments for the ceph storage role + OS::TripleO::CephStorage::Ports::StoragePort: ../network/ports/storage_v6.yaml + OS::TripleO::CephStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml + + # Port assignments for the swift storage role + OS::TripleO::SwiftStorage::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml + OS::TripleO::SwiftStorage::Ports::StoragePort: ../network/ports/storage_v6.yaml + OS::TripleO::SwiftStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml + + # Port assignments for the block storage role + OS::TripleO::BlockStorage::Ports::InternalApiPort: ../network/ports/internal_api_v6.yaml + OS::TripleO::BlockStorage::Ports::StoragePort: ../network/ports/storage_v6.yaml + OS::TripleO::BlockStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_v6.yaml + +parameter_defaults: + # Enable IPv6 for Corosync. This is required when Corosync is using an IPv6 IP in the cluster. + CorosyncIPv6: True + # Enable IPv6 for MongoDB. This is required when MongoDB is using an IPv6 IP. + MongoDbIPv6: True + # Enable various IPv6 features in Nova. + NovaIPv6: True diff --git a/extraconfig/all_nodes/swap-partition.yaml b/extraconfig/all_nodes/swap-partition.yaml new file mode 100644 index 00000000..89a2adb0 --- /dev/null +++ b/extraconfig/all_nodes/swap-partition.yaml @@ -0,0 +1,90 @@ +heat_template_version: 2014-10-16 + +description: > + Extra config to add swap space to nodes. + +# Parameters passed from the parent template - note if you maintain +# out-of-tree templates they may require additional parameters if the +# in-tree templates add a new role. +parameters: + controller_servers: + type: json + compute_servers: + type: json + blockstorage_servers: + type: json + objectstorage_servers: + type: json + cephstorage_servers: + type: json + swap_partition_label: + type: string + description: Swap partition label + default: 'swap1' + + +resources: + + SwapConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: | + #!/bin/bash + set -eux + swap_partition=$(realpath /dev/disk/by-label/$swap_partition_label) + swapon $swap_partition + echo "$swap_partition swap swap defaults 0 0" >> /etc/fstab + inputs: + - name: swap_partition_label + description: Swap partition label + default: 'swap1' + + ControllerSwapDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + config: {get_resource: SwapConfig} + servers: {get_param: controller_servers} + input_values: + swap_partition_label: {get_param: swap_partition_label} + actions: ["CREATE"] + + ComputeSwapDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + config: {get_resource: SwapConfig} + servers: {get_param: compute_servers} + input_values: + swap_partition_label: {get_param: swap_partition_label} + actions: ["CREATE"] + + BlockStorageSwapDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + config: {get_resource: SwapConfig} + servers: {get_param: blockstorage_servers} + input_values: + swap_partition_label: {get_param: swap_partition_label} + actions: ["CREATE"] + + ObjectStorageSwapDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + config: {get_resource: SwapConfig} + servers: {get_param: objectstorage_servers} + input_values: + swap_partition_label: {get_param: swap_partition_label} + actions: ["CREATE"] + + CephStorageSwapDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + config: {get_resource: SwapConfig} + servers: {get_param: cephstorage_servers} + input_values: + swap_partition_label: {get_param: swap_partition_label} + actions: ["CREATE"] + +outputs: + config_identifier: + value: none diff --git a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration index cbbd6a1d..76fa63b4 100644 --- a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration +++ b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration @@ -13,6 +13,7 @@ fi opts= attach_opts= +sat5_opts= repos="repos --enable rhel-7-server-rpms" satellite_repo="rhel-7-server-rh-common-rpms" if [ -n "${REG_AUTO_ATTACH:-}" ]; then @@ -49,6 +50,7 @@ fi if [ -n "${REG_FORCE:-}" ]; then opts="$opts --force" + sat5_opts="$sat5_opts --force" fi if [ -n "${REG_SERVER_URL:-}" ]; then @@ -57,6 +59,7 @@ fi if [ -n "${REG_ACTIVATION_KEY:-}" ]; then opts="$opts --activationkey=$REG_ACTIVATION_KEY" + sat5_opts="$sat5_opts --activationkey=$REG_ACTIVATION_KEY" if [ -z "${REG_ORG:-}" ]; then echo "WARNING: REG_ACTIVATION_KEY set without REG_ORG." @@ -75,10 +78,12 @@ fi if [ -n "${REG_MACHINE_NAME:-}" ]; then opts="$opts --name $REG_MACHINE_NAME" + sat5_opts="$sat5_opts --profilename=$REG_MACHINE_NAME" fi if [ -n "${REG_ORG:-}" ]; then opts="$opts --org=$REG_ORG" + sat5_opts="$sat5_opts --systemorgid=$REG_ORG" fi if [ -n "${REG_REPOS:-}" ]; then @@ -91,6 +96,20 @@ if [ -n "${REG_TYPE:-}" ]; then opts="$opts --type=$REG_TYPE" fi +function detect_satellite_version { + ping_api=$REG_SAT_URL/katello/api/ping + if curl -k -s -D - -o /dev/null $ping_api | grep "200 OK"; then + echo Satellite 6 detected at $REG_SAT_URL + satellite_version=6 + elif curl -k -s -D - -o /dev/null $REG_SAT_URL/rhn/Login.do | grep "200 OK"; then + echo Satellite 5 detected at $REG_SAT_URL + satellite_version=5 + else + echo No Satellite detected at $REG_SAT_URL + exit 1 + fi +} + case "${REG_METHOD:-}" in portal) subscription-manager register $opts @@ -100,13 +119,21 @@ case "${REG_METHOD:-}" in subscription-manager $repos ;; satellite) - repos="$repos --enable ${satellite_repo}" - rpm -Uvh "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm" || true - subscription-manager register $opts - subscription-manager $repos - yum install -y katello-agent || true # needed for errata reporting to satellite6 - katello-package-upload - subscription-manager repos --disable ${satellite_repo} + detect_satellite_version + if [ "satellite_version" = "6" ]; then + repos="$repos --enable ${satellite_repo}" + rpm -Uvh "$REG_SAT_URL/pub/katello-ca-consumer-latest.noarch.rpm" || true + subscription-manager register $opts + subscription-manager $repos + yum install -y katello-agent || true # needed for errata reporting to satellite6 + katello-package-upload + subscription-manager repos --disable ${satellite_repo} + else + pushd /usr/share/rhn/ + curl -k -O $REG_SAT_URL/pub/RHN-ORG-TRUSTED-SSL-CERT + popd + rhnreg_ks --serverUrl=$REG_SAT_URL/XMLRPC $sat5_opts + fi ;; disable) echo "Disabling RHEL registration" diff --git a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-unregistration b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-unregistration index 1e72e0a6..916f97e3 100644 --- a/extraconfig/pre_deploy/rhel-registration/scripts/rhel-unregistration +++ b/extraconfig/pre_deploy/rhel-registration/scripts/rhel-unregistration @@ -7,6 +7,8 @@ case "${REG_METHOD:-}" in portal|satellite) # Allow unregistration to fail. # We don't want to fail stack deletes if unregistration fails. + # Note that this will be a no-op on satellite 5, which doesn't support + # unregistering from the cli. subscription-manager unregister || true subscription-manager clean || true ;; diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh index dcd4be95..bf2ee330 100755 --- a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh @@ -30,11 +30,7 @@ if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname) fi # Swift isn't controled by pacemaker -for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \ -openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \ -openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do - systemctl stop $S -done +systemctl_swift stop tstart=$(date +%s) while systemctl is-active pacemaker; do diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh index 0b92a3bb..10bea573 100755 --- a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh @@ -64,8 +64,4 @@ if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname) fi # Swift isn't controled by heat -for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \ -openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \ -openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do - systemctl start $S -done +systemctl_swift start diff --git a/extraconfig/tasks/major_upgrade_object_storage.sh b/extraconfig/tasks/major_upgrade_object_storage.sh new file mode 100644 index 00000000..0f6d091e --- /dev/null +++ b/extraconfig/tasks/major_upgrade_object_storage.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# This delivers the swift-storage upgrade script to be invoked as part of the tripleo +# major upgrade workflow. +# +set -eu + +UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh + +cat > $UPGRADE_SCRIPT << ENDOFCAT +### DO NOT MODIFY THIS FILE +### This file is automatically delivered to the swift-storage nodes as part of the +### tripleo upgrades workflow + + +function systemctl_swift { + action=$1 + for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \ + openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \ + openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do + systemctl $action $S + done +} + + +systemctl_swift stop + +yum -y update + +systemctl_swift start + + + +ENDOFCAT + +# ensure the permissions are OK +chmod 0755 $UPGRADE_SCRIPT + diff --git a/extraconfig/tasks/major_upgrade_pacemaker.yaml b/extraconfig/tasks/major_upgrade_pacemaker.yaml index 5a11bae9..b867d107 100644 --- a/extraconfig/tasks/major_upgrade_pacemaker.yaml +++ b/extraconfig/tasks/major_upgrade_pacemaker.yaml @@ -40,6 +40,7 @@ resources: params: UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute} - get_file: pacemaker_common_functions.sh + - get_file: major_upgrade_pacemaker_migrations.sh - get_file: major_upgrade_controller_pacemaker_1.sh ControllerPacemakerUpgradeDeployment_Step1: @@ -57,6 +58,7 @@ resources: list_join: - '' - - get_file: pacemaker_common_functions.sh + - get_file: major_upgrade_pacemaker_migrations.sh - get_file: major_upgrade_controller_pacemaker_2.sh ControllerPacemakerUpgradeDeployment_Step2: @@ -67,28 +69,3 @@ resources: config: {get_resource: ControllerPacemakerUpgradeConfig_Step2} input_values: {get_param: input_values} - ComputeDeliverUpgradeConfig_Step3: - type: OS::Heat::SoftwareConfig - properties: - group: script - config: - list_join: - - '' - - - str_replace: - template: | - #!/bin/bash - upgrade_level_nova_compute='UPGRADE_LEVEL_NOVA_COMPUTE' - params: - UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute} - - get_file: pacemaker_common_functions.sh - - get_file: major_upgrade_compute.sh - - ComputeDeliverUpgradeConfigDeployment_Step3: - type: OS::Heat::SoftwareDeploymentGroup - depends_on: ControllerPacemakerUpgradeDeployment_Step2 - properties: - servers: {get_param: compute_servers} - config: {get_resource: ComputeDeliverUpgradeConfig_Step3} - input_values: {get_param: input_values} - - diff --git a/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh b/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh new file mode 100644 index 00000000..7fd26945 --- /dev/null +++ b/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Special pieces of upgrade migration logic go into this +# file. E.g. Pacemaker cluster transitions for existing deployments, +# matching changes to overcloud_controller_pacemaker.pp (Puppet +# handles deployment, this file handles migrations). +# +# This file shouldn't execute any action on its own, all logic should +# be wrapped into bash functions. Upgrade scripts will source this +# file and call the functions defined in this file where appropriate. +# +# The migration functions should be idempotent. If the migration has +# been already applied, it should be possible to call the function +# again without damaging the deployment or failing the upgrade. diff --git a/extraconfig/tasks/major_upgrade_script_delivery.yaml b/extraconfig/tasks/major_upgrade_script_delivery.yaml new file mode 100644 index 00000000..f7faa7fc --- /dev/null +++ b/extraconfig/tasks/major_upgrade_script_delivery.yaml @@ -0,0 +1,65 @@ +heat_template_version: 2014-10-16 +description: 'Upgrade for Pacemaker deployments' + +parameters: + + controller_servers: + type: json + compute_servers: + type: json + blockstorage_servers: + type: json + objectstorage_servers: + type: json + cephstorage_servers: + type: json + input_values: + type: json + description: input values for the software deployments + + UpgradeLevelNovaCompute: + type: string + description: Nova Compute upgrade level + default: '' + +resources: + # TODO(jistr): for Mitaka->Newton upgrades and further we can use + # map_merge with input_values instead of feeding params into scripts + # via str_replace on bash snippets + + ComputeDeliverUpgradeScriptConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: + list_join: + - '' + - - str_replace: + template: | + #!/bin/bash + upgrade_level_nova_compute='UPGRADE_LEVEL_NOVA_COMPUTE' + params: + UPGRADE_LEVEL_NOVA_COMPUTE: {get_param: UpgradeLevelNovaCompute} + - get_file: major_upgrade_compute.sh + + ComputeDeliverUpgradeScriptDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + servers: {get_param: compute_servers} + config: {get_resource: ComputeDeliverUpgradeScriptConfig} + input_values: {get_param: input_values} + + + ObjectStoreDeliverUpgradeScriptConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: {get_file: major_upgrade_object_storage.sh} + + ObjectStoreDeliverUpgradeScriptDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + servers: {get_param: objectstorage_servers} + config: {get_resource: ObjectStoreDeliverUpgradeScriptConfig} + input_values: {get_param: input_values} + diff --git a/extraconfig/tasks/pacemaker_common_functions.sh b/extraconfig/tasks/pacemaker_common_functions.sh index 32d06c4a..ee3216e4 100755 --- a/extraconfig/tasks/pacemaker_common_functions.sh +++ b/extraconfig/tasks/pacemaker_common_functions.sh @@ -37,3 +37,12 @@ function check_resource { function echo_error { echo "$@" | tee /dev/fd2 } + +function systemctl_swift { + action=$1 + for S in openstack-swift-account-auditor openstack-swift-account-reaper openstack-swift-account-replicator openstack-swift-account \ + openstack-swift-container-auditor openstack-swift-container-replicator openstack-swift-container-updater openstack-swift-container \ + openstack-swift-object-auditor openstack-swift-object-replicator openstack-swift-object-updater openstack-swift-object openstack-swift-proxy; do + systemctl $action $S + done +} diff --git a/network/config/bond-with-vlans/controller-v6.yaml b/network/config/bond-with-vlans/controller-v6.yaml new file mode 100644 index 00000000..7869ebfc --- /dev/null +++ b/network/config/bond-with-vlans/controller-v6.yaml @@ -0,0 +1,180 @@ +heat_template_version: 2015-04-30 + +description: > + Software Config to drive os-net-config with 2 bonded nics on a bridge + with VLANs attached for the controller role with IPv6 on the External + network. The IPv6 default route is on the External network, and the + IPv4 default route is on the Control Plane. + +parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string + ExternalIpSubnet: + default: '' + description: IP address/subnet on the external network + type: string + InternalApiIpSubnet: + default: '' + description: IP address/subnet on the internal API network + type: string + StorageIpSubnet: + default: '' + description: IP address/subnet on the storage network + type: string + StorageMgmtIpSubnet: + default: '' + description: IP address/subnet on the storage mgmt network + type: string + TenantIpSubnet: + default: '' + description: IP address/subnet on the tenant network + type: string + ManagementIpSubnet: # Only populated when including environments/network-management.yaml + default: '' + description: IP address/subnet on the management network + type: string + BondInterfaceOvsOptions: + default: 'bond_mode=active-backup' + description: The ovs_options string for the bond interface. Set things like + lacp=active and/or bond_mode=balance-slb using this option. + type: string + ExternalNetworkVlanID: + default: 10 + description: Vlan ID for the external network traffic. + type: number + InternalApiNetworkVlanID: + default: 20 + description: Vlan ID for the internal_api network traffic. + type: number + StorageNetworkVlanID: + default: 30 + description: Vlan ID for the storage network traffic. + type: number + StorageMgmtNetworkVlanID: + default: 40 + description: Vlan ID for the storage mgmt network traffic. + type: number + TenantNetworkVlanID: + default: 50 + description: Vlan ID for the tenant network traffic. + type: number + ManagementNetworkVlanID: + default: 60 + description: Vlan ID for the management network traffic. + type: number + ExternalInterfaceDefaultRoute: + default: '10.0.0.1' + description: default route for the external network + type: string + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + type: comma_delimited_list + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string + +resources: + OsNetConfigImpl: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + os_net_config: + network_config: + - + type: interface + name: nic1 + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + - + type: ovs_bridge + name: {get_input: bridge_name} + dns_servers: {get_param: DnsServers} + members: + - + type: ovs_bond + name: bond1 + ovs_options: {get_param: BondInterfaceOvsOptions} + members: + - + type: interface + name: nic2 + primary: true + - + type: interface + name: nic3 + - + type: vlan + device: bond1 + vlan_id: {get_param: ExternalNetworkVlanID} + addresses: + - + ip_netmask: {get_param: ExternalIpSubnet} + routes: + - + default: true + next_hop: {get_param: ExternalInterfaceDefaultRoute} + - + type: vlan + device: bond1 + vlan_id: {get_param: InternalApiNetworkVlanID} + addresses: + - + ip_netmask: {get_param: InternalApiIpSubnet} + - + type: vlan + device: bond1 + vlan_id: {get_param: StorageNetworkVlanID} + addresses: + - + ip_netmask: {get_param: StorageIpSubnet} + - + type: vlan + device: bond1 + vlan_id: {get_param: StorageMgmtNetworkVlanID} + addresses: + - + ip_netmask: {get_param: StorageMgmtIpSubnet} + - + type: vlan + device: bond1 + vlan_id: {get_param: TenantNetworkVlanID} + addresses: + - + ip_netmask: {get_param: TenantIpSubnet} + # Uncomment when including environments/network-management.yaml + #- + # type: vlan + # device: bond1 + # vlan_id: {get_param: ManagementNetworkVlanID} + # addresses: + # - + # ip_netmask: {get_param: ManagementIpSubnet} + +outputs: + OS::stack_id: + description: The OsNetConfigImpl resource. + value: {get_resource: OsNetConfigImpl} diff --git a/network/config/multiple-nics/controller-v6.yaml b/network/config/multiple-nics/controller-v6.yaml new file mode 100644 index 00000000..b69879fb --- /dev/null +++ b/network/config/multiple-nics/controller-v6.yaml @@ -0,0 +1,174 @@ +heat_template_version: 2015-04-30 + +description: > + Software Config to drive os-net-config to configure multiple interfaces + for the controller role with IPv6 on the External network. The IPv6 + default route is on the External network, and the IPv4 default route + is on the Control Plane. + +parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string + ExternalIpSubnet: + default: '' + description: IP address/subnet on the external network + type: string + InternalApiIpSubnet: + default: '' + description: IP address/subnet on the internal API network + type: string + StorageIpSubnet: + default: '' + description: IP address/subnet on the storage network + type: string + StorageMgmtIpSubnet: + default: '' + description: IP address/subnet on the storage mgmt network + type: string + TenantIpSubnet: + default: '' + description: IP address/subnet on the tenant network + type: string + ManagementIpSubnet: # Only populated when including environments/network-management.yaml + default: '' + description: IP address/subnet on the management network + type: string + ExternalNetworkVlanID: + default: 10 + description: Vlan ID for the external network traffic. + type: number + InternalApiNetworkVlanID: + default: 20 + description: Vlan ID for the internal_api network traffic. + type: number + StorageNetworkVlanID: + default: 30 + description: Vlan ID for the storage network traffic. + type: number + StorageMgmtNetworkVlanID: + default: 40 + description: Vlan ID for the storage mgmt network traffic. + type: number + TenantNetworkVlanID: + default: 50 + description: Vlan ID for the tenant network traffic. + type: number + ManagementNetworkVlanID: + default: 60 + description: Vlan ID for the management network traffic. + type: number + ExternalInterfaceDefaultRoute: + default: '10.0.0.1' + description: default route for the external network + type: string + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + type: comma_delimited_list + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string + +resources: + OsNetConfigImpl: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + os_net_config: + network_config: + - + type: interface + name: nic1 + use_dhcp: false + dns_servers: {get_param: DnsServers} + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + - + type: interface + name: nic2 + use_dhcp: false + addresses: + - + ip_netmask: {get_param: StorageIpSubnet} + - + type: interface + name: nic3 + use_dhcp: false + addresses: + - + ip_netmask: {get_param: StorageMgmtIpSubnet} + - + type: interface + name: nic4 + use_dhcp: false + addresses: + - + ip_netmask: {get_param: InternalApiIpSubnet} + - + # Create a bridge which can also be used for VLAN-mode bridge mapping + type: ovs_bridge + name: br-tenant + use_dhcp: false + addresses: + - + ip_netmask: {get_param: TenantIpSubnet} + members: + - + type: interface + name: nic5 + use_dhcp: false + # force the MAC address of the bridge to this interface + primary: true + - + type: ovs_bridge + name: {get_input: bridge_name} + dns_servers: {get_param: DnsServers} + use_dhcp: false + addresses: + - + ip_netmask: {get_param: ExternalIpSubnet} + routes: + - + default: true + next_hop: {get_param: ExternalInterfaceDefaultRoute} + members: + - + type: interface + name: nic6 + # force the MAC address of the bridge to this interface + primary: true + # Uncomment when including environments/network-management.yaml + #- + # type: interface + # name: nic7 + # use_dhcp: false + # addresses: + # - + # ip_netmask: {get_param: ManagementIpSubnet} + +outputs: + OS::stack_id: + description: The OsNetConfigImpl resource. + value: {get_resource: OsNetConfigImpl} diff --git a/network/config/single-nic-vlans/controller-v6.yaml b/network/config/single-nic-vlans/controller-v6.yaml new file mode 100644 index 00000000..472e539d --- /dev/null +++ b/network/config/single-nic-vlans/controller-v6.yaml @@ -0,0 +1,158 @@ +heat_template_version: 2015-04-30 + +description: > + Software Config to drive os-net-config to configure VLANs for the + controller role with IPv6 on the External network. The IPv6 default + route is on the External network, and the IPv4 default route is on + the Control Plane. + +parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string + ExternalIpSubnet: + default: '' + description: IP address/subnet on the external network + type: string + InternalApiIpSubnet: + default: '' + description: IP address/subnet on the internal API network + type: string + StorageIpSubnet: + default: '' + description: IP address/subnet on the storage network + type: string + StorageMgmtIpSubnet: + default: '' + description: IP address/subnet on the storage mgmt network + type: string + TenantIpSubnet: + default: '' + description: IP address/subnet on the tenant network + type: string + ManagementIpSubnet: # Only populated when including environments/network-management.yaml + default: '' + description: IP address/subnet on the management network + type: string + ExternalNetworkVlanID: + default: 10 + description: Vlan ID for the external network traffic. + type: number + InternalApiNetworkVlanID: + default: 20 + description: Vlan ID for the internal_api network traffic. + type: number + StorageNetworkVlanID: + default: 30 + description: Vlan ID for the storage network traffic. + type: number + StorageMgmtNetworkVlanID: + default: 40 + description: Vlan ID for the storage mgmt network traffic. + type: number + TenantNetworkVlanID: + default: 50 + description: Vlan ID for the tenant network traffic. + type: number + ManagementNetworkVlanID: + default: 60 + description: Vlan ID for the management network traffic. + type: number + ExternalInterfaceDefaultRoute: + default: '10.0.0.1' + description: default route for the external network + type: string + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + type: comma_delimited_list + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string + +resources: + OsNetConfigImpl: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + os_net_config: + network_config: + - + type: ovs_bridge + name: {get_input: bridge_name} + use_dhcp: false + dns_servers: {get_param: DnsServers} + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + members: + - + type: interface + name: nic1 + # force the MAC address of the bridge to this interface + primary: true + - + type: vlan + vlan_id: {get_param: ExternalNetworkVlanID} + addresses: + - + ip_netmask: {get_param: ExternalIpSubnet} + routes: + - + default: true + next_hop: {get_param: ExternalInterfaceDefaultRoute} + - + type: vlan + vlan_id: {get_param: InternalApiNetworkVlanID} + addresses: + - + ip_netmask: {get_param: InternalApiIpSubnet} + - + type: vlan + vlan_id: {get_param: StorageNetworkVlanID} + addresses: + - + ip_netmask: {get_param: StorageIpSubnet} + - + type: vlan + vlan_id: {get_param: StorageMgmtNetworkVlanID} + addresses: + - + ip_netmask: {get_param: StorageMgmtIpSubnet} + - + type: vlan + vlan_id: {get_param: TenantNetworkVlanID} + addresses: + - + ip_netmask: {get_param: TenantIpSubnet} + #- # Uncomment when including environments/network-management.yaml + # type: vlan + # vlan_id: {get_param: ManagementNetworkVlanID} + # addresses: + # - + # ip_netmask: {get_param: ManagementIpSubnet} + +outputs: + OS::stack_id: + description: The OsNetConfigImpl resource. + value: {get_resource: OsNetConfigImpl} diff --git a/network/config/single-nic-vlans/controller.yaml b/network/config/single-nic-vlans/controller.yaml index 3b22b36b..a5a0745d 100644 --- a/network/config/single-nic-vlans/controller.yaml +++ b/network/config/single-nic-vlans/controller.yaml @@ -111,7 +111,7 @@ resources: ip_netmask: {get_param: ExternalIpSubnet} routes: - - ip_netmask: 0.0.0.0/0 + default: true next_hop: {get_param: ExternalInterfaceDefaultRoute} - type: vlan diff --git a/network/endpoints/build_endpoint_map.py b/network/endpoints/build_endpoint_map.py index 056d6889..d8cdee3d 100755 --- a/network/endpoints/build_endpoint_map.py +++ b/network/endpoints/build_endpoint_map.py @@ -173,7 +173,10 @@ def template_endpoint_items(config): def generate_endpoint_map_template(config): return collections.OrderedDict([ ('heat_template_version', '2015-04-30'), - ('description', 'A map of OpenStack endpoints.'), + ('description', 'A map of OpenStack endpoints. Since the endpoints ' + 'are URLs, we need to have brackets around IPv6 IP addresses. The ' + 'inputs to these parameters come from net_ip_uri_map, which will ' + 'include these brackets in IPv6 addresses.'), ('parameters', template_parameters(config)), ('outputs', { 'endpoint_map': { diff --git a/network/endpoints/endpoint_data.yaml b/network/endpoints/endpoint_data.yaml index 9d508d18..7a0bbf4a 100644 --- a/network/endpoints/endpoint_data.yaml +++ b/network/endpoints/endpoint_data.yaml @@ -122,17 +122,17 @@ Nova: Internal: vip_param: NovaApi uri_suffixes: - '': /v2/%(tenant_id)s + '': /v2.1/%(tenant_id)s V3: /v3 Public: vip_param: Public uri_suffixes: - '': /v2/%(tenant_id)s + '': /v2.1/%(tenant_id)s V3: /v3 Admin: vip_param: NovaApi uri_suffixes: - '': /v2/%(tenant_id)s + '': /v2.1/%(tenant_id)s V3: /v3 port: 8774 diff --git a/network/endpoints/endpoint_map.yaml b/network/endpoints/endpoint_map.yaml index e9f97fa1..a31094a1 100644 --- a/network/endpoints/endpoint_map.yaml +++ b/network/endpoints/endpoint_map.yaml @@ -3,7 +3,10 @@ ### by the script build_endpoint_map.py heat_template_version: '2015-04-30' -description: A map of OpenStack endpoints. +description: A map of OpenStack endpoints. Since the endpoints are URLs, + we need to have brackets around IPv6 IP addresses. The inputs to these + parameters come from net_ip_uri_map, which will include these brackets + in IPv6 addresses. parameters: CeilometerApiVirtualIP: {type: string, default: ''} CinderApiVirtualIP: {type: string, default: ''} @@ -1212,7 +1215,7 @@ outputs: IP_ADDRESS: {get_param: NovaApiVirtualIP} - ':' - get_param: [EndpointMap, NovaAdmin, port] - - /v2/%(tenant_id)s + - /v2.1/%(tenant_id)s uri_no_suffix: list_join: - '' @@ -1251,7 +1254,7 @@ outputs: IP_ADDRESS: {get_param: NovaApiVirtualIP} - ':' - get_param: [EndpointMap, NovaInternal, port] - - /v2/%(tenant_id)s + - /v2.1/%(tenant_id)s uri_no_suffix: list_join: - '' @@ -1290,7 +1293,7 @@ outputs: IP_ADDRESS: {get_param: PublicVirtualIP} - ':' - get_param: [EndpointMap, NovaPublic, port] - - /v2/%(tenant_id)s + - /v2.1/%(tenant_id)s uri_no_suffix: list_join: - '' diff --git a/network/external_v6.yaml b/network/external_v6.yaml new file mode 100644 index 00000000..3e120f24 --- /dev/null +++ b/network/external_v6.yaml @@ -0,0 +1,69 @@ +heat_template_version: 2015-04-30 + +description: > + External network. Public traffic, Neutron l3router for floating IPs/SNAT, etc. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + ExternalNetCidr: + # OpenStack uses the EUI-64 address format, which requires a /64 prefix + default: '2001:db8:fd00:1000::/64' + description: Cidr for the external network. + type: string + ExternalNetValueSpecs: + default: {'provider:physical_network': 'external', 'provider:network_type': 'flat'} + description: Value specs for the external network. + type: json + ExternalNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + ExternalNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + ExternalNetName: + default: external + description: The name of the external network. + type: string + ExternalSubnetName: + default: external_subnet + description: The name of the external subnet in Neutron. + type: string + ExternalAllocationPools: + default: [{'start': '2001:db8:fd00:1000::10', 'end': '2001:db8:fd00:1000:ffff:ffff:ffff:fffe'}] + description: Ip allocation pool range for the external network. + type: json + IPv6AddressMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 address mode + type: string + IPv6RAMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 router advertisement mode + type: string + +resources: + ExternalNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: ExternalNetAdminStateUp} + name: {get_param: ExternalNetName} + shared: {get_param: ExternalNetShared} + value_specs: {get_param: ExternalNetValueSpecs} + + ExternalSubnet: + type: OS::Neutron::Subnet + properties: + ip_version: 6 + ipv6_address_mode: {get_param: IPv6AddressMode} + ipv6_ra_mode: {get_param: IPv6RAMode} + cidr: {get_param: ExternalNetCidr} + name: {get_param: ExternalSubnetName} + network: {get_resource: ExternalNetwork} + allocation_pools: {get_param: ExternalAllocationPools} + +outputs: + OS::stack_id: + description: Neutron external network + value: {get_resource: ExternalNetwork} diff --git a/network/internal_api_v6.yaml b/network/internal_api_v6.yaml new file mode 100644 index 00000000..68c14fbe --- /dev/null +++ b/network/internal_api_v6.yaml @@ -0,0 +1,69 @@ +heat_template_version: 2015-04-30 + +description: > + Internal API network. Used for most APIs, Database, RPC. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + InternalApiNetCidr: + # OpenStack uses the EUI-64 address format, which requires a /64 prefix + default: 'fd00:fd00:fd00:2000::/64' + description: Cidr for the internal API network. + type: string + InternalApiNetValueSpecs: + default: {'provider:physical_network': 'internal_api', 'provider:network_type': 'flat'} + description: Value specs for the internal API network. + type: json + InternalApiNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + InternalApiNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + InternalApiNetName: + default: internal_api + description: The name of the internal API network. + type: string + InternalApiSubnetName: + default: internal_api_subnet + description: The name of the internal API subnet in Neutron. + type: string + InternalApiAllocationPools: + default: [{'start': 'fd00:fd00:fd00:2000::10', 'end': 'fd00:fd00:fd00:2000:ffff:ffff:ffff:fffe'}] + description: Ip allocation pool range for the internal API network. + type: json + IPv6AddressMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 address mode + type: string + IPv6RAMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 router advertisement mode + type: string + +resources: + InternalApiNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: InternalApiNetAdminStateUp} + name: {get_param: InternalApiNetName} + shared: {get_param: InternalApiNetShared} + value_specs: {get_param: InternalApiNetValueSpecs} + + InternalApiSubnet: + type: OS::Neutron::Subnet + properties: + ip_version: 6 + ipv6_address_mode: {get_param: IPv6AddressMode} + ipv6_ra_mode: {get_param: IPv6RAMode} + cidr: {get_param: InternalApiNetCidr} + name: {get_param: InternalApiSubnetName} + network: {get_resource: InternalApiNetwork} + allocation_pools: {get_param: InternalApiAllocationPools} + +outputs: + OS::stack_id: + description: Neutron internal network + value: {get_resource: InternalApiNetwork} diff --git a/network/ports/ctlplane_vip.yaml b/network/ports/ctlplane_vip.yaml index 1d8b2916..5ac7d344 100644 --- a/network/ports/ctlplane_vip.yaml +++ b/network/ports/ctlplane_vip.yaml @@ -45,6 +45,9 @@ outputs: ip_address: description: Virtual IP network IP value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: Virtual IP network IP (for compatibility with vip_v6.yaml) + value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the ctlplane network. value: diff --git a/network/ports/external.yaml b/network/ports/external.yaml index df12cc80..c4f815fb 100644 --- a/network/ports/external.yaml +++ b/network/ports/external.yaml @@ -48,6 +48,9 @@ outputs: ip_address: description: external network IP value: {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: external network IP (for compatibility with external_v6.yaml) + value: {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the external network IP value: diff --git a/network/ports/external_from_pool.yaml b/network/ports/external_from_pool.yaml index 5e61683a..98f2aa35 100644 --- a/network/ports/external_from_pool.yaml +++ b/network/ports/external_from_pool.yaml @@ -33,6 +33,9 @@ outputs: ip_address: description: external network IP value: {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: external network IP (for compatibility with IPv6) + value: {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]} ip_subnet: description: IP/Subnet CIDR for the external network IP value: diff --git a/network/ports/external_v6.yaml b/network/ports/external_v6.yaml new file mode 100644 index 00000000..522caaa0 --- /dev/null +++ b/network/ports/external_v6.yaml @@ -0,0 +1,68 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the external network. The IP address will be chosen + automatically if FixedIPs is empty. + +parameters: + ExternalNetName: + description: Name of the external neutron network + default: external + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + ControlPlaneNetwork: # Here for compatibility with ctlplane_vip.yaml + description: The name of the undercloud Neutron control plane + default: ctlplane + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + ExternalPort: + type: OS::Neutron::Port + properties: + network: {get_param: ExternalNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: external network IP + value: {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: external network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the external network IP + value: + list_join: + - '' + - - {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [ExternalPort, subnets, 0, cidr, -2]} + - {get_attr: [ExternalPort, subnets, 0, cidr, -1]} diff --git a/network/ports/from_service.yaml b/network/ports/from_service.yaml index 6b669f41..359d77a7 100644 --- a/network/ports/from_service.yaml +++ b/network/ports/from_service.yaml @@ -32,3 +32,6 @@ outputs: ip_address: description: network IP value: {get_param: [ServiceVips, {get_param: ServiceName}]} + ip_address_uri: + description: network IP (for compatibility with IPv6) + value: {get_param: [ServiceVips, {get_param: ServiceName}]} diff --git a/network/ports/internal_api.yaml b/network/ports/internal_api.yaml index 4039f9d7..1d521a8d 100644 --- a/network/ports/internal_api.yaml +++ b/network/ports/internal_api.yaml @@ -43,6 +43,10 @@ outputs: ip_address: description: internal API network IP value: {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: | + internal API network IP (for compatibility with internal_api_v6.yaml) + value: {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the internal API network IP value: diff --git a/network/ports/internal_api_from_pool.yaml b/network/ports/internal_api_from_pool.yaml index 18ccd2b2..c7b04847 100644 --- a/network/ports/internal_api_from_pool.yaml +++ b/network/ports/internal_api_from_pool.yaml @@ -33,6 +33,9 @@ outputs: ip_address: description: internal API network IP value: {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: internal API network IP (for compatibility with internal_api_v6.yaml) + value: {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]} ip_subnet: description: IP/Subnet CIDR for the internal API network IP value: diff --git a/network/ports/internal_api_v6.yaml b/network/ports/internal_api_v6.yaml new file mode 100644 index 00000000..279e6bd0 --- /dev/null +++ b/network/ports/internal_api_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the internal_api network. + +parameters: + InternalApiNetName: + description: Name of the internal API neutron network + default: internal_api + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + InternalApiPort: + type: OS::Neutron::Port + properties: + network: {get_param: InternalApiNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: internal API network IP + value: {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: internal api network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the internal API network IP + value: + list_join: + - '' + - - {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [InternalApiPort, subnets, 0, cidr, -2]} + - {get_attr: [InternalApiPort, subnets, 0, cidr, -1]} diff --git a/network/ports/management.yaml b/network/ports/management.yaml index 20c1b853..967b66e1 100644 --- a/network/ports/management.yaml +++ b/network/ports/management.yaml @@ -16,6 +16,12 @@ parameters: ControlPlaneIP: # Here for compatibility with noop.yaml description: IP address on the control plane type: string + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number resources: @@ -30,6 +36,9 @@ outputs: ip_address: description: management network IP value: {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: management network IP (for compatibility with management_v6.yaml) + value: {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the management network IP value: diff --git a/network/ports/management_from_pool.yaml b/network/ports/management_from_pool.yaml new file mode 100644 index 00000000..fc87e39a --- /dev/null +++ b/network/ports/management_from_pool.yaml @@ -0,0 +1,46 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a network mapped list of IPs + +parameters: + ManagementNetName: + description: Name of the management network + default: management + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + IPPool: + default: {} + description: A network mapped list of IPs + type: json + NodeIndex: + default: 0 + description: Index of the IP to get from Pool + type: number + ManagementNetCidr: + default: '172.16.4.0/24' + description: Cidr for the management network. + type: string + +outputs: + ip_address: + description: management network IP + value: {get_param: [IPPool, {get_param: ManagementNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: management network IP (for compatibility with management_v6.yaml) + value: {get_param: [IPPool, {get_param: ManagementNetName}, {get_param: NodeIndex}]} + ip_subnet: + description: IP/Subnet CIDR for the management network IP + value: + list_join: + - '' + - - {get_param: [IPPool, {get_param: ManagementNetName}, {get_param: NodeIndex}]} + - '/' + - {str_split: ['/', {get_param: ManagementNetCidr}, 1]} diff --git a/network/ports/management_v6.yaml b/network/ports/management_v6.yaml new file mode 100644 index 00000000..a94ebc7b --- /dev/null +++ b/network/ports/management_v6.yaml @@ -0,0 +1,54 @@ +heat_template_version: 2015-10-15 + +description: > + Creates a port on the management network. The IP address will be chosen + automatically if FixedIPs is empty. + +parameters: + ManagementNetName: + description: Name of the management neutron network + default: management + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatibility with noop.yaml + description: IP address on the control plane + type: string + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + ManagementPort: + type: OS::Neutron::Port + properties: + network: {get_param: ManagementNetName} + name: {get_param: PortName} + replacement_policy: AUTO + +outputs: + ip_address: + description: management network IP + value: {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: management network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + description: IP/Subnet CIDR for the management network IP + value: + list_join: + - '' + - - {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + - '/' + - {str_split: ['/', {get_attr: [ManagementPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/net_ip_map.yaml b/network/ports/net_ip_map.yaml index c6386025..6bb4557b 100644 --- a/network/ports/net_ip_map.yaml +++ b/network/ports/net_ip_map.yaml @@ -7,21 +7,45 @@ parameters: ExternalIp: default: '' type: string + ExternalIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 InternalApiIp: default: '' type: string + InternalApiIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 StorageIp: default: '' type: string + StorageIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 StorageMgmtIp: default: '' type: string + StorageMgmtIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 TenantIp: default: '' type: string + TenantIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 ManagementIp: default: '' type: string + ManagementIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 outputs: net_ip_map: @@ -36,3 +60,15 @@ outputs: storage_mgmt: {get_param: StorageMgmtIp} tenant: {get_param: TenantIp} management: {get_param: ManagementIp} + net_ip_uri_map: + description: > + A Hash containing a mapping of netowrk names to assigned IPs for a + specific machine with brackets around IPv6 addresses for use in URLs. + value: + ctlplane: {get_param: ControlPlaneIp} + external: {get_param: ExternalIpUri} + internal_api: {get_param: InternalApiIpUri} + storage: {get_param: StorageIpUri} + storage_mgmt: {get_param: StorageMgmtIpUri} + tenant: {get_param: TenantIpUri} + management: {get_param: ManagementIpUri} diff --git a/network/ports/net_vip_map_external.yaml b/network/ports/net_vip_map_external.yaml index 23e1f992..a40a0bfc 100644 --- a/network/ports/net_vip_map_external.yaml +++ b/network/ports/net_vip_map_external.yaml @@ -24,18 +24,33 @@ parameters: ExternalIp: default: '' type: string + ExternalIpUri: + default: '' + type: string InternalApiIp: default: '' type: string + InternalApiIpUri: + default: '' + type: string StorageIp: default: '' type: string + StorageIpUri: + default: '' + type: string StorageMgmtIp: default: '' type: string + StorageMgmtIpUri: + default: '' + type: string TenantIp: default: '' type: string + TenantIpUri: + default: '' + type: string outputs: net_ip_map: @@ -48,3 +63,13 @@ outputs: internal_api: {get_param: InternalApiNetworkVip} storage: {get_param: StorageNetworkVip} storage_mgmt: {get_param: StorageMgmtNetworkVip} + net_ip_uri_map: + description: > + A Hash containing a mapping of netowrk names to assigned IPs for a + specific machine with brackets around IPv6 addresses for use in URLs. + value: + ctlplane: {get_param: ControlPlaneIP} + external: {get_param: ExternalNetworkVip} + internal_api: {get_param: InternalApiNetworkVip} + storage: {get_param: StorageNetworkVip} + storage_mgmt: {get_param: StorageMgmtNetworkVip} diff --git a/network/ports/noop.yaml b/network/ports/noop.yaml index ac946cd9..96c461e0 100644 --- a/network/ports/noop.yaml +++ b/network/ports/noop.yaml @@ -44,6 +44,9 @@ outputs: ip_address: description: pass thru network IP value: {get_param: ControlPlaneIP} + ip_address_uri: + description: pass thru network IP (for compatibility with vip_v6.yaml) + value: {get_param: ControlPlaneIP} ip_subnet: description: IP/Subnet CIDR for the pass thru network IP value: diff --git a/network/ports/storage.yaml b/network/ports/storage.yaml index 579554fb..1ed5cca1 100644 --- a/network/ports/storage.yaml +++ b/network/ports/storage.yaml @@ -43,6 +43,9 @@ outputs: ip_address: description: storage network IP value: {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: storage network IP (for compatibility with storage_v6.yaml) + value: {get_attr: [StoragePort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the storage network IP value: diff --git a/network/ports/storage_from_pool.yaml b/network/ports/storage_from_pool.yaml index 13c16c15..dfc9e752 100644 --- a/network/ports/storage_from_pool.yaml +++ b/network/ports/storage_from_pool.yaml @@ -33,6 +33,9 @@ outputs: ip_address: description: storage network IP value: {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: storage network IP (for compatibility with storage_v6.yaml) + value: {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]} ip_subnet: description: IP/Subnet CIDR for the storage network IP value: diff --git a/network/ports/storage_mgmt.yaml b/network/ports/storage_mgmt.yaml index f97e337b..548d226a 100644 --- a/network/ports/storage_mgmt.yaml +++ b/network/ports/storage_mgmt.yaml @@ -43,6 +43,10 @@ outputs: ip_address: description: storage_mgmt network IP value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: | + storage_mgmt network IP (for compatibility with storage_mgmt_v6.yaml) + value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the storage_mgmt network IP value: diff --git a/network/ports/storage_mgmt_from_pool.yaml b/network/ports/storage_mgmt_from_pool.yaml index 7c033ebd..9c757a6e 100644 --- a/network/ports/storage_mgmt_from_pool.yaml +++ b/network/ports/storage_mgmt_from_pool.yaml @@ -33,6 +33,9 @@ outputs: ip_address: description: storage MGMT network IP value: {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: storage MGMT network IP (for compatibility with storage_mgmt_v6.yaml) + value: {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]} ip_subnet: description: IP/Subnet CIDR for the storage MGMT network IP value: diff --git a/network/ports/storage_mgmt_v6.yaml b/network/ports/storage_mgmt_v6.yaml new file mode 100644 index 00000000..61956be2 --- /dev/null +++ b/network/ports/storage_mgmt_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the storage_mgmt API network. + +parameters: + StorageMgmtNetName: + description: Name of the storage_mgmt API neutron network + default: storage_mgmt + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + StorageMgmtPort: + type: OS::Neutron::Port + properties: + network: {get_param: StorageMgmtNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: storage_mgmt network IP + value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: storage_mgmt network IP with brackets suitable for a URI + value: + list_join: + - '' + - - '[' + - {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the storage_mgmt network IP + value: + list_join: + - '' + - - {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -2]} + - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -1]} diff --git a/network/ports/storage_v6.yaml b/network/ports/storage_v6.yaml new file mode 100644 index 00000000..13b62276 --- /dev/null +++ b/network/ports/storage_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the storage network. + +parameters: + StorageNetName: + description: Name of the storage neutron network + default: storage + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + StoragePort: + type: OS::Neutron::Port + properties: + network: {get_param: StorageNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: storage network IP + value: {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: storage network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the storage network IP + value: + list_join: + - '' + - - {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [StoragePort, subnets, 0, cidr, -2]} + - {get_attr: [StoragePort, subnets, 0, cidr, -1]} diff --git a/network/ports/tenant.yaml b/network/ports/tenant.yaml index cc0771ea..d8f78c49 100644 --- a/network/ports/tenant.yaml +++ b/network/ports/tenant.yaml @@ -43,6 +43,9 @@ outputs: ip_address: description: tenant network IP value: {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: tenant network IP (for compatibility with tenant_v6.yaml) + value: {get_attr: [TenantPort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the tenant network IP value: diff --git a/network/ports/tenant_from_pool.yaml b/network/ports/tenant_from_pool.yaml index 17e4ac8a..d5f3156e 100644 --- a/network/ports/tenant_from_pool.yaml +++ b/network/ports/tenant_from_pool.yaml @@ -33,6 +33,9 @@ outputs: ip_address: description: tenant network IP value: {get_param: [IPPool, {get_param: TenantNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: tenant network IP (for compatibility with tenant_v6.yaml) + value: {get_param: [IPPool, {get_param: TenantNetName}, {get_param: NodeIndex}]} ip_subnet: description: IP/Subnet CIDR for the tenant network IP value: diff --git a/network/ports/tenant_v6.yaml b/network/ports/tenant_v6.yaml new file mode 100644 index 00000000..6ca37549 --- /dev/null +++ b/network/ports/tenant_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the tenant network. + +parameters: + TenantNetName: + description: Name of the tenant neutron network + default: tenant + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + TenantPort: + type: OS::Neutron::Port + properties: + network: {get_param: TenantNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: tenant network IP + value: {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: tenant network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the tenant network IP + value: + list_join: + - '' + - - {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [TenantPort, subnets, 0, cidr, -2]} + - {get_attr: [TenantPort, subnets, 0, cidr, -1]} diff --git a/network/ports/vip.yaml b/network/ports/vip.yaml index fb251994..38322907 100644 --- a/network/ports/vip.yaml +++ b/network/ports/vip.yaml @@ -45,6 +45,9 @@ outputs: ip_address: description: Virtual IP network IP value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: Virtual IP network IP (for compatibility with vip.yaml) + value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} ip_subnet: description: IP/Subnet CIDR for the network associated with this IP value: diff --git a/network/ports/vip_v6.yaml b/network/ports/vip_v6.yaml new file mode 100644 index 00000000..de927094 --- /dev/null +++ b/network/ports/vip_v6.yaml @@ -0,0 +1,65 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port for a VIP on the isolated network NetworkName. + The IP address will be chosen automatically if FixedIPs is empty. + +parameters: + ServiceName: # Here for compatibility with from_service.yaml + description: Name of the service to lookup + default: '' + type: string + NetworkName: + description: Name of the network where the VIP will be created + default: internal_api + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + ControlPlaneNetwork: + description: The name of the undercloud Neutron control plane + default: ctlplane + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + +resources: + VipPort: + type: OS::Neutron::Port + properties: + network: {get_param: NetworkName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: Virtual IP network IP + value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: Virtual IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [VipPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the network associated with this IP + value: + list_join: + - '' + - - {get_attr: [VipPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [VipPort, subnets, 0, cidr, -2]} + - {get_attr: [VipPort, subnets, 0, cidr, -1]} diff --git a/network/storage_mgmt_v6.yaml b/network/storage_mgmt_v6.yaml new file mode 100644 index 00000000..f05644ef --- /dev/null +++ b/network/storage_mgmt_v6.yaml @@ -0,0 +1,69 @@ +heat_template_version: 2015-04-30 + +description: > + Storage management network. Storage replication, etc. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + StorageMgmtNetCidr: + # OpenStack uses the EUI-64 address format, which requires a /64 prefix + default: 'fd00:fd00:fd00:4000::/64' + description: Cidr for the storage management network. + type: string + StorageMgmtNetValueSpecs: + default: {'provider:physical_network': 'storage_mgmt', 'provider:network_type': 'flat'} + description: Value specs for the storage_mgmt network. + type: json + StorageMgmtNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + StorageMgmtNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + StorageMgmtNetName: + default: storage_mgmt + description: The name of the Storage management network. + type: string + StorageMgmtSubnetName: + default: storage_mgmt_subnet + description: The name of the Storage management subnet in Neutron. + type: string + StorageMgmtAllocationPools: + default: [{'start': 'fd00:fd00:fd00:4000::10', 'end': 'fd00:fd00:fd00:4000:ffff:ffff:ffff:fffe'}] + description: Ip allocation pool range for the storage mgmt network. + type: json + IPv6AddressMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 address mode + type: string + IPv6RAMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 router advertisement mode + type: string + +resources: + StorageMgmtNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: StorageMgmtNetAdminStateUp} + name: {get_param: StorageMgmtNetName} + shared: {get_param: StorageMgmtNetShared} + value_specs: {get_param: StorageMgmtNetValueSpecs} + + StorageMgmtSubnet: + type: OS::Neutron::Subnet + properties: + ip_version: 6 + ipv6_address_mode: {get_param: IPv6AddressMode} + ipv6_ra_mode: {get_param: IPv6RAMode} + cidr: {get_param: StorageMgmtNetCidr} + name: {get_param: StorageMgmtSubnetName} + network: {get_resource: StorageMgmtNetwork} + allocation_pools: {get_param: StorageMgmtAllocationPools} + +outputs: + OS::stack_id: + description: Neutron storage management network + value: {get_resource: StorageMgmtNetwork} diff --git a/network/storage_v6.yaml b/network/storage_v6.yaml new file mode 100644 index 00000000..36a6fae8 --- /dev/null +++ b/network/storage_v6.yaml @@ -0,0 +1,69 @@ +heat_template_version: 2015-04-30 + +description: > + Storage network. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + StorageNetCidr: + # OpenStack uses the EUI-64 address format, which requires a /64 prefix + default: 'fd00:fd00:fd00:3000::/64' + description: Cidr for the storage network. + type: string + StorageNetValueSpecs: + default: {'provider:physical_network': 'storage', 'provider:network_type': 'flat'} + description: Value specs for the storage network. + type: json + StorageNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + StorageNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + StorageNetName: + default: storage + description: The name of the storage network. + type: string + StorageSubnetName: + default: storage_subnet + description: The name of the storage subnet in Neutron. + type: string + StorageAllocationPools: + default: [{'start': 'fd00:fd00:fd00:3000::10', 'end': 'fd00:fd00:fd00:3000:ffff:ffff:ffff:fffe'}] + description: Ip allocation pool range for the storage network. + type: json + IPv6AddressMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 address mode + type: string + IPv6RAMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 router advertisement mode + type: string + +resources: + StorageNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: StorageNetAdminStateUp} + name: {get_param: StorageNetName} + shared: {get_param: StorageNetShared} + value_specs: {get_param: StorageNetValueSpecs} + + StorageSubnet: + type: OS::Neutron::Subnet + properties: + ip_version: 6 + ipv6_address_mode: {get_param: IPv6AddressMode} + ipv6_ra_mode: {get_param: IPv6RAMode} + cidr: {get_param: StorageNetCidr} + name: {get_param: StorageSubnetName} + network: {get_resource: StorageNetwork} + allocation_pools: {get_param: StorageAllocationPools} + +outputs: + OS::stack_id: + description: Neutron storage network + value: {get_resource: StorageNetwork} diff --git a/network/tenant_v6.yaml b/network/tenant_v6.yaml new file mode 100644 index 00000000..b653eaf7 --- /dev/null +++ b/network/tenant_v6.yaml @@ -0,0 +1,69 @@ +heat_template_version: 2015-04-30 + +description: > + Tenant IPv6 network. + +parameters: + # the defaults here work for static IP assignment (IPAM) only + TenantNetCidr: + # OpenStack uses the EUI-64 address format, which requires a /64 prefix + default: 'fd00:fd00:fd00:5000::/64' + description: Cidr for the tenant network. + type: string + TenantNetValueSpecs: + default: {'provider:physical_network': 'tenant', 'provider:network_type': 'flat'} + description: Value specs for the tenant network. + type: json + TenantNetAdminStateUp: + default: false + description: This admin state of of the network. + type: boolean + TenantNetShared: + default: false + description: Whether this network is shared across all tenants. + type: boolean + TenantNetName: + default: tenant + description: The name of the tenant network. + type: string + TenantSubnetName: + default: tenant_subnet + description: The name of the tenant subnet in Neutron. + type: string + TenantAllocationPools: + default: [{'start': 'fd00:fd00:fd00:5000::10', 'end': 'fd00:fd00:fd00:5000:ffff:ffff:ffff:fffe'}] + description: Ip allocation pool range for the tenant network. + type: json + IPv6AddressMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 address mode + type: string + IPv6RAMode: + default: dhcpv6-stateful + description: Neutron subnet IPv6 router advertisement mode + type: string + +resources: + TenantNetwork: + type: OS::Neutron::Net + properties: + admin_state_up: {get_param: TenantNetAdminStateUp} + name: {get_param: TenantNetName} + shared: {get_param: TenantNetShared} + value_specs: {get_param: TenantNetValueSpecs} + + TenantSubnet: + type: OS::Neutron::Subnet + properties: + ip_version: 6 + ipv6_address_mode: {get_param: IPv6AddressMode} + ipv6_ra_mode: {get_param: IPv6RAMode} + cidr: {get_param: TenantNetCidr} + name: {get_param: TenantSubnetName} + network: {get_resource: TenantNetwork} + allocation_pools: {get_param: TenantAllocationPools} + +outputs: + OS::stack_id: + description: Neutron tenant network + value: {get_resource: TenantNetwork} diff --git a/overcloud.yaml b/overcloud.yaml index 0499fa67..343b1bc2 100644 --- a/overcloud.yaml +++ b/overcloud.yaml @@ -72,6 +72,10 @@ parameters: default: [] description: Should be used for arbitrary ips. type: json + CorosyncIPv6: + default: false + description: Enable IPv6 in Corosync + type: boolean Debug: default: '' description: Set to True to enable debugging on all services. @@ -244,6 +248,10 @@ parameters: type: number default: 1 description: The number of neutron dhcp agents to schedule per network + NovaIPv6: + default: false + description: Enable IPv6 features in Nova + type: boolean NovaPassword: description: The password for the nova service account, used by nova-api. type: string @@ -256,6 +264,10 @@ parameters: default: false description: Should MongoDb journaling be disabled type: boolean + MongoDbIPv6: + default: false + description: Enable IPv6 if MongoDB VIP is IPv6 + type: boolean PublicVirtualFixedIPs: default: [] description: > @@ -851,19 +863,19 @@ resources: type: OS::TripleO::EndpointMap properties: CloudName: {get_param: CloudName} - CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]} - CinderApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]} - GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]} - GlanceRegistryVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]} - HeatApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]} - KeystoneAdminApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]} - KeystonePublicApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]} - MysqlVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} - NeutronApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]} - NovaApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]} - SaharaApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, SaharaApiNetwork]}]} - SwiftProxyVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]} - PublicVirtualIP: {get_attr: [VipMap, net_ip_map, external]} + CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]} + CinderApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]} + GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]} + GlanceRegistryVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]} + HeatApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]} + KeystoneAdminApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]} + KeystonePublicApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]} + MysqlVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} + NeutronApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]} + NovaApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]} + SaharaApiVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, SaharaApiNetwork]}]} + SwiftProxyVirtualIP: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]} + PublicVirtualIP: {get_attr: [VipMap, net_ip_uri_map, external]} Controller: type: OS::Heat::ResourceGroup @@ -890,6 +902,7 @@ resources: CloudDomain: {get_param: CloudDomain} ControlVirtualInterface: {get_param: ControlVirtualInterface} ControllerExtraConfig: {get_param: controllerExtraConfig} + CorosyncIPv6: {get_param: CorosyncIPv6} Debug: {get_param: Debug} EnableFencing: {get_param: EnableFencing} ManageFirewall: {get_param: ManageFirewall} @@ -957,9 +970,11 @@ resources: NeutronDhcpAgentsPerNetwork: {get_param: NeutronDhcpAgentsPerNetwork} NeutronNetworkType: {get_param: NeutronNetworkType} NeutronTunnelTypes: {get_param: NeutronTunnelTypes} + NovaIPv6: {get_param: NovaIPv6} NovaPassword: {get_param: NovaPassword} NtpServer: {get_param: NtpServer} MongoDbNoJournal: {get_param: MongoDbNoJournal} + MongoDbIPv6: {get_param: MongoDbIPv6} PcsdPassword: {get_resource: PcsdPassword} PublicVirtualInterface: {get_param: PublicVirtualInterface} RabbitPassword: {get_param: RabbitPassword} @@ -972,6 +987,7 @@ resources: SnmpdReadonlyUserName: {get_param: SnmpdReadonlyUserName} SnmpdReadonlyUserPassword: {get_param: SnmpdReadonlyUserPassword} RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]} + RedisVirtualIPUri: {get_attr: [RedisVirtualIP, ip_address_uri]} SwiftHashSuffix: {get_param: SwiftHashSuffix} SwiftMountCheck: {get_param: SwiftMountCheck} SwiftMinPartHours: {get_param: SwiftMinPartHours} @@ -986,11 +1002,13 @@ resources: CeilometerApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]} CinderApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]} HeatApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]} + HeatApiVirtualIPUri: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]} GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]} GlanceRegistryVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]} NovaApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]} SwiftProxyVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]} MysqlVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} + MysqlVirtualIPUri: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} KeystoneAdminApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]} KeystonePublicApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]} NeutronApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]} @@ -1119,7 +1137,7 @@ resources: '%stackname%': {get_param: 'OS::stack_name'} ServiceNetMap: {get_param: ServiceNetMap} EndpointMap: {get_attr: [EndpointMap, endpoint_map]} - MysqlVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} + MysqlVirtualIPUri: {get_attr: [VipMap, net_ip_uri_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} ExtraConfig: {get_param: ExtraConfig} BlockStorageExtraConfig: {get_param: BlockStorageExtraConfig} CloudDomain: {get_param: CloudDomain} @@ -1305,9 +1323,13 @@ resources: properties: ControlPlaneIp: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} ExternalIp: {get_attr: [PublicVirtualIP, ip_address]} + ExternalIpUri: {get_attr: [PublicVirtualIP, ip_address_uri]} InternalApiIp: {get_attr: [InternalApiVirtualIP, ip_address]} + InternalApiIpUri: {get_attr: [InternalApiVirtualIP, ip_address_uri]} StorageIp: {get_attr: [StorageVirtualIP, ip_address]} + StorageIpUri: {get_attr: [StorageVirtualIP, ip_address_uri]} StorageMgmtIp: {get_attr: [StorageMgmtVirtualIP, ip_address]} + StorageMgmtIpUri: {get_attr: [StorageMgmtVirtualIP, ip_address_uri]} # No tenant or management VIP required VipConfig: @@ -1538,7 +1560,13 @@ resources: # the nested template may configure each role differently (or not at all) AllNodesExtraConfig: type: OS::TripleO::AllNodesExtraConfig - depends_on: UpdateWorkflow + depends_on: + - UpdateWorkflow + - ComputeAllNodesValidationDeployment + - BlockStorageAllNodesValidationDeployment + - ObjectStorageAllNodesValidationDeployment + - CephStorageAllNodesValidationDeployment + - ControllerAllNodesValidationDeployment properties: controller_servers: {get_attr: [Controller, attributes, nova_server_resource]} compute_servers: {get_attr: [Compute, attributes, nova_server_resource]} diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index e85975d4..2f2a1e9d 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -139,6 +139,14 @@ resources: list_join: - "','" - {get_param: memcache_node_ips} + memcache_node_ips_v6: + str_replace: + template: "['inet6:[SERVERS_LIST]']" + params: + SERVERS_LIST: + list_join: + - "]','inet6:[" + - {get_param: memcache_node_ips} mysql_node_ips: str_replace: template: "['SERVERS_LIST']" @@ -265,6 +273,7 @@ resources: # hieradata file can't be used as it returns string ceilometer::rabbit_hosts: *rabbit_nodes_array cinder::rabbit_hosts: *rabbit_nodes_array + glance::notify::rabbitmq::rabbit_hosts: *rabbit_nodes_array heat::rabbit_hosts: *rabbit_nodes_array neutron::rabbit_hosts: *rabbit_nodes_array nova::rabbit_hosts: *rabbit_nodes_array diff --git a/puppet/ceph-storage.yaml b/puppet/ceph-storage.yaml index d38f3f22..88120b9c 100644 --- a/puppet/ceph-storage.yaml +++ b/puppet/ceph-storage.yaml @@ -177,11 +177,17 @@ resources: properties: ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]} ExternalIp: {get_attr: [ExternalPort, ip_address]} + ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} + InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]} StorageIp: {get_attr: [StoragePort, ip_address]} + StorageIpUri: {get_attr: [StoragePort, ip_address_uri]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} + StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]} TenantIp: {get_attr: [TenantPort, ip_address]} + TenantIpUri: {get_attr: [TenantPort, ip_address_uri]} ManagementIp: {get_attr: [ManagementPort, ip_address]} + ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]} NetIpSubnetMap: type: OS::TripleO::Network::Ports::NetIpSubnetMap diff --git a/puppet/cinder-storage.yaml b/puppet/cinder-storage.yaml index 440c2fd2..09c4d3e3 100644 --- a/puppet/cinder-storage.yaml +++ b/puppet/cinder-storage.yaml @@ -110,7 +110,7 @@ parameters: GlanceApiVirtualIP: type: string default: '' - MysqlVirtualIP: + MysqlVirtualIPUri: type: string default: '' NetworkDeploymentActions: @@ -229,11 +229,17 @@ resources: properties: ControlPlaneIp: {get_attr: [BlockStorage, networks, ctlplane, 0]} ExternalIp: {get_attr: [ExternalPort, ip_address]} + ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} + InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]} StorageIp: {get_attr: [StoragePort, ip_address]} + StorageIpUri: {get_attr: [StoragePort, ip_address_uri]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} + StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]} TenantIp: {get_attr: [TenantPort, ip_address]} + TenantIpUri: {get_attr: [TenantPort, ip_address_uri]} ManagementIp: {get_attr: [ManagementPort, ip_address]} + ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]} NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -252,7 +258,7 @@ resources: config: {get_resource: BlockStorageConfig} input_values: debug: {get_param: Debug} - cinder_dsn: {list_join: ['', ['mysql+pymysql://cinder:', {get_param: CinderPassword}, '@', {get_param: MysqlVirtualIP} , '/cinder']]} + cinder_dsn: {list_join: ['', ['mysql+pymysql://cinder:', {get_param: CinderPassword}, '@', {get_param: MysqlVirtualIPUri} , '/cinder']]} snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName} snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword} cinder_lvm_loop_device_size: diff --git a/puppet/compute.yaml b/puppet/compute.yaml index deaf7984..58ca71e7 100644 --- a/puppet/compute.yaml +++ b/puppet/compute.yaml @@ -409,11 +409,17 @@ resources: properties: ControlPlaneIp: {get_attr: [NovaCompute, networks, ctlplane, 0]} ExternalIp: {get_attr: [ExternalPort, ip_address]} + ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} + InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]} StorageIp: {get_attr: [StoragePort, ip_address]} + StorageIpUri: {get_attr: [StoragePort, ip_address_uri]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} + StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]} TenantIp: {get_attr: [TenantPort, ip_address]} + TenantIpUri: {get_attr: [TenantPort, ip_address_uri]} ManagementIp: {get_attr: [ManagementPort, ip_address]} + ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]} NetworkConfig: type: OS::TripleO::Compute::Net::SoftwareConfig diff --git a/puppet/controller.yaml b/puppet/controller.yaml index 37ded74d..c97012d7 100644 --- a/puppet/controller.yaml +++ b/puppet/controller.yaml @@ -32,6 +32,10 @@ parameters: description: The password for the ceilometer service and db account. type: string hidden: true + CeilometerStoreEvents: + default: false + description: Whether to store events in ceilometer. + type: boolean CinderApiVirtualIP: type: string default: '' @@ -107,6 +111,10 @@ parameters: default: 'br-ex' description: Interface where virtual ip will be assigned. type: string + CorosyncIPv6: + default: false + description: Enable IPv6 in Corosync + type: boolean Debug: default: '' description: Set to True to enable debugging on all services. @@ -545,6 +553,10 @@ parameters: description: | Whether to create cron job for purging soft deleted rows in Nova database. type: boolean + NovaIPv6: + default: false + description: Enable IPv6 features in Nova + type: boolean NovaPassword: description: The password for the nova service and db account, used by nova-api. type: string @@ -557,6 +569,10 @@ parameters: default: false description: Should MongoDb journaling be disabled type: boolean + MongoDbIPv6: + default: false + description: Enable IPv6 if Mongo DB VIP is IPv6 + type: boolean NtpServer: default: '' description: Comma-separated list of ntp servers @@ -604,6 +620,10 @@ parameters: RedisVirtualIP: type: string default: '' # Has to be here because of the ignored empty value bug + RedisVirtualIPUri: + type: string + default: '' # Has to be here because of the ignored empty value bug + description: An IP address which is wrapped in brackets in case of IPv6 SnmpdReadonlyUserName: default: ro_snmp_user description: The user name for SNMPd with readonly rights running on all Overcloud nodes @@ -659,6 +679,9 @@ parameters: HeatApiVirtualIP: type: string default: '' + HeatApiVirtualIPUri: + type: string + default: '' GlanceApiVirtualIP: type: string default: '' @@ -668,6 +691,9 @@ parameters: MysqlVirtualIP: type: string default: '' + MysqlVirtualIPUri: + type: string + default: '' KeystoneAdminApiVirtualIP: type: string default: '' @@ -815,6 +841,8 @@ resources: ManagementPort: type: OS::TripleO::Controller::Ports::ManagementPort properties: + IPPool: {get_param: ControllerIPs} + NodeIndex: {get_param: NodeIndex} ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]} NetIpMap: @@ -822,11 +850,17 @@ resources: properties: ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]} ExternalIp: {get_attr: [ExternalPort, ip_address]} + ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} + InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]} StorageIp: {get_attr: [StoragePort, ip_address]} + StorageIpUri: {get_attr: [StoragePort, ip_address_uri]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} + StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]} TenantIp: {get_attr: [TenantPort, ip_address]} + TenantIpUri: {get_attr: [TenantPort, ip_address_uri]} ManagementIp: {get_attr: [ManagementPort, ip_address]} + ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]} NetIpSubnetMap: type: OS::TripleO::Network::Ports::NetIpSubnetMap @@ -902,19 +936,19 @@ resources: list_join: - '' - - 'http://' - - {get_param: HeatApiVirtualIP} + - {get_param: HeatApiVirtualIPUri} - ':8003' heat.metadata_server_url: list_join: - '' - - 'http://' - - {get_param: HeatApiVirtualIP} + - {get_param: HeatApiVirtualIPUri} - ':8000' heat.waitcondition_server_url: list_join: - '' - - 'http://' - - {get_param: HeatApiVirtualIP} + - {get_param: HeatApiVirtualIPUri} - ':8000/v1/waitcondition' heat_auth_encryption_key: {get_param: HeatAuthEncryptionKey} heat_enable_db_purge: {get_param: HeatEnableDBPurge} @@ -945,7 +979,7 @@ resources: - - 'mysql+pymysql://cinder:' - {get_param: CinderPassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/cinder' glance_port: {get_param: [EndpointMap, GlanceInternal, port]} glance_password: {get_param: GlancePassword} @@ -962,7 +996,7 @@ resources: - - 'mysql+pymysql://glance:' - {get_param: GlancePassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/glance' heat_password: {get_param: HeatPassword} heat_stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword} @@ -972,7 +1006,7 @@ resources: - - 'mysql+pymysql://heat:' - {get_param: HeatPassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/heat' keystone_ca_certificate: {get_param: KeystoneCACertificate} keystone_signing_key: {get_param: KeystoneSigningKey} @@ -988,7 +1022,7 @@ resources: - - 'mysql+pymysql://keystone:' - {get_param: AdminToken} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/keystone' keystone_identity_uri: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] } keystone_auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] } @@ -1095,7 +1129,7 @@ resources: - - 'mysql+pymysql://neutron:' - {get_param: NeutronPassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/ovs_neutron?charset=utf8' neutron_internal_url: { get_param: [ EndpointMap, NeutronInternal, uri ] } neutron_public_url: { get_param: [ EndpointMap, NeutronPublic, uri ] } @@ -1105,11 +1139,12 @@ resources: ceilometer_backend: {get_param: CeilometerBackend} ceilometer_metering_secret: {get_param: CeilometerMeteringSecret} ceilometer_password: {get_param: CeilometerPassword} + ceilometer_store_events: {get_param: CeilometerStoreEvents} ceilometer_coordination_url: list_join: - '' - - 'redis://' - - {get_param: RedisVirtualIP} + - {get_param: RedisVirtualIPUri} - ':6379' ceilometer_dsn: list_join: @@ -1117,11 +1152,13 @@ resources: - - 'mysql+pymysql://ceilometer:' - {get_param: CeilometerPassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/ceilometer' snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName} snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword} nova_enable_db_purge: {get_param: NovaEnableDBPurge} + nova_ipv6: {get_param: NovaIPv6} + corosync_ipv6: {get_param: CorosyncIPv6} nova_password: {get_param: NovaPassword} nova_dsn: list_join: @@ -1129,7 +1166,7 @@ resources: - - 'mysql+pymysql://nova:' - {get_param: NovaPassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/nova' nova_api_dsn: list_join: @@ -1137,7 +1174,7 @@ resources: - - 'mysql+pymysql://nova_api:' - {get_param: NovaPassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/nova_api' upgrade_level_nova_compute: {get_param: UpgradeLevelNovaCompute} instance_name_template: {get_param: InstanceNameTemplate} @@ -1149,6 +1186,7 @@ resources: rabbit_client_use_ssl: {get_param: RabbitClientUseSSL} rabbit_client_port: {get_param: RabbitClientPort} mongodb_no_journal: {get_param: MongoDbNoJournal} + mongodb_ipv6: {get_param: MongoDbIPv6} # We need to force this into quotes or hiera will return integer causing # the puppet module validation regexp to fail. # Remove when: https://github.com/puppetlabs/puppetlabs-rabbitmq/pull/401 @@ -1176,7 +1214,7 @@ resources: - - 'mysql://sahara:' - {get_param: SaharaPassword} - '@' - - {get_param: MysqlVirtualIP} + - {get_param: MysqlVirtualIPUri} - '/sahara' swift_proxy_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]} swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]} @@ -1266,6 +1304,7 @@ resources: enable_fencing: {get_input: enable_fencing} enable_load_balancer: {get_input: enable_load_balancer} hacluster_pwd: {get_input: pcsd_password} + corosync_ipv6: {get_input: corosync_ipv6} tripleo::fencing::config: {get_input: fencing_config} # Swift @@ -1400,6 +1439,7 @@ resources: # MongoDB mongodb::server::bind_ip: {get_input: mongo_db_network} mongodb::server::nojournal: {get_input: mongodb_no_journal} + mongodb::server::ipv6: {get_input: mongodb_ipv6} # MySQL admin_password: {get_input: admin_password} enable_galera: {get_input: enable_galera} @@ -1491,6 +1531,7 @@ resources: ceilometer::agent::auth::auth_password: {get_input: ceilometer_password} ceilometer::agent::auth::auth_url: {get_input: keystone_auth_uri} ceilometer::agent::central::coordination_url: {get_input: ceilometer_coordination_url} + ceilometer::agent::notification::store_events: {get_input: ceilometer_store_events} ceilometer::db::mysql::password: {get_input: ceilometer_password} snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} @@ -1502,6 +1543,7 @@ resources: nova::rabbit_port: {get_input: rabbit_client_port} nova::upgrade_level_compute: {get_input: upgrade_level_nova_compute} nova::debug: {get_input: debug} + nova::use_ipv6: {get_input: nova_ipv6} nova::api::auth_uri: {get_input: keystone_auth_uri} nova::api::identity_uri: {get_input: keystone_identity_uri} nova::api::api_bind_address: {get_input: nova_api_network} @@ -1704,14 +1746,14 @@ outputs: str_replace: template: 'r1z1-IP:%PORT%/d1' params: - IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]} + IP: {get_attr: [NetIpMap, net_ip_uri_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]} swift_proxy_memcache: description: Swift proxy-memcache value value: str_replace: template: "IP:11211" params: - IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]} + IP: {get_attr: [NetIpMap, net_ip_uri_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]} config_identifier: description: identifier which changes if the controller configuration may need re-applying value: diff --git a/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml index 655fd0f2..71445800 100644 --- a/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml +++ b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml @@ -65,11 +65,18 @@ parameters: default: false NetworkNexusSwitchHeartbeatTime: type: number - description: Time interval to check the state of the Nexus device + description: > + Time interval to check the state of the Nexus device. The units of this + object are seconds. Setting this object to a value of 0 disables the + replay feature. default: 0 NetworkNexusSwitchReplayCount: type: number - description: Number of times to attempt config replay + description: > + This configuration item is OBSOLETE. The Nexus driver replay behavior + is to continue to attempt to connect to the down Nexus device with a + period equal to the heartbeat time interval. This was previously the + Number of times to attempt config replay. default: 3 NetworkNexusProviderVlanAutoCreate: type: boolean diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 7a5e54d8..98cec364 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -31,6 +31,8 @@ sysctl_settings: value: 0 net.ipv6.conf.default.autoconf: value: 0 + net.core.netdev_max_backlog: + value: 10000 nova::rabbit_heartbeat_timeout_threshold: 60 neutron::rabbit_heartbeat_timeout_threshold: 60 diff --git a/puppet/hieradata/compute.yaml b/puppet/hieradata/compute.yaml index fa8dcc81..572eef9f 100644 --- a/puppet/hieradata/compute.yaml +++ b/puppet/hieradata/compute.yaml @@ -1,7 +1,7 @@ # Hiera data here applies to all compute nodes nova::notify_on_state_change: 'vm_and_task_state' - +nova::notification_driver: messagingv2 nova::compute::enabled: true nova::compute::instance_usage_audit: true nova::compute::instance_usage_audit_period: 'hour' diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index f97bda11..e80bee07 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -100,6 +100,7 @@ ceilometer::agent::auth::auth_endpoint_type: 'internalURL' cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler cinder::cron::db_purge::destination: '/dev/null' cinder::host: hostgroup +cinder_user_enabled_backends: [] # heat heat::engine::configure_delegated_roles: false diff --git a/puppet/hieradata/volume.yaml b/puppet/hieradata/volume.yaml index f4cd78a9..8640c0a7 100644 --- a/puppet/hieradata/volume.yaml +++ b/puppet/hieradata/volume.yaml @@ -9,4 +9,6 @@ cinder::config::cinder_config: DEFAULT/swift_catalog_info: value: 'object-store:swift:internalURL' +cinder_user_enabled_backends: [] + volume_classes: []
\ No newline at end of file diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index 7925f50a..dcf63740 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -56,6 +56,7 @@ include ::nova::compute nova_config { 'DEFAULT/my_ip': value => $ipaddress; 'DEFAULT/linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver'; + 'DEFAULT/host': value => $fqdn; } $rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false) @@ -146,6 +147,9 @@ else { } } +neutron_config { + 'DEFAULT/host': value => $fqdn; +} include ::ceilometer include ::ceilometer::config diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 81a33bbc..0d6a2389 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -229,11 +229,8 @@ if hiera('step') >= 3 { known_stores => $glance_store, } include ::glance::registry + include ::glance::notify::rabbitmq include join(['::glance::backend::', $glance_backend]) - $rabbit_port = hiera('rabbitmq::port') - class { '::glance::notify::rabbitmq': - rabbit_hosts => suffix(hiera('rabbit_node_ips'), ":${rabbit_port}"), - } class { '::nova' : memcached_servers => suffix(hiera('memcache_node_ips'), ':11211'), @@ -512,7 +509,7 @@ if hiera('step') >= 3 { $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_eqlx_backend, $cinder_dellsc_backend, $cinder_netapp_backend, $cinder_nfs_backend]) class { '::cinder::backends' : - enabled_backends => $cinder_enabled_backends, + enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')), } # swift proxy diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 6accdc1f..2bb081aa 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -62,6 +62,12 @@ if hiera('step') >= 1 { } $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G')) + $corosync_ipv6 = str2bool(hiera('corosync_ipv6', false)) + if $corosync_ipv6 { + $cluster_setup_extras = { '--ipv6' => '' } + } else { + $cluster_setup_extras = {} + } user { 'hacluster': ensure => present, } -> @@ -69,8 +75,9 @@ if hiera('step') >= 1 { hacluster_pwd => hiera('hacluster_pwd'), } -> class { '::pacemaker::corosync': - cluster_members => $pacemaker_cluster_members, - setup_cluster => $pacemaker_master, + cluster_members => $pacemaker_cluster_members, + setup_cluster => $pacemaker_master, + cluster_setup_extras => $cluster_setup_extras, } class { '::pacemaker::stonith': disable => !$enable_fencing, @@ -195,6 +202,11 @@ if hiera('step') >= 2 { include ::pacemaker::resource_defaults + # Create an openstack-core dummy resource. See RHBZ 1290121 + pacemaker::resource::ocf { 'openstack-core': + ocf_agent_name => 'heartbeat:Dummy', + clone_params => true, + } # FIXME: we should not have to access tripleo::loadbalancer class # parameters here to configure pacemaker VIPs. The configuration # of pacemaker VIPs could move into puppet-tripleo or we should @@ -204,8 +216,14 @@ if hiera('step') >= 2 { } $control_vip = hiera('tripleo::loadbalancer::controller_virtual_ip') + if is_ipv6_address($control_vip) { + $control_vip_netmask = '64' + } else { + $control_vip_netmask = '32' + } pacemaker::resource::ip { 'control_vip': - ip_address => $control_vip, + ip_address => $control_vip, + cidr_netmask => $control_vip_netmask, } pacemaker::constraint::base { 'control_vip-then-haproxy': constraint_type => 'order', @@ -226,9 +244,15 @@ if hiera('step') >= 2 { } $public_vip = hiera('tripleo::loadbalancer::public_virtual_ip') + if is_ipv6_address($public_vip) { + $public_vip_netmask = '64' + } else { + $public_vip_netmask = '32' + } if $public_vip and $public_vip != $control_vip { pacemaker::resource::ip { 'public_vip': - ip_address => $public_vip, + ip_address => $public_vip, + cidr_netmask => $public_vip_netmask, } pacemaker::constraint::base { 'public_vip-then-haproxy': constraint_type => 'order', @@ -250,9 +274,15 @@ if hiera('step') >= 2 { } $redis_vip = hiera('redis_vip') + if is_ipv6_address($redis_vip) { + $redis_vip_netmask = '64' + } else { + $redis_vip_netmask = '32' + } if $redis_vip and $redis_vip != $control_vip { pacemaker::resource::ip { 'redis_vip': - ip_address => $redis_vip, + ip_address => $redis_vip, + cidr_netmask => $redis_vip_netmask, } pacemaker::constraint::base { 'redis_vip-then-haproxy': constraint_type => 'order', @@ -274,9 +304,15 @@ if hiera('step') >= 2 { } $internal_api_vip = hiera('tripleo::loadbalancer::internal_api_virtual_ip') + if is_ipv6_address($internal_api_vip) { + $internal_api_vip_netmask = '64' + } else { + $internal_api_vip_netmask = '32' + } if $internal_api_vip and $internal_api_vip != $control_vip { pacemaker::resource::ip { 'internal_api_vip': - ip_address => $internal_api_vip, + ip_address => $internal_api_vip, + cidr_netmask => $internal_api_vip_netmask, } pacemaker::constraint::base { 'internal_api_vip-then-haproxy': constraint_type => 'order', @@ -298,9 +334,15 @@ if hiera('step') >= 2 { } $storage_vip = hiera('tripleo::loadbalancer::storage_virtual_ip') + if is_ipv6_address($storage_vip) { + $storage_vip_netmask = '64' + } else { + $storage_vip_netmask = '32' + } if $storage_vip and $storage_vip != $control_vip { pacemaker::resource::ip { 'storage_vip': - ip_address => $storage_vip, + ip_address => $storage_vip, + cidr_netmask => $storage_vip_netmask, } pacemaker::constraint::base { 'storage_vip-then-haproxy': constraint_type => 'order', @@ -322,9 +364,15 @@ if hiera('step') >= 2 { } $storage_mgmt_vip = hiera('tripleo::loadbalancer::storage_mgmt_virtual_ip') + if is_ipv6_address($storage_mgmt_vip) { + $storage_mgmt_vip_netmask = '64' + } else { + $storage_mgmt_vip_netmask = '32' + } if $storage_mgmt_vip and $storage_mgmt_vip != $control_vip { pacemaker::resource::ip { 'storage_mgmt_vip': - ip_address => $storage_mgmt_vip, + ip_address => $storage_mgmt_vip, + cidr_netmask => $storage_mgmt_vip_netmask, } pacemaker::constraint::base { 'storage_mgmt_vip-then-haproxy': constraint_type => 'order', @@ -509,9 +557,7 @@ if hiera('step') >= 3 { sync_db => $sync_db, manage_service => false, enabled => false, - # TODO: when keystone resources will be managed by puppet-keystone - # for the overcloud, set enable_bootstrap to the default value (True). - enable_bootstrap => false, + enable_bootstrap => $pacemaker_master, } include ::keystone::config @@ -579,14 +625,18 @@ if hiera('step') >= 3 { manage_service => false, enabled => false, } + include ::glance::notify::rabbitmq include join(['::glance::backend::', $glance_backend]) - $rabbit_port = hiera('rabbitmq::port') - class { '::glance::notify::rabbitmq': - rabbit_hosts => suffix(hiera('rabbit_node_ips'), ":${rabbit_port}"), + + $nova_ipv6 = hiera('nova::use_ipv6', false) + if $nova_ipv6 { + $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211') + } else { + $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211') } class { '::nova' : - memcached_servers => suffix(hiera('memcache_node_ips'), ':11211'), + memcached_servers => $memcached_servers } include ::nova::config @@ -900,7 +950,7 @@ if hiera('step') >= 3 { $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_eqlx_backend, $cinder_dellsc_backend, $cinder_netapp_backend, $cinder_nfs_backend]) class { '::cinder::backends' : - enabled_backends => $cinder_enabled_backends, + enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')), } class { '::sahara': @@ -1079,45 +1129,55 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'haproxy-then-keystone-constraint': constraint_type => 'order', first_resource => 'haproxy-clone', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service['haproxy'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } } + + pacemaker::constraint::base { 'openstack-core-then-httpd-constraint': + constraint_type => 'order', + first_resource => 'openstack-core-clone', + second_resource => "${::apache::params::service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::apache::params::service_name], + Pacemaker::Resource::Ocf['openstack-core']], + } pacemaker::constraint::base { 'rabbitmq-then-keystone-constraint': constraint_type => 'order', first_resource => 'rabbitmq-clone', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Ocf['rabbitmq'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } - pacemaker::constraint::base { 'memcached-then-keystone-constraint': + pacemaker::constraint::base { 'memcached-then-openstack-core-constraint': constraint_type => 'order', first_resource => 'memcached-clone', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service['memcached'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } - pacemaker::constraint::base { 'galera-then-keystone-constraint': + pacemaker::constraint::base { 'galera-then-openstack-core-constraint': constraint_type => 'order', first_resource => 'galera-master', - second_resource => "${::apache::params::service_name}-clone", + second_resource => 'openstack-core-clone', first_action => 'promote', second_action => 'start', require => [Pacemaker::Resource::Ocf['galera'], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } # Cinder pacemaker::resource::service { $::cinder::params::api_service : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::cinder::params::scheduler_service : clone_params => 'interleave=true', @@ -1126,12 +1186,12 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'keystone-then-cinder-api-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::cinder::params::api_service}-clone", first_action => 'start', second_action => 'start', - require => [Pacemaker::Resource::Service[$::cinder::params::api_service], - Pacemaker::Resource::Service[$::apache::params::service_name]], + require => [Pacemaker::Resource::Ocf['openstack-core'], + Pacemaker::Resource::Service[$::cinder::params::api_service]], } pacemaker::constraint::base { 'cinder-api-then-cinder-scheduler-constraint': constraint_type => 'order', @@ -1169,25 +1229,25 @@ if hiera('step') >= 4 { # Sahara pacemaker::resource::service { $::sahara::params::api_service_name : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::sahara::params::engine_service_name : clone_params => 'interleave=true', } pacemaker::constraint::base { 'keystone-then-sahara-api-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::sahara::params::api_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::sahara::params::api_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } # Glance pacemaker::resource::service { $::glance::params::registry_service_name : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::glance::params::api_service_name : clone_params => 'interleave=true', @@ -1195,12 +1255,12 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'keystone-then-glance-registry-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::glance::params::registry_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::glance::params::registry_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'glance-registry-then-glance-api-constraint': constraint_type => 'order', @@ -1238,12 +1298,12 @@ if hiera('step') >= 4 { } -> pacemaker::resource::service { $::neutron::params::server_service: clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name] + require => Pacemaker::Resource::Ocf['openstack-core'] } } else { pacemaker::resource::service { $::neutron::params::server_service: clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name] + require => Pacemaker::Resource::Ocf['openstack-core'] } } if hiera('neutron::enable_l3_agent', true) { @@ -1316,14 +1376,14 @@ if hiera('step') >= 4 { } } pacemaker::constraint::base { 'keystone-to-neutron-server-constraint': - constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", - second_resource => "${::neutron::params::server_service}-clone", - first_action => 'start', - second_action => 'start', - require => [Pacemaker::Resource::Service[$::apache::params::service_name], - Pacemaker::Resource::Service[$::neutron::params::server_service]], - } + constraint_type => 'order', + first_resource => 'openstack-core-clone', + second_resource => "${::neutron::params::server_service}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Ocf['openstack-core'], + Pacemaker::Resource::Service[$::neutron::params::server_service]], + } if hiera('neutron::enable_ovs_agent',true) { pacemaker::constraint::base { 'neutron-openvswitch-agent-to-dhcp-agent-constraint': constraint_type => 'order', @@ -1437,7 +1497,7 @@ if hiera('step') >= 4 { } pacemaker::resource::service { $::nova::params::consoleauth_service_name : clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } pacemaker::resource::service { $::nova::params::vncproxy_service_name : clone_params => 'interleave=true', @@ -1448,12 +1508,12 @@ if hiera('step') >= 4 { pacemaker::constraint::base { 'keystone-then-nova-consoleauth-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::nova::params::consoleauth_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::nova::params::consoleauth_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'nova-consoleauth-then-nova-vncproxy-constraint': constraint_type => 'order', @@ -1523,16 +1583,16 @@ if hiera('step') >= 4 { # Ceilometer case downcase(hiera('ceilometer_backend')) { /mysql/: { - pacemaker::resource::service { $::ceilometer::params::agent_central_service_name : + pacemaker::resource::service { $::ceilometer::params::agent_central_service_name: clone_params => 'interleave=true', - require => Pacemaker::Resource::Service[$::apache::params::service_name], + require => Pacemaker::Resource::Ocf['openstack-core'], } } default: { - pacemaker::resource::service { $::ceilometer::params::agent_central_service_name : + pacemaker::resource::service { $::ceilometer::params::agent_central_service_name: clone_params => 'interleave=true', - require => [Pacemaker::Resource::Service[$::apache::params::service_name], - Pacemaker::Resource::Service[$::mongodb::params::service_name]], + require => [Pacemaker::Resource::Ocf['openstack-core'], + Pacemaker::Resource::Service[$::mongodb::params::service_name]], } } } @@ -1568,12 +1628,12 @@ if hiera('step') >= 4 { } pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::ceilometer::params::agent_central_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'ceilometer-central-then-ceilometer-collector-constraint': constraint_type => 'order', @@ -1643,12 +1703,12 @@ if hiera('step') >= 4 { } pacemaker::constraint::base { 'keystone-then-heat-api-constraint': constraint_type => 'order', - first_resource => "${::apache::params::service_name}-clone", + first_resource => 'openstack-core-clone', second_resource => "${::heat::params::api_service_name}-clone", first_action => 'start', second_action => 'start', require => [Pacemaker::Resource::Service[$::heat::params::api_service_name], - Pacemaker::Resource::Service[$::apache::params::service_name]], + Pacemaker::Resource::Ocf['openstack-core']], } pacemaker::constraint::base { 'heat-api-then-heat-api-cfn-constraint': constraint_type => 'order', diff --git a/puppet/manifests/overcloud_volume.pp b/puppet/manifests/overcloud_volume.pp index 72cd36c3..66722f57 100644 --- a/puppet/manifests/overcloud_volume.pp +++ b/puppet/manifests/overcloud_volume.pp @@ -44,7 +44,7 @@ if $cinder_enable_iscsi { $cinder_enabled_backends = any2array($cinder_iscsi_backend) class { '::cinder::backends' : - enabled_backends => $cinder_enabled_backends, + enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')), } $snmpd_user = hiera('snmpd_readonly_user_name') diff --git a/puppet/swift-storage.yaml b/puppet/swift-storage.yaml index e77a25f8..3b04be83 100644 --- a/puppet/swift-storage.yaml +++ b/puppet/swift-storage.yaml @@ -198,11 +198,17 @@ resources: properties: ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]} ExternalIp: {get_attr: [ExternalPort, ip_address]} + ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} + InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]} StorageIp: {get_attr: [StoragePort, ip_address]} + StorageIpUri: {get_attr: [StoragePort, ip_address_uri]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} + StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]} TenantIp: {get_attr: [TenantPort, ip_address]} + TenantIpUri: {get_attr: [TenantPort, ip_address_uri]} ManagementIp: {get_attr: [ManagementPort, ip_address]} + ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]} NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -367,7 +373,7 @@ outputs: str_replace: template: 'r1z1-IP:%PORT%/d1' params: - IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]} + IP: {get_attr: [NetIpMap, net_ip_uri_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]} external_ip_address: description: IP address of the server in the external network value: {get_attr: [ExternalPort, ip_address]} diff --git a/validation-scripts/all-nodes.sh b/validation-scripts/all-nodes.sh index ae1fddf3..31b4d6bf 100644 --- a/validation-scripts/all-nodes.sh +++ b/validation-scripts/all-nodes.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # For each unique remote IP (specified via Heat) we check to # see if one of the locally configured networks matches and if so we @@ -17,11 +18,13 @@ function ping_controller_ips() { in_network=$(python -c "import ipaddr; net=ipaddr.IPNetwork('$LOCAL_NETWORK'); addr=ipaddr.IPAddress('$REMOTE_IP'); print(addr in net)") if [[ $in_network == "True" ]]; then echo -n "Trying to ping $REMOTE_IP for local network $LOCAL_NETWORK..." + set +e if ! $ping -W 300 -c 1 $REMOTE_IP &> /dev/null; then echo "FAILURE" echo "$REMOTE_IP is not pingable. Local Network: $LOCAL_NETWORK" >&2 exit 1 fi + set -e echo "SUCCESS" fi done @@ -34,6 +37,7 @@ function ping_controller_ips() { # multiple gateways. function ping_default_gateways() { DEFAULT_GW=$(ip r | grep ^default | cut -d " " -f 3) + set +e for GW in $DEFAULT_GW; do echo -n "Trying to ping default gateway ${GW}..." if ! ping -c 1 $GW &> /dev/null; then @@ -42,6 +46,7 @@ function ping_default_gateways() { exit 1 fi done + set -e echo "SUCCESS" } |