diff --git a/etc/openstack_deploy/openstack_user_config.yml.aio b/etc/openstack_deploy/openstack_user_config.yml.aio index 4a5f927bb1..b35005eb18 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.aio +++ b/etc/openstack_deploy/openstack_user_config.yml.aio @@ -99,6 +99,7 @@ global_overrides: - glance_api - cinder_api - cinder_volume + - manila_share - nova_compute - swift_proxy diff --git a/etc/openstack_deploy/openstack_user_config.yml.aio.j2 b/etc/openstack_deploy/openstack_user_config.yml.aio.j2 index 0941df08d9..12e22a0c63 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.aio.j2 +++ b/etc/openstack_deploy/openstack_user_config.yml.aio.j2 @@ -124,6 +124,7 @@ global_overrides: - cinder_api - cinder_volume - nova_compute + - manila_share - swift_proxy # galera, memcache, rabbitmq, utility diff --git a/etc/openstack_deploy/openstack_user_config.yml.prod-ceph.example b/etc/openstack_deploy/openstack_user_config.yml.prod-ceph.example index 97431a37ed..4dec627175 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.prod-ceph.example +++ b/etc/openstack_deploy/openstack_user_config.yml.prod-ceph.example @@ -70,6 +70,7 @@ global_overrides: - glance_api - cinder_api - cinder_volume + - manila_share - nova_compute - ceph-osd @@ -106,6 +107,12 @@ shared-infra_hosts: *infrastructure_hosts # ceph-mon containers ceph-mon_hosts: *infrastructure_hosts +# ceph-mds containers +ceph-mds_hosts: *infrastructure_hosts + +# ganesha-nfs hosts +ceph-nfs_hosts: *infrastructure_hosts + # repository (apt cache, python packages, etc) repo-infra_hosts: *infrastructure_hosts @@ -156,5 +163,9 @@ metering-alarm_hosts: *infrastructure_hosts # gnocchi (telemetry metrics storage) metrics_hosts: *infrastructure_hosts +# manila (share service) +manila-infra_hosts: *infrastructure_hosts +manila-data_hosts: *infrastructure_hosts + # ceilometer compute agent (telemetry data collection) metering-compute_hosts: *compute_hosts diff --git a/inventory/group_vars/all/ceph.yml b/inventory/group_vars/all/ceph.yml index c726cb5cd0..021f80783a 100644 --- a/inventory/group_vars/all/ceph.yml +++ b/inventory/group_vars/all/ceph.yml @@ -54,5 +54,5 @@ openstack_keys: - { name: client.cinder, caps: { mon: "profile rbd", osd: "allow class-read object_prefix rbd_children, profile rbd pool={{ openstack_cinder_pool.name }}, profile rbd pool={{ openstack_nova_pool.name }}, profile rbd pool={{ openstack_glance_pool.name }}"}, mode: "0600" } - { name: client.cinder-backup, caps: { mon: "profile rbd", osd: "profile rbd pool={{ openstack_cinder_backup_pool.name }}"}, mode: "0600" } - { name: client.gnocchi, caps: { mon: "profile rbd", osd: "profile rbd pool={{ openstack_gnocchi_pool.name }}"}, mode: "0600", } + - { name: client.manila, caps: { mon: "allow r, allow command 'auth del', allow command 'auth caps', allow command 'auth get', allow command 'auth get-or-create'", mds: "allow *", osd: "allow rw"}, mode: "0600", } - { name: client.openstack, caps: { mon: "profile rbd", osd: "profile rbd pool={{ openstack_glance_pool.name }}, profile rbd pool={{ openstack_nova_pool.name }}, profile rbd pool={{ openstack_cinder_pool.name }}, profile rbd pool={{ openstack_cinder_backup_pool.name }}"}, mode: "0600" } - diff --git a/inventory/group_vars/ceph_all.yml b/inventory/group_vars/ceph_all.yml index 1f585630c3..f94cb6142a 100644 --- a/inventory/group_vars/ceph_all.yml +++ b/inventory/group_vars/ceph_all.yml @@ -18,16 +18,50 @@ ceph_container_bind_mounts: - bind_dir_path: "/var/lib/ceph" mount_path: "/openstack/{{ inventory_hostname }}" + +ceph_conf_overrides_manila: + client.manila: + "client mount gid": 0 + "client mount uid": 0 # To extend ceph_conf_overrides use the ceph_conf_overrides_custom which will # combine any ceph_conf_overrides with other RGW specific overrides. ceph_conf_overrides_custom: {} -ceph_conf_overrides: "{{ (ceph_conf_overrides_rgw | default({})) | combine(ceph_conf_overrides_custom, recursive=True) }}" +ceph_conf_overrides: "{{ (ceph_conf_overrides_rgw | default({})) | combine(ceph_conf_overrides_manila, recursive=True) | combine(ceph_conf_overrides_custom, recursive=True) }}" # Disable the NFS gateway PPA and package install by default as it is not # needed. -nfs_file_gw: False +nfs_file_gw: "{{ (('ceph-nfs' in groups) and ('ceph-mds' in groups)) }}" nfs_obj_gw: False +nfs_ganesha_stable: "{{ (ansible_distribution_release != 'bionic') }}" +nfs_ganesha_stable_branch: V2.8-stable # NTP in an OSA environment is handled by ansible-hardening using chrony # ceph-ansible's default enabling of ntpd conflicts with the OSA defaults ntp_service_enabled: False + + +openstack_cephfs_data_pool: + name: "manila_data" + pg_num: "{{ osd_pool_default_pg_num }}" + pgp_num: "{{ osd_pool_default_pg_num }}" + rule_name: "replicated_rule" + type: 1 + erasure_profile: "" + expected_num_objects: "" + application: "cephfs" + size: "{{ osd_pool_default_size }}" + min_size: "{{ osd_pool_default_min_size }}" +openstack_cephfs_metadata_pool: + name: "manila_metadata" + pg_num: "{{ osd_pool_default_pg_num }}" + pgp_num: "{{ osd_pool_default_pg_num }}" + rule_name: "replicated_rule" + type: 1 + erasure_profile: "" + expected_num_objects: "" + application: "cephfs" + size: "{{ osd_pool_default_size }}" + min_size: "{{ osd_pool_default_min_size }}" + +cephfs_data_pool: "{{ openstack_cephfs_data_pool }}" +cephfs_metadata_pool: "{{ openstack_cephfs_metadata_pool }}" diff --git a/inventory/group_vars/manila_all.yml b/inventory/group_vars/manila_all.yml index 0ac500afb9..1652f5e94e 100644 --- a/inventory/group_vars/manila_all.yml +++ b/inventory/group_vars/manila_all.yml @@ -16,12 +16,16 @@ # Set the available protocol list manila_enabled_share_protocols: - NFS - - CIFS - CEPHFS _manila_default_share_type: "{{ (manila_backends | default({})).keys() }}" manila_default_share_type: "{{ ((_manila_default_share_type | length) > 0) | ternary(_manila_default_share_type[0], null) }}" +# manila_backend_lvm_inuse: True if current host has an lvm backend +manila_backend_lvm_inuse: "{{ (manila_backends | default({}) | to_json).find('lvm') != -1 }}" +# manila_backend_rbd_inuse: True if the current host has an rbd backend +manila_backend_rbd_inuse: "{{ (manila_backends | default({}) | to_json).find('manila.share.drivers.cephfs') != -1 }}" + # V1 api config manila_service_publicuri: "{{ openstack_service_publicuri_proto|default(manila_service_proto) }}://{{ external_lb_vip_address }}:{{ manila_service_port }}" manila_service_internaluri: "{{ openstack_service_internaluri_proto|default(manila_service_proto) }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}" diff --git a/playbooks/ceph-nfs-install.yml b/playbooks/ceph-nfs-install.yml index 49e3d4ee5a..2849bea567 100644 --- a/playbooks/ceph-nfs-install.yml +++ b/playbooks/ceph-nfs-install.yml @@ -48,6 +48,9 @@ - role: ceph-handler tags: - skip_ansible_lint + - role: ceph-common + tags: + - skip_ansible_lint - role: ceph-nfs tags: - skip_ansible_lint diff --git a/playbooks/ceph-rgw-install.yml b/playbooks/ceph-rgw-install.yml index 34602f4bc1..79cff15c53 100644 --- a/playbooks/ceph-rgw-install.yml +++ b/playbooks/ceph-rgw-install.yml @@ -22,11 +22,6 @@ vars_files: - "defaults/{{ install_method }}_install.yml" pre_tasks: - - import_tasks: common-tasks/os-log-dir-setup.yml - vars: - log_dirs: - - src: "/openstack/log/{{ inventory_hostname }}-ceph" - dest: "/var/log/ceph" - import_tasks: common-tasks/ceph-server.yml diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml index 5edc8aed94..a0d46b4a65 100644 --- a/playbooks/os-manila-install.yml +++ b/playbooks/os-manila-install.yml @@ -36,21 +36,6 @@ - "'manila_api' in group_names" - "groups['manila_api'] | length > 1" - - name: Configure container (non-nfs) - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - vars: - list_of_bind_mounts: "{{ manila_container_bind_mounts }}" - when: - - not is_metal - - manila_default_store == "file" - - (manila_nfs_client is not defined) or (manila_nfs_client | length == 0) - - - name: Configure container (nfs) - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" - when: - - not is_metal - - (manila_default_store != "file") or (manila_nfs_client is defined) - - include_tasks: common-tasks/unbound-clients.yml when: - hostvars['localhost']['resolvconf_enabled'] | bool diff --git a/playbooks/setup-infrastructure.yml b/playbooks/setup-infrastructure.yml index 4ab7c90633..b66a7e44e0 100644 --- a/playbooks/setup-infrastructure.yml +++ b/playbooks/setup-infrastructure.yml @@ -23,6 +23,7 @@ - import_playbook: rabbitmq-install.yml - import_playbook: etcd-install.yml - import_playbook: ceph-install.yml +- import_playbook: ceph-nfs-install.yml - import_playbook: rsyslog-install.yml # The journald-remote should be disabled by default until diff --git a/scripts/log-collect.sh b/scripts/log-collect.sh index 057d2b182f..9a634849c7 100755 --- a/scripts/log-collect.sh +++ b/scripts/log-collect.sh @@ -42,6 +42,7 @@ COMMON_ETC_LOG_NAMES="apt \ calico \ ceph \ etcd \ + ganesha \ haproxy \ httpd \ memcached \ diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index ebd49d1911..e1de11e6ec 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -80,6 +80,12 @@ placement_wsgi_processes_max: 2 placement_wsgi_processes: 2 placement_wsgi_buffer_size: 16384 +## Manila +manila_wsgi_processes_max: 2 +manila_wsgi_processes: 2 +manila_wsgi_threads: 1 +manila_wsgi_buffer_size: 65535 + ## Nova nova_reserved_host_memory_mb: 256 nova_wsgi_threads: 1 diff --git a/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 index 1717cf1912..7341b3f610 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_manila.yml.j2 @@ -15,33 +15,65 @@ tempest_plugins: repo: https://opendev.org/openstack/manila-tempest-plugin branch: master +tempest_flavors: + - name: tempest1 + id: 201 + ram: 256 + disk: 1 + vcpus: 1 + - name: tempest2 + id: 202 + ram: 512 + disk: 1 + vcpus: 1 + - name: manila-service-flavor + id: 100 + ram: 256 + disk: 2 + vcpus: 1 + tempest_test_whitelist: - manila_tempest_tests.tests.scenario.test_share_basic_ops +tempest_run_concurrency: 0 + tempest_tempest_conf_overrides: share: + run_consistency_group_tests: False + run_snapshot_tests: False + multitenancy_enabled: False + run_shrink_tests: True + run_extend_tests: True + multi_backend: False + enable_protocols: nfs + run_ipv6_tests: False + share_creation_retry_number: 2 + suppress_errors_in_cleanup: True + capability_storage_protocol: NFS + enable_ip_rules_for_protocols: nfs image_with_share_tools: manila-service-image image_password: manila - enable_protocols: nfs - enable_ip_rules_for_protocols: nfs - enable_ro_access_level_for_protocols: nfs - suppress_errors_in_cleanup: true - share_creation_retry_number: 3 - run_ipv6_tests: False + +tempest_images: + - url: "http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img" + checksum: "sha256:a8dd75ecffd4cdd96072d60c2237b448e0c8b2bc94d57f10fdbc8c481d9005b8" + format: "qcow2" + name: "cirros" + - url: "http://tarballs.openstack.org/manila-image-elements/images/manila-service-image-master.qcow2" + format: "qcow2" + name: "manila-service-image" manila_backends: - nfs-share1: - share_backend_name: NFS_SHARE1 - share_driver: manila.share.drivers.lvm.LVMShareDriver + cephfsnfs1: + cephfs_auth_id: manila + cephfs_cluster_name: ceph + cephfs_conf_path: /etc/ceph/ceph.conf + cephfs_enable_snapshots: False + cephfs_ganesha_server_ip: 172.29.236.100 + cephfs_ganesha_server_is_remote: False + cephfs_protocol_helper_type: NFS driver_handles_share_servers: False - lvm_share_volume_group: manila-shares - lvm_share_export_ips: 172.29.244.100 - generic: - share_backend_name: GENERIC - share_driver: manila.share.drivers.generic.GenericShareDriver - driver_handles_share_servers: True - service_instance_flavor_id: 100 - service_image_name: manila-service-image - service_instance_user: manila - service_instance_password: manila - interface_driver: manila.network.linux.interface.BridgeInterfaceDriver + share_backend_name: CEPHFSNFS1 + share_driver: manila.share.drivers.cephfs.driver.CephFSDriver + ganesha_rados_store_enable: False + ganesha_rados_store_pool_name: manila_data diff --git a/tests/roles/bootstrap-host/vars/main.yml b/tests/roles/bootstrap-host/vars/main.yml index 6bc535aa43..0450f83031 100644 --- a/tests/roles/bootstrap-host/vars/main.yml +++ b/tests/roles/bootstrap-host/vars/main.yml @@ -41,6 +41,9 @@ bootstrap_host_scenarios_expanded: |- {% if 'magnum' in bootstrap_host_scenarios %} {% set _ = scenario_list.extend(['heat']) %} {% endif %} + {% if 'manila' in bootstrap_host_scenarios %} + {% set _ = scenario_list.extend(['ceph']) %} + {% endif %} {% if 'murano' in bootstrap_host_scenarios %} {% set _ = scenario_list.extend(['heat']) %} {% endif %}