Create /volumes when using external ceph
Currently we only create the /volumes directory when using the kolla-ansible bundled ceph. This extends the functionality to external ceph. Change-Id: I1e9a40e4ee893a53f04909ef7835be005c9b5276 Closes-Bug: #1778720
This commit is contained in:
parent
e7958d1435
commit
2f6b1c6890
@ -35,6 +35,7 @@ manila_services:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/run/:/run/:shared"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "/lib/modules:/lib/modules:ro"
|
||||
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
|
||||
dimensions: "{{ manila_share_dimensions }}"
|
||||
manila-data:
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
- include_tasks: fix_cephfs_owner.yml
|
||||
when:
|
||||
- enable_ceph | bool
|
||||
- enable_ceph_mds | bool
|
||||
- not enable_ceph | bool or enable_ceph_mds | bool
|
||||
- enable_manila_backend_cephfs_native | bool
|
||||
- inventory_hostname in groups['manila-share']
|
||||
|
@ -11,14 +11,25 @@
|
||||
run_once: True
|
||||
when: check_cephfs.rc != 0
|
||||
|
||||
- name: Get cephfs addr
|
||||
set_fact: cephfs_addr={% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + hostvars[host]['storage_interface']]['ipv4']['address'] }}{% if loop.last %}:6789:/{% else %},{% endif %}{% endfor %}
|
||||
- name: Get monitor dump
|
||||
command: docker exec manila_share ceph mon dump -c /etc/ceph/ceph.conf --name client.manila -f json
|
||||
register: ceph_monitor_dump
|
||||
changed_when: False
|
||||
run_once: True
|
||||
|
||||
- name: Pulling cephx keyring for manila
|
||||
command: docker exec ceph_mon ceph auth get-key client.manila
|
||||
- name: Get cephfs addr
|
||||
vars:
|
||||
query: mons[*].public_addr
|
||||
# take only ip and port from public_addr, e.g from public_addr: 10.66.1.5:6789/0
|
||||
# use 10.66.1.5:6789
|
||||
regex: "[^/]*"
|
||||
set_fact:
|
||||
cephfs_addr: "{{ ceph_monitor_dump.stdout | from_json | json_query(query) | map('regex_search', regex) | join(',') }}"
|
||||
run_once: true
|
||||
|
||||
- name: Get cephfs secret
|
||||
command: docker exec manila_share ceph-authtool -p /etc/ceph/ceph.client.manila.keyring -n client.manila
|
||||
register: manila_keyring
|
||||
delegate_to: "{{ groups['ceph-mon'][0] }}"
|
||||
changed_when: False
|
||||
run_once: True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user