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
e45781cf
Commit
e45781cf
authored
9 years ago
by
Jenkins
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Reconfigure ceph service"
parents
9cc5def5
efd10993
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/roles/ceph/tasks/do_reconfigure.yml
+145
-0
145 additions, 0 deletions
ansible/roles/ceph/tasks/do_reconfigure.yml
ansible/roles/ceph/tasks/reconfigure.yml
+5
-0
5 additions, 0 deletions
ansible/roles/ceph/tasks/reconfigure.yml
with
150 additions
and
0 deletions
ansible/roles/ceph/tasks/do_reconfigure.yml
0 → 100644
+
145
−
0
View file @
e45781cf
---
-
name
:
Ensuring the containers ceph_mon and ceph_rgw are up
kolla_docker
:
name
:
"
{{
item.name
}}"
action
:
"
get_container_state"
register
:
container_state
failed_when
:
container_state.Running ==
false
when
:
inventory_hostname in groups[item.group]
with_items
:
-
{
name
:
ceph_mon
,
group
:
ceph-mon
}
-
{
name
:
ceph_rgw
,
group
:
ceph-rgw
}
-
name
:
Gathering OSD IDs
command
:
"
cat
/var/lib/ceph/osd/{{
item['fs_uuid']
}}/whoami"
with_items
:
osds
register
:
id
changed_when
:
False
failed_when
:
id.rc !=
0
-
name
:
Ensuring the ceph_osd container is up
kolla_docker
:
name
:
"
ceph_osd_{{
item.0.stdout
}}"
action
:
"
get_container_state"
register
:
container_state
failed_when
:
container_state.Running ==
false
with_together
:
-
id.results
-
osds
when
:
osds
-
include
:
config.yml
-
name
:
Check the configs in ceph_mon and ceph_rgw containers
command
:
docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
changed_when
:
false
failed_when
:
false
register
:
check_results
when
:
inventory_hostname in groups[item.group]
with_items
:
-
{
name
:
ceph_mon
,
group
:
ceph-mon
}
-
{
name
:
ceph_rgw
,
group
:
ceph-rgw
}
-
name
:
Check the configs in the ceph_osd container
command
:
docker exec ceph_osd_{{ item.0.stdout }} /usr/local/bin/kolla_set_configs --check
changed_when
:
false
failed_when
:
false
with_together
:
-
id.results
-
osds
when
:
osds
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
# just remove the container and start again
-
name
:
Containers config strategy for ceph_mon and ceph_rgw containers
kolla_docker
:
name
:
"
{{
item.name
}}"
action
:
"
get_container_env"
register
:
container_envs
when
:
inventory_hostname in groups[item.group]
with_items
:
-
{
name
:
ceph_mon
,
group
:
ceph-mon
}
-
{
name
:
ceph_rgw
,
group
:
ceph-rgw
}
-
name
:
Containers config strategy for the ceph_osd container
kolla_docker
:
name
:
"
ceph_osd_{{
item.0.stdout
}}"
action
:
"
get_container_env"
with_together
:
-
id.results
-
osds
when
:
osds
-
name
:
Remove the ceph_mon and ceph_rgw containers
kolla_docker
:
name
:
"
{{
item[0]['name']
}}"
action
:
"
remove_container"
register
:
remove_containers
when
:
-
config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
-
item[2]['rc'] ==
1
-
inventory_hostname in groups[item[0]['group']]
with_together
:
-
[{
name
:
ceph_mon
,
group
:
ceph-mon
},
{
name
:
ceph_rgw
,
group
:
ceph-rgw
}]
-
container_envs.results
-
check_results.results
-
name
:
Remove the ceph_osd container
kolla_docker
:
name
:
"
ceph_osd_{{
item.0.stdout
}}"
action
:
"
remove_container"
when
:
-
config_strategy == "COPY_ONCE" or item[2]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
-
item[3]['rc'] ==
1
-
osds
with_together
:
-
id.results
-
osds
-
container_envs.results
-
check_results.results
-
include
:
deploy.yml
when
:
remove_containers.changed
-
name
:
Restart the ceph_mon container
kolla_docker
:
name
:
"
ceph_mon"
action
:
"
restart_container"
when
:
-
config_strategy == 'COPY_ALWAYS'
-
item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
-
item[1]['rc'] ==
1
-
inventory_hostname in groups['ceph-mon']
with_together
:
-
container_envs.results
-
check_results.results
-
name
:
Restart the ceph_osd container
kolla_docker
:
name
:
"
ceph_osd_{{
item.0.stdout
}}"
action
:
"
restart_container"
when
:
-
config_strategy == 'COPY_ALWAYS'
-
item[2]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
-
item[3]['rc'] ==
1
-
osds
with_together
:
-
id.results
-
osds
-
container_envs.results
-
check_results.results
-
name
:
Restart the ceph_rgw container
kolla_docker
:
name
:
"
ceph_rgw"
action
:
"
restart_container"
when
:
-
config_strategy == 'COPY_ALWAYS'
-
item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
-
item[1]['rc'] ==
1
-
inventory_hostname in groups['ceph-rgw']
with_together
:
-
container_envs.results
-
check_results.results
This diff is collapsed.
Click to expand it.
ansible/roles/ceph/tasks/reconfigure.yml
+
5
−
0
View file @
e45781cf
---
-
include
:
do_reconfigure.yml
serial
:
"
30%"
when
:
inventory_hostname in groups['ceph-mon']
or inventory_hostname in groups['ceph-rgw']
or inventory_hostname in groups['ceph-osd']
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