Merge "Upgrade rhel_reg_sat_repo to 6.2" into stable/pike
authorZuul <zuul@review.openstack.org>
Fri, 3 Nov 2017 20:25:28 +0000 (20:25 +0000)
committerGerrit Code Review <review@openstack.org>
Fri, 3 Nov 2017 20:25:28 +0000 (20:25 +0000)
docker/services/ceph-ansible/ceph-base.yaml
docker/services/glance-api.yaml
docker/services/mistral-api.yaml
extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration
puppet/extraconfig/pre_deploy/compute/neutron-ml2-bigswitch.yaml
puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml
puppet/role.role.j2.yaml
releasenotes/notes/ceph-pools-with-ceph-ansible-f82425e585f90ef6.yaml [new file with mode: 0644]
tools/yaml-validate.py

index 8cc81fb..4674ec1 100644 (file)
@@ -73,15 +73,9 @@ parameters:
     description: >
       It can be used to override settings for one of the predefined pools, or to create
       additional ones. Example:
-      {
-        "volumes": {
-          "size": 5,
-          "pg_num": 128,
-          "pgp_num": 128
-         }
-      }
-    default: {}
-    type: json
+      [{"name": "volumes", "pg_num": 64, "rule_name": ""}]
+    default: []
+    type: comma_delimited_list
   CinderRbdPoolName:
     default: volumes
     type: string
@@ -225,13 +219,7 @@ outputs:
                       - {get_param: NovaRbdPoolName}
                       - {get_param: GlanceRbdPoolName}
                       - {get_param: GnocchiRbdPoolName}
-              - repeat:
-                  template:
-                    name: <%pool%>
-                    pg_num: {get_param: CephPoolDefaultPgNum}
-                    rule_name: ""
-                  for_each:
-                    <%pool%>: {get_param: CephPools}
+              - {get_param: CephPools}
           openstack_keys: &openstack_keys
           - name:
               list_join:
index e1a3827..1a6f5c7 100644 (file)
@@ -48,6 +48,16 @@ parameters:
     default: false
     description: Remove package if the service is being disabled during upgrade
     type: boolean
+  GlanceNfsShare:
+    default: ''
+    description: >
+      NFS share to mount for image storage (when GlanceNfsEnabled is true)
+    type: string
+  GlanceNfsOptions:
+    default: 'intr,context=system_u:object_r:glance_var_lib_t:s0'
+    description: >
+      NFS mount options for image storage (when GlanceNfsEnabled is true)
+    type: string
 
 conditions:
 
@@ -108,6 +118,10 @@ outputs:
               dest: "/etc/ceph/"
               merge: true
               preserve_properties: true
+          permissions:
+            - path: /var/lib/glance
+              owner: glance:glance
+              recurse: true
         /var/lib/kolla/config_files/glance_api_tls_proxy.json:
           command: /usr/sbin/httpd -DFOREGROUND
           config_files:
@@ -182,6 +196,15 @@ outputs:
                       - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
                 - {}
       host_prep_tasks:
+        - name: Mount NFS on host
+          vars:
+            nfs_backend_enable: {get_param: GlanceNfsEnabled}
+          mount: name=/var/lib/glance src="{{item.NFS_SHARE}}" fstype=nfs4 opts="{{item.NFS_OPTIONS}}" state=mounted
+          with_items:
+            - NFS_SHARE: {get_param: GlanceNfsShare}
+              NFS_OPTIONS: {get_param: GlanceNfsOptions}
+          when:
+            - nfs_backend_enable
         - name: create persistent logs directory
           file:
             path: "{{ item }}"
index 50c8021..1b4b44f 100644 (file)
@@ -36,6 +36,16 @@ parameters:
     default: {}
     description: Parameters specific to the role
     type: json
+  MistralWorkers:
+    default: 1
+    description: The number of workers for the mistral-api.
+    type: number
+  MistralApiPolicies:
+    description: |
+      A hash of policies to configure for Mistral API.
+      e.g. { mistral-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
+    default: {}
+    type: json
 
 resources:
 
@@ -45,6 +55,16 @@ resources:
   MySQLClient:
     type: ../../puppet/services/database/mysql-client.yaml
 
+  MistralBase:
+    type: ../../puppet/services/mistral-base.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
+      ServiceData: {get_param: ServiceData}
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
+
   MistralApiBase:
     type: ../../puppet/services/mistral-api.yaml
     properties:
@@ -60,9 +80,23 @@ outputs:
     description: Role data for the Mistral API role.
     value:
       service_name: {get_attr: [MistralApiBase, role_data, service_name]}
+      # FIXME(mandre) restore once mistral-api image has the necessary packages
+      # to run on top of apache
+      # config_settings:
+      #   map_merge:
+      #     - get_attr: [MistralApiBase, role_data, config_settings]
       config_settings:
         map_merge:
-          - get_attr: [MistralApiBase, role_data, config_settings]
+          - get_attr: [MistralBase, role_data, config_settings]
+          - mistral::api::api_workers: {get_param: MistralWorkers}
+            mistral::api::bind_host: {get_param: [ServiceNetMap, MistralApiNetwork]}
+            mistral::policy::policies: {get_param: MistralApiPolicies}
+            tripleo.mistral_api.firewall_rules:
+              '133 mistral':
+                dport:
+                  - 8989
+                  - 13989
+            mistral_wsgi_enabled: false
       logging_source: {get_attr: [MistralApiBase, role_data, logging_source]}
       logging_groups: {get_attr: [MistralApiBase, role_data, logging_groups]}
       step_config: &step_config
index d754aaf..c7d0b23 100644 (file)
@@ -247,7 +247,7 @@ case "${REG_METHOD:-}" in
             rpm -Uvh katello-ca-consumer-latest.noarch.rpm || true
             retry subscription-manager register $opts
             retry subscription-manager $repos
-            retry yum install -y katello-agent || true # needed for errata reporting to satellite6
+            yum install -y katello-agent || true # needed for errata reporting to satellite6
             katello-package-upload
 
             # https://bugs.launchpad.net/tripleo/+bug/1711435
index 93408dd..6e010de 100644 (file)
@@ -24,17 +24,16 @@ resources:
       config:
         datafiles:
           neutron_bigswitch_data:
-            mapped_data:
-              neutron::agents::bigswitch::agent_enabled: {get_input: neutron_enable_bigswitch_agent}
-              neutron::agents::bigswitch::lldp_enabled: {get_input: neutron_enable_bigswitch_lldp}
-              # NOTE(aschultz): required for the puppet module but we don't
-              # actually want them defined on the compute nodes so we're
-              # relying on the puppet  module's handling of <SERVICE DEFAULT>
-              # to just not set these but still accept that they were defined.
-              # This will should be fixed in puppet-neutron and removed here,
-              # but for backportability, we need to define something.
-              neutron::plugins::ml2::bigswitch::restproxy::servers: '<SERVICE DEFAULT>'
-              neutron::plugins::ml2::bigswitch::restproxy::server_auth: '<SERVICE DEFAULT>'
+            neutron::agents::bigswitch::agent_enabled: {get_input: neutron_enable_bigswitch_agent}
+            neutron::agents::bigswitch::lldp_enabled: {get_input: neutron_enable_bigswitch_lldp}
+            # NOTE(aschultz): required for the puppet module but we don't
+            # actually want them defined on the compute nodes so we're
+            # relying on the puppet  module's handling of <SERVICE DEFAULT>
+            # to just not set these but still accept that they were defined.
+            # This will should be fixed in puppet-neutron and removed here,
+            # but for backportability, we need to define something.
+            neutron::plugins::ml2::bigswitch::restproxy::servers: '<SERVICE DEFAULT>'
+            neutron::plugins::ml2::bigswitch::restproxy::server_auth: '<SERVICE DEFAULT>'
 
 
   NeutronBigswitchDeployment:
index 71a915d..cda598a 100644 (file)
@@ -50,16 +50,15 @@ resources:
       config:
         datafiles:
           neutron_bigswitch_data:
-            mapped_data:
-              neutron::agents::bigswitch::agent_enabled: {get_input: neutron_enable_bigswitch_agent}
-              neutron::agents::bigswitch::lldp_enabled: {get_input: neutron_enable_bigswitch_lldp}
-              neutron::plugins::ml2::bigswitch::restproxy::servers: {get_input: restproxy_servers}
-              neutron::plugins::ml2::bigswitch::restproxy::server_auth: {get_input: restproxy_server_auth}
-              neutron::plugins::ml2::bigswitch::restproxy::auto_sync_on_failure: {get_input: restproxy_auto_sync_on_failure}
-              neutron::plugins::ml2::bigswitch::restproxy::consistency_interval: {get_input: restproxy_consistency_interval}
-              neutron::plugins::ml2::bigswitch::restproxy::neutron_id: {get_input: restproxy_neutron_id}
-              neutron::plugins::ml2::bigswitch::restproxy::server_ssl: {get_input: restproxy_server_ssl}
-              neutron::plugins::ml2::bigswitch::restproxy::ssl_cert_directory: {get_input: restproxy_ssl_cert_directory}
+            neutron::agents::bigswitch::agent_enabled: {get_input: neutron_enable_bigswitch_agent}
+            neutron::agents::bigswitch::lldp_enabled: {get_input: neutron_enable_bigswitch_lldp}
+            neutron::plugins::ml2::bigswitch::restproxy::servers: {get_input: restproxy_servers}
+            neutron::plugins::ml2::bigswitch::restproxy::server_auth: {get_input: restproxy_server_auth}
+            neutron::plugins::ml2::bigswitch::restproxy::auto_sync_on_failure: {get_input: restproxy_auto_sync_on_failure}
+            neutron::plugins::ml2::bigswitch::restproxy::consistency_interval: {get_input: restproxy_consistency_interval}
+            neutron::plugins::ml2::bigswitch::restproxy::neutron_id: {get_input: restproxy_neutron_id}
+            neutron::plugins::ml2::bigswitch::restproxy::server_ssl: {get_input: restproxy_server_ssl}
+            neutron::plugins::ml2::bigswitch::restproxy::ssl_cert_directory: {get_input: restproxy_ssl_cert_directory}
 
   NeutronBigswitchDeployment:
     type: OS::Heat::StructuredDeployment
index 15da177..d53afd0 100644 (file)
@@ -565,6 +565,7 @@ resources:
           - bootstrap_node # provided by allNodesConfig
           - all_nodes # provided by allNodesConfig
           - vip_data # provided by allNodesConfig
+          - net_ip_map
           - '"%{::osfamily}"'
           # The following are required for compatibility with the Controller role
           # where some vendor integrations added hieradata via ExtraConfigPre
@@ -578,6 +579,7 @@ resources:
           service_names:
             service_names: {get_param: ServiceNames}
             sensu::subscriptions: {get_param: MonitoringSubscriptions}
+          net_ip_map: {get_attr: [NetIpMap, net_ip_map]}
           service_configs:
             map_replace:
               - {get_param: ServiceConfigSettings}
diff --git a/releasenotes/notes/ceph-pools-with-ceph-ansible-f82425e585f90ef6.yaml b/releasenotes/notes/ceph-pools-with-ceph-ansible-f82425e585f90ef6.yaml
new file mode 100644 (file)
index 0000000..63e6f21
--- /dev/null
@@ -0,0 +1,17 @@
+---
+upgrade:
+  - |
+    The format to use for the CephPools parameter needs to be updated into the
+    form expected by ceph-ansible. For example, for a new pool named `mypool`
+    it should change from:
+    { "mypool": { "size": 3, "pg_num": 128, "pgp_num": 128 } }
+    into:
+    [ { "name": "mypool", "pg_num": 128, "rule_name": "" } ]
+    The first is a map where each key is a pool name and its value the pool
+    properties, the second is a list where each item describes all properties
+    of a pool, including its name.
+other:
+  - |
+    With the migration from puppet-ceph to ceph-ansible for the deployment
+    of Ceph, the format of CephPools parameter changes because the two tools
+    use a different format to represent the list of additional pools to create.
index c322962..76f856d 100755 (executable)
@@ -46,7 +46,10 @@ OPTIONAL_DOCKER_PUPPET_CONFIG_SECTIONS = [ 'puppet_tags', 'volumes' ]
 # consistency across files on.  This should only contain parameters whose
 # definition we cannot change for backwards compatibility reasons.  New
 # parameters to the templates should not be added to this list.
-PARAMETER_DEFINITION_EXCLUSIONS = {'ManagementNetCidr': ['default'],
+PARAMETER_DEFINITION_EXCLUSIONS = {'CephPools': ['description',
+                                                 'type',
+                                                 'default'],
+                                   'ManagementNetCidr': ['default'],
                                    'ManagementAllocationPools': ['default'],
                                    'ExternalNetCidr': ['default'],
                                    'ExternalAllocationPools': ['default'],