diff --git a/README.md b/README.md index 82555e050..4046be2f4 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ scenario](#all-in-one). | placement | | X | X | X | X | X | X | | neutron | | ovs | ovs | ovn | ovs | ovn | ovs | | cinder | | rbd | iscsi | | | iscsi | iscsi | -| manila | | | | | | lvm | | +| manila | | | | | cephfs | lvm | | | ceilometer | | X | X | | | | | | aodh | | X | X | | | | | | designate | | | | bind | | | | @@ -73,6 +73,7 @@ scenario](#all-in-one). | mistral | | | | X | | | | | barbican | | | X | X | | | | | ceph | | X | | | X | | | +| ceph mds | | | | | X | | | | ceph rgw | | | | | X | | | | vitrage | | X | | | | | | | watcher | | | | | X | | | diff --git a/copy_logs.sh b/copy_logs.sh index 65c3efd81..3d67f7705 100755 --- a/copy_logs.sh +++ b/copy_logs.sh @@ -300,6 +300,7 @@ if [ `command -v ceph` ]; then sudo ceph osd tree > $LOG_DIR/ceph-cmd/ceph-osd-tree.txt sudo ceph df > $LOG_DIR/ceph-cmd/ceph-df.txt sudo ceph osd pool ls detail > $LOG_DIR/ceph-cmd/ceph-osd-pool-ls.txt + sudo ceph fs ls > $LOG_DIR/ceph-cmd/ceph-fs-ls.txt sudo ceph-volume lvm list ceph_vg/lv_data > $LOG_DIR/ceph-cmd/ceph-volume-lvm-list.txt fi diff --git a/fixtures/scenario004.pp b/fixtures/scenario004.pp index ba1689bc6..5061271f9 100644 --- a/fixtures/scenario004.pp +++ b/fixtures/scenario004.pp @@ -63,13 +63,17 @@ class { 'openstack_integration::nova': } class { 'openstack_integration::ceph': - deploy_rgw => true, - swift_dropin => true, + deploy_rgw => true, + swift_dropin => true, + create_cephfs => true, } class { 'openstack_integration::horizon': octavia_enabled => true } include openstack_integration::watcher +class { 'openstack_integration::manila': + backend => 'cephfsnative' +} include openstack_integration::octavia include openstack_integration::provision @@ -77,11 +81,13 @@ include openstack_integration::provision # Don't test swift, radosgw won't pass the current tests # Glance, nova, neutron are true by default. class { 'openstack_integration::tempest': - horizon => true, - watcher => true, - bgpvpn => $bgpvpn_enabled, - l2gw => $l2gw_enabled, - l2gw_switch => 'cell08-5930-01::FortyGigE1/0/1|100', - dr => $bgp_dragent_enabled, - octavia => true, + horizon => true, + watcher => true, + bgpvpn => $bgpvpn_enabled, + l2gw => $l2gw_enabled, + l2gw_switch => 'cell08-5930-01::FortyGigE1/0/1|100', + dr => $bgp_dragent_enabled, + manila => true, + share_protocol => 'CEPHFS', + octavia => true, } diff --git a/manifests/ceph.pp b/manifests/ceph.pp index 21f05870a..250e55a3c 100644 --- a/manifests/ceph.pp +++ b/manifests/ceph.pp @@ -1,23 +1,27 @@ # Configure the Ceph services # # [*deploy_rgw*] -# (optional) Setting flag to enable the deployment -# of Ceph RadosGW and configure various services -# to use Swift provided by RGW as a backend. +# (optional) Setting flag to enable the deployment of Ceph RadosGW and +# configure various services to use Swift provided by RGW as a backend. # Defaults to false # # [*swift_dropin*] -# (optional) Flag if Ceph RGW will provide swift -# services for openstack +# (optional) Flag if Ceph RGW will provide swift services for openstack +# Defaults to false # # [*pg_num*] # (optional) Number of PGs per pool. # Defaults to 16. # +# [*create_cephfs*] +# (optional) Flag if CephFS will be created. +# Defaults to false +# class openstack_integration::ceph ( - $deploy_rgw = false, - $swift_dropin = false, - $pg_num = 16, + $deploy_rgw = false, + $swift_dropin = false, + $pg_num = 16, + $create_cephfs = false, ) { include openstack_integration::config @@ -67,6 +71,7 @@ test -b /dev/ceph_vg/lv_data osd_pool_default_min_size => '1', mon_key => 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==', mgr_key => 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==', + mds_key => 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==', osd_max_object_name_len => 256, osd_max_object_namespace_len => 64, client_keys => { @@ -88,6 +93,12 @@ test -b /dev/ceph_vg/lv_data 'cap_mon' => 'profile rbd', 'cap_osd' => 'profile rbd pool=cinder, profile rbd pool=nova, profile rbd pool=glance, profile rbd pool=gnocchi', }, + 'client.manila' => { + 'secret' => 'AQD7kyJQQGoOBhAAqrPAqSopSwPrrfMMomzVdw==', + 'mode' => '0644', + 'cap_mgr' => 'allow rw', + 'cap_mon' => 'allow r', + } }, osds => { 'ceph_vg/lv_data' => {}, @@ -109,6 +120,23 @@ test -b /dev/ceph_vg/lv_data class { 'ceph::profile::mon': } class { 'ceph::profile::osd': } + if $create_cephfs { + ceph::pool { ['cephfs_data', 'cephfs_metadata']: + pg_num => $pg_num, + } + -> ceph::fs { 'cephfs': + metadata_pool => 'cephfs_metadata', + data_pool => 'cephfs_data', + } + ~> exec { 'enable cephfs snapshot': + command => 'ceph fs set cephfs allow_new_snaps true', + path => ['/bin', '/usr/bin'], + refreshonly => true, + tag => 'create-cephfs', + } + class { 'ceph::profile::mds': } + } + # Extra Ceph configuration to increase performances $ceph_extra_config = { 'global/osd_journal_size' => { value => '100' }, diff --git a/manifests/manila.pp b/manifests/manila.pp index f0ada4e73..588fbefc6 100644 --- a/manifests/manila.pp +++ b/manifests/manila.pp @@ -91,8 +91,15 @@ class openstack_integration::manila ( memcached_servers => $::openstack_integration::config::memcached_servers, service_token_roles_required => true, } + + $share_protocol = $backend ? { + 'cephfsnative' => 'CEPHFS', + default => 'NFS' + } + class { 'manila::api': - service_name => 'httpd', + service_name => 'httpd', + enabled_share_protocols => $share_protocol, } include apache class { 'manila::wsgi::apache': @@ -119,6 +126,12 @@ class openstack_integration::manila ( lvm_share_export_ips => $::openstack_integration::config::host, } } + 'cephfsnative': { + manila::backend::cephfs { 'cephfsnative': + cephfs_conf_path => '/etc/ceph/ceph.conf', + } + Exec<| tag == 'create-cephfs' |> -> Anchor['manila::service::begin'] + } default: { fail("Unsupported backend (${backend})") } diff --git a/run_tests.sh b/run_tests.sh index 5227f317b..227442d47 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -324,6 +324,7 @@ echo 'barbican_tempest_plugin.tests.scenario.test_volume_encryption.VolumeEncryp echo 'barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningTest.test_signed_image_upload_and_boot' >> /tmp/openstack/tempest/test-include-list.txt # Manila +echo 'manila_tempest_tests.tests.api.test_shares.SharesCephFSTest.test_create_get_delete_share' >> /tmp/openstack/tempest/test-include-list.txt echo 'manila_tempest_tests.tests.api.test_shares.SharesNFSTest.test_create_get_delete_share' >> /tmp/openstack/tempest/test-include-list.txt if uses_debs; then