Merge "Create /volumes when using external ceph" into stable/rocky

This commit is contained in:
Zuul 2019-04-03 09:42:30 +00:00 committed by Gerrit Code Review
commit bbe5dae032
4 changed files with 19 additions and 7 deletions

View File

@ -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:

View File

@ -19,7 +19,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']

View File

@ -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

View File

@ -11,3 +11,4 @@ setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.
PyYAML>=3.12 # MIT
netaddr>=0.7.18 # BSD
cryptography>=2.1 # BSD/Apache-2.0
jmespath>=0.9.3 # MIT