Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
a715a9fb
Commit
a715a9fb
authored
7 years ago
by
Zuul
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Add task to create volumes path in cephfs"
parents
1bdb98e9
6bfc6d4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/roles/manila/tasks/deploy.yml
+7
-0
7 additions, 0 deletions
ansible/roles/manila/tasks/deploy.yml
ansible/roles/manila/tasks/fix_cephfs_owner.yml
+62
-0
62 additions, 0 deletions
ansible/roles/manila/tasks/fix_cephfs_owner.yml
with
69 additions
and
0 deletions
ansible/roles/manila/tasks/deploy.yml
+
7
−
0
View file @
a715a9fb
...
...
@@ -27,3 +27,10 @@
-
name
:
Flush handlers
meta
:
flush_handlers
-
include
:
fix_cephfs_owner.yml
when
:
-
enable_ceph | bool
-
enable_ceph_mds | bool
-
enable_manila_backend_cephfs_native | bool
-
inventory_hostname in groups['manila-share']
This diff is collapsed.
Click to expand it.
ansible/roles/manila/tasks/fix_cephfs_owner.yml
0 → 100644
+
62
−
0
View file @
a715a9fb
---
-
name
:
Check /tmp/cephfs path
command
:
"
docker
exec
-u
0
manila_share
ls
/tmp/cephfs/"
register
:
check_cephfs
changed_when
:
False
failed_when
:
check_cephfs.rc != 0 and check_cephfs.stderr.find('No such file or directory') == -1
run_once
:
True
-
name
:
Create /tmp/cephfs path
command
:
"
docker
exec
-u
0
manila_share
mkdir
-p
/tmp/cephfs"
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 %}
run_once
:
True
-
name
:
Pulling cephx keyring for manila
command
:
docker exec ceph_mon ceph auth get-key client.manila
register
:
manila_keyring
delegate_to
:
"
{{
groups['ceph-mon'][0]
}}"
changed_when
:
False
run_once
:
True
-
name
:
Umount cephfs
command
:
"
docker
exec
-u
0
manila_share
umount
/tmp/cephfs/"
register
:
umount_cephfs
changed_when
:
False
failed_when
:
False
run_once
:
True
-
name
:
Mount cephfs
command
:
"
docker
exec
-u
0
manila_share
mount
-t
ceph
{{cephfs_addr}}
/tmp/cephfs
-o
name=manila,secret={{
manila_keyring.stdout
}}"
register
:
mount_cephfs
changed_when
:
False
run_once
:
True
-
name
:
Check volumes path
command
:
"
docker
exec
-u
0
manila_share
ls
/tmp/cephfs/volumes"
register
:
check_volume
changed_when
:
False
failed_when
:
False
run_once
:
True
-
name
:
Create /tmp/cephfs/volumes path
command
:
"
docker
exec
-u
0
manila_share
mkdir
/tmp/cephfs/volumes"
register
:
create_volume
run_once
:
True
when
:
check_volume.rc !=
0
-
name
:
Change the owner and group of /tmp/cephfs/volumes
command
:
"
docker
exec
-u
0
manila_share
chown
manila:manila
/tmp/cephfs/volumes"
register
:
chown_volume
run_once
:
True
when
:
check_volume.rc != 0 and create_volume.rc ==
0
-
name
:
Umount cephfs
command
:
"
docker
exec
-u
0
manila_share
umount
/tmp/cephfs"
changed_when
:
False
register
:
umount_cephfs
run_once
:
True
when
:
mount_cephfs.rc ==
0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment