diff options
-rw-r--r-- | ceph-storage.yaml | 6 | ||||
-rw-r--r-- | cinder-storage.yaml | 7 | ||||
-rw-r--r-- | compute.yaml | 8 | ||||
-rw-r--r-- | controller.yaml | 8 | ||||
-rw-r--r-- | environments/puppet-tenant-vlan.yaml | 4 | ||||
-rwxr-xr-x | extraconfig/tasks/yum_update.sh | 41 | ||||
-rw-r--r-- | extraconfig/tasks/yum_update.yaml | 26 | ||||
-rw-r--r-- | overcloud-resource-registry-puppet.yaml | 1 | ||||
-rw-r--r-- | overcloud-resource-registry.yaml | 1 | ||||
-rw-r--r-- | overcloud-without-mergepy.yaml | 15 | ||||
-rw-r--r-- | puppet/ceph-storage-puppet.yaml | 18 | ||||
-rw-r--r-- | puppet/cinder-storage-puppet.yaml | 18 | ||||
-rw-r--r-- | puppet/compute-puppet.yaml | 31 | ||||
-rw-r--r-- | puppet/controller-puppet.yaml | 29 | ||||
-rw-r--r-- | puppet/hieradata/common.yaml | 5 | ||||
-rw-r--r-- | puppet/manifests/overcloud_compute.pp | 1 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 1 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 19 | ||||
-rw-r--r-- | puppet/swift-storage-puppet.yaml | 18 | ||||
-rw-r--r-- | swift-storage.yaml | 6 |
20 files changed, 239 insertions, 24 deletions
diff --git a/ceph-storage.yaml b/ceph-storage.yaml index 05d80927..138e6ea5 100644 --- a/ceph-storage.yaml +++ b/ceph-storage.yaml @@ -33,6 +33,12 @@ parameters: description: Mapping of service_name -> network name. Typically set via parameter_defaults in the resource registry. type: json + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: CephStorage: diff --git a/cinder-storage.yaml b/cinder-storage.yaml index aee67c9d..9541ed1c 100644 --- a/cinder-storage.yaml +++ b/cinder-storage.yaml @@ -100,6 +100,13 @@ parameters: description: The user password for SNMPd with readonly rights running on all Overcloud nodes type: string hidden: true + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes + resources: BlockStorage: type: OS::Nova::Server diff --git a/compute.yaml b/compute.yaml index 05399531..abd59103 100644 --- a/compute.yaml +++ b/compute.yaml @@ -132,7 +132,7 @@ parameters: The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the Neutron documentation for permitted values. Defaults to permitting any VLAN on the 'datacentre' physical network (See NeutronBridgeMappings). - type: string + type: comma_delimited_list NeutronPassword: default: unset description: The password for the neutron service account, used by neutron agents. @@ -248,6 +248,12 @@ parameters: description: Mapping of service_name -> network name. Typically set via parameter_defaults in the resource registry. type: json + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: diff --git a/controller.yaml b/controller.yaml index 8c1b93d2..51dba076 100644 --- a/controller.yaml +++ b/controller.yaml @@ -283,7 +283,7 @@ parameters: The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the Neutron documentation for permitted values. Defaults to permitting any VLAN on the 'datacentre' physical network (See NeutronBridgeMappings). - type: string + type: comma_delimited_list NeutronPassword: default: unset description: The password for the neutron service and db account, used by neutron agents. @@ -438,6 +438,12 @@ parameters: description: Mapping of service_name -> network name. Typically set via parameter_defaults in the resource registry. type: json + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: diff --git a/environments/puppet-tenant-vlan.yaml b/environments/puppet-tenant-vlan.yaml new file mode 100644 index 00000000..0df63caf --- /dev/null +++ b/environments/puppet-tenant-vlan.yaml @@ -0,0 +1,4 @@ +parameters: + NeutronNetworkType: vlan + NeutronEnableTunnelling: false + NeutronNetworkVLANRanges: datacentre:1:1000
\ No newline at end of file diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh new file mode 100755 index 00000000..3d4c772b --- /dev/null +++ b/extraconfig/tasks/yum_update.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# A heat-config-script which runs yum update during a stack-update. +# Inputs: +# deploy_action - yum will only be run if this is UPDATE +# update_identifier - yum will only run for previously unused values of update_identifier +# command - yum sub-command to run, defaults to "update" +# command_arguments - yum command arguments, defaults to "" + +echo "Started yum_update.sh on server $deploy_server_id at `date`" + +if [[ -z "$update_identifier" ]]; then + echo "Not running due to unset update_identifier" + exit 0 +fi + +timestamp_dir=/var/lib/overcloud-yum-update +mkdir -p $timestamp_dir + +# sanitise to remove unusual characters +update_identifier=${update_identifier//[^a-zA-Z0-9-_]/} + +timestamp_file="$timestamp_dir/$update_identifier" +if [[ -a "$timestamp_file" ]]; then + echo "Not running for already-run timestamp \"$update_identifier\"" + exit 0 +fi +touch "$timestamp_file" + +command=${command:-update} +full_command="yum -y $command $command_arguments" +echo "Running: $full_command" + +result=$($full_command) +return_code=$? +echo "$result" +echo "yum return code: $return_code" + +echo "Finished yum_update.sh on server $deploy_server_id at `date`" + +exit $return_code diff --git a/extraconfig/tasks/yum_update.yaml b/extraconfig/tasks/yum_update.yaml new file mode 100644 index 00000000..e918149e --- /dev/null +++ b/extraconfig/tasks/yum_update.yaml @@ -0,0 +1,26 @@ +heat_template_version: 2014-10-16 + +description: > + Software-config for performing package updates using yum + +resources: + + config: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: {get_file: yum_update.sh} + inputs: + - name: update_identifier + description: yum will only run for previously unused values of update_identifier + default: '' + - name: command + description: yum sub-command to run, defaults to "update" + default: update + - name: command_arguments + description: yum command arguments, defaults to "" + default: '' + +outputs: + OS::stack_id: + value: {get_resource: config}
\ No newline at end of file diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 81a46cfd..6e423048 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -23,6 +23,7 @@ resource_registry: OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml OS::TripleO::NodeUserData: firstboot/userdata_default.yaml OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml + OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml # TripleO overcloud networks OS::TripleO::Network: network/networks.yaml diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml index 3d92082c..7be199da 100644 --- a/overcloud-resource-registry.yaml +++ b/overcloud-resource-registry.yaml @@ -21,6 +21,7 @@ resource_registry: OS::TripleO::BootstrapNode::SoftwareConfig: bootstrap-config.yaml OS::TripleO::NodeUserData: firstboot/userdata_default.yaml OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml + OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml # TripleO overcloud networks OS::TripleO::Network: network/networks.yaml diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index 5f81fcd1..583634f1 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -467,7 +467,7 @@ parameters: The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the Neutron documentation for permitted values. Defaults to permitting any VLAN on the 'datacentre' physical network (See NeutronBridgeMappings). - type: string + type: comma_delimited_list NovaComputeDriver: type: string default: libvirt.LibvirtDriver @@ -562,6 +562,14 @@ parameters: constraints: - custom_constraint: nova.flavor +# Identifiers to trigger tasks on nodes + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes + resources: HeatAuthEncryptionKey: @@ -672,6 +680,7 @@ resources: MysqlVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} KeystonePublicApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]} NeutronApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]} + UpdateIdentifier: {get_param: UpdateIdentifier} Compute: type: OS::Heat::ResourceGroup @@ -729,6 +738,7 @@ resources: SnmpdReadonlyUserName: {get_param: SnmpdReadonlyUserName} SnmpdReadonlyUserPassword: {get_param: SnmpdReadonlyUserPassword} ServiceNetMap: {get_param: ServiceNetMap} + UpdateIdentifier: {get_param: UpdateIdentifier} BlockStorage: type: OS::Heat::ResourceGroup @@ -753,6 +763,7 @@ resources: RabbitClientUseSSL: {get_param: RabbitClientUseSSL} RabbitClientPort: {get_param: RabbitClientPort} NtpServer: {get_param: NtpServer} + UpdateIdentifier: {get_param: UpdateIdentifier} ObjectStorage: type: OS::Heat::ResourceGroup @@ -771,6 +782,7 @@ resources: Image: {get_param: SwiftStorageImage} Replicas: { get_param: SwiftReplicas} NtpServer: {get_param: NtpServer} + UpdateIdentifier: {get_param: UpdateIdentifier} CephStorage: type: OS::Heat::ResourceGroup @@ -785,6 +797,7 @@ resources: Flavor: {get_param: OvercloudCephStorageFlavor} NtpServer: {get_param: NtpServer} ServiceNetMap: {get_param: ServiceNetMap} + UpdateIdentifier: {get_param: UpdateIdentifier} ControllerIpListMap: type: OS::TripleO::Network::Ports::NetIpListMap diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index e3fa56b9..1ab381af 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -33,6 +33,12 @@ parameters: description: Mapping of service_name -> network name. Typically set via parameter_defaults in the resource registry. type: json + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: CephStorage: @@ -116,6 +122,18 @@ resources: ceph::profile::params::cluster_network: {get_input: ceph_cluster_network} ceph::profile::params::public_network: {get_input: ceph_public_network} + UpdateConfig: + type: OS::TripleO::Tasks::PackageUpdate + + UpdateDeployment: + type: OS::Heat::SoftwareDeployment + properties: + config: {get_resource: UpdateConfig} + server: {get_resource: CephStorage} + input_values: + update_identifier: + get_param: UpdateIdentifier + outputs: hosts_entry: value: diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index 007a489c..74df116a 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -111,6 +111,12 @@ parameters: default: 'false' description: Set to true to enable package installation via Puppet type: boolean + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: BlockStorage: @@ -221,6 +227,18 @@ resources: snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} + UpdateConfig: + type: OS::TripleO::Tasks::PackageUpdate + + UpdateDeployment: + type: OS::Heat::SoftwareDeployment + properties: + config: {get_resource: UpdateConfig} + server: {get_resource: BlockStorage} + input_values: + update_identifier: + get_param: UpdateIdentifier + outputs: hosts_entry: value: diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index d2cca8fb..12e701dd 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -132,7 +132,7 @@ parameters: The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the Neutron documentation for permitted values. Defaults to permitting any VLAN on the 'datacentre' physical network (See NeutronBridgeMappings). - type: string + type: comma_delimited_list NeutronPassword: default: unset description: The password for the neutron service account, used by neutron agents. @@ -252,6 +252,12 @@ parameters: description: Mapping of service_name -> network name. Typically set via parameter_defaults in the resource registry. type: json + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: @@ -369,7 +375,7 @@ resources: neutron_tenant_network_type: {get_input: neutron_tenant_network_type} neutron_tunnel_types: {get_input: neutron_tunnel_types} - neutron::network_vlan_ranges: {get_input: neutron_network_vlan_ranges} + neutron::plugins::ml2::network_vlan_ranges: {get_input: neutron_network_vlan_ranges} neutron_bridge_mappings: {get_input: neutron_bridge_mappings} neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling} neutron_physical_bridge: {get_input: neutron_physical_bridge} @@ -424,7 +430,14 @@ resources: neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronLocalIp]}]} neutron_tenant_network_type: {get_param: NeutronNetworkType} neutron_tunnel_types: {get_param: NeutronTunnelTypes} - neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges} + neutron_network_vlan_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronNetworkVLANRanges} neutron_bridge_mappings: {get_param: NeutronBridgeMappings} neutron_enable_tunneling: {get_param: NeutronEnableTunnelling} neutron_physical_bridge: {get_param: NeutronPhysicalBridge} @@ -459,6 +472,18 @@ resources: server: {get_param: NtpServer} enable_package_install: {get_param: EnablePackageInstall} + UpdateConfig: + type: OS::TripleO::Tasks::PackageUpdate + + UpdateDeployment: + type: OS::Heat::SoftwareDeployment + properties: + config: {get_resource: UpdateConfig} + server: {get_resource: NovaCompute} + input_values: + update_identifier: + get_param: UpdateIdentifier + outputs: ip_address: description: IP address of the server in the ctlplane network diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 2ed437fa..e3a07f36 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -292,7 +292,7 @@ parameters: The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the Neutron documentation for permitted values. Defaults to permitting any VLAN on the 'datacentre' physical network (See NeutronBridgeMappings). - type: string + type: comma_delimited_list NeutronPassword: default: unset description: The password for the neutron service and db account, used by neutron agents. @@ -451,6 +451,12 @@ parameters: description: Mapping of service_name -> network name. Typically set via parameter_defaults in the resource registry. type: json + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: @@ -644,7 +650,14 @@ resources: neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers} neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover} neutron_l3_ha: {get_param: NeutronL3HA} - neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges} + neutron_network_vlan_ranges: + str_replace: + template: "['RANGES']" + params: + RANGES: + list_join: + - "','" + - {get_param: NeutronNetworkVLANRanges} neutron_bridge_mappings: {get_param: NeutronBridgeMappings} neutron_public_interface: {get_param: NeutronPublicInterface} neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice} @@ -976,6 +989,18 @@ resources: tripleo::loadbalancer::public_virtual_interface: {get_input: public_virtual_interface} enable_package_install: {get_input: enable_package_install} + UpdateConfig: + type: OS::TripleO::Tasks::PackageUpdate + + UpdateDeployment: + type: OS::Heat::SoftwareDeployment + properties: + config: {get_resource: UpdateConfig} + server: {get_resource: Controller} + input_values: + update_identifier: + get_param: UpdateIdentifier + outputs: ip_address: description: IP address of the server in the ctlplane network diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 5901a9cf..40c44aef 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -17,6 +17,11 @@ neutron::plugins::ml2::tunnel_id_ranges: - '1:1000' neutron::plugins::ml2::vni_ranges: - '1:1000' +neutron::plugins::ml2::type_drivers: + - flat + - gre + - vxlan + - vlan sysctl_settings: net.ipv4.tcp_keepalive_intvl: diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp index caca89a8..00bab7f6 100644 --- a/puppet/manifests/overcloud_compute.pp +++ b/puppet/manifests/overcloud_compute.pp @@ -68,7 +68,6 @@ include ::neutron class { 'neutron::plugins::ml2': flat_networks => split(hiera('neutron_flat_networks'), ','), tenant_network_types => [hiera('neutron_tenant_network_type')], - type_drivers => [hiera('neutron_tenant_network_type')], } class { 'neutron::agents::ml2::ovs': diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index eed0319e..19ed97fb 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -277,7 +277,6 @@ if hiera('step') >= 3 { class { 'neutron::plugins::ml2': flat_networks => split(hiera('neutron_flat_networks'), ','), tenant_network_types => [hiera('neutron_tenant_network_type')], - type_drivers => [hiera('neutron_tenant_network_type')], } class { 'neutron::agents::ml2::ovs': bridge_mappings => split(hiera('neutron_bridge_mappings'), ','), diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index bdd6574d..ef34d911 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -96,11 +96,8 @@ if hiera('step') >= 1 { if downcase(hiera('ceilometer_backend')) == 'mongodb' { include ::mongodb::globals - # FIXME: replace with service_manage => false on ::mongodb::server - # when this is merged: https://github.com/puppetlabs/pupp etlabs-mongodb/pull/198 class { '::mongodb::server' : - service_ensure => undef, - service_enable => false, + service_manage => false, } } @@ -215,25 +212,20 @@ if hiera('step') >= 2 { op_params => 'start timeout=120s', clone_params => true, require => Class['::mongodb::server'], - before => Exec['mongodb-ready'], } # NOTE (spredzy) : The replset can only be run # once all the nodes have joined the cluster. $mongo_node_ips = hiera('mongo_node_ips') $mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017') $mongo_node_string = join($mongo_node_ips_with_port, ',') - $mongodb_replset = hiera('mongodb::server::replset') - $mongodb_cluster_ready_command = join(suffix(prefix($mongo_node_ips, '/bin/nc -w1 '), ' 27017 < /dev/null'), ' && ') $mongodb_pacemaker_resource = Pacemaker::Resource::Service[$::mongodb::params::service_name] - exec { 'mongodb-ready' : - command => $mongodb_cluster_ready_command, - timeout => 30, - tries => 180, - try_sleep => 10, + $mongodb_replset = hiera('mongodb::server::replset') + mongodb_conn_validator { $mongo_node_ips_with_port : + require => Pacemaker::Resource::Service[$::mongodb::params::service_name], + before => Mongodb_replset[$mongodb_replset], } mongodb_replset { $mongodb_replset : members => $mongo_node_ips_with_port, - require => Exec['mongodb-ready'], } } @@ -509,7 +501,6 @@ if hiera('step') >= 3 { class { 'neutron::plugins::ml2': flat_networks => split(hiera('neutron_flat_networks'), ','), tenant_network_types => [hiera('neutron_tenant_network_type')], - type_drivers => [hiera('neutron_tenant_network_type')], } class { 'neutron::agents::ml2::ovs': # manage_service => false # not implemented diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index 12292dec..2268f41f 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -51,6 +51,12 @@ parameters: default: 'false' description: Set to true to enable package installation via Puppet type: boolean + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: @@ -151,6 +157,18 @@ resources: server: {get_param: NtpServer} enable_package_install: {get_param: EnablePackageInstall} + UpdateConfig: + type: OS::TripleO::Tasks::PackageUpdate + + UpdateDeployment: + type: OS::Heat::SoftwareDeployment + properties: + config: {get_resource: UpdateConfig} + server: {get_resource: SwiftStorage} + input_values: + update_identifier: + get_param: UpdateIdentifier + outputs: hosts_entry: value: diff --git a/swift-storage.yaml b/swift-storage.yaml index 68923eef..c2819349 100644 --- a/swift-storage.yaml +++ b/swift-storage.yaml @@ -82,6 +82,12 @@ parameters: description: The user password for SNMPd with readonly rights running on all Overcloud nodes type: string hidden: true + UpdateIdentifier: + default: '' + type: string + description: > + Setting to a previously unused value during stack-update will trigger + package update on all nodes resources: SwiftConfig: |