Skip to content

Commit

Permalink
fixes to enable mon and osd separation based of a flag
Browse files Browse the repository at this point in the history
Signed-off-by: Vikrant Balyan <vijayvikrant84@gmail.com>
  • Loading branch information
vvb committed Mar 10, 2016
1 parent 771d4e2 commit 84add1b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
7 changes: 7 additions & 0 deletions group_vars/all
Expand Up @@ -25,3 +25,10 @@ validate_certs: "yes"
# env:
# service_vip:
# control_interface:

# should mons also run osds
mon_osd_colocation_allowed: "true"

# OSDs could be run without netplugin on them
# osd_contiv_network_include controls this behaviour
osd_contiv_network_include: "true"
12 changes: 12 additions & 0 deletions roles/ceph-common/handlers/main.yml
Expand Up @@ -3,6 +3,18 @@
apt:
update-cache: yes

- name: check for a ceph socket
shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1"
changed_when: false
failed_when: false
register: socket

- name: check for a rados gateway socket
shell: "stat {{ rbd_client_admin_socket_path }}*.asok > /dev/null 2>&1"
changed_when: false
failed_when: false
register: socketrgw

- name: restart ceph mons
command: service ceph restart mon
when:
Expand Down
14 changes: 2 additions & 12 deletions roles/ceph-common/tasks/main.yml
Expand Up @@ -37,18 +37,6 @@
radosgw_frontend == 'apache' and
rgw_group_name in group_names

- name: check for a ceph socket
shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1"
changed_when: false
failed_when: false
register: socket

- name: check for a rados gateway socket
shell: "stat {{ rbd_client_admin_socket_path }}*.asok > /dev/null 2>&1"
changed_when: false
failed_when: false
register: socketrgw

- name: create a local fetch directory if it doesn't exist
local_action: file path={{ fetch_directory }} state=directory
changed_when: false
Expand Down Expand Up @@ -86,6 +74,8 @@
group: root
mode: 0644
notify:
- check for a ceph socket
- check for a rados gateway socket
- restart ceph mons
- restart ceph mons on ubuntu
- restart ceph mons with systemd
Expand Down
14 changes: 7 additions & 7 deletions site.yml
Expand Up @@ -59,11 +59,11 @@
- { role: ucarp }
- { role: docker }
- { role: etcd, run_as: master }
#- { role: ceph-mon, mon_group_name: service-master }
#- { role: ceph-osd, mon_group_name: service-master, osd_group_name: service-master }
- { role: ceph-mon, mon_group_name: service-master }
- { role: ceph-osd, mon_group_name: service-master, osd_group_name: service-master, when: host_capability|match('.*storage.*') }
- { role: scheduler_stack, run_as: master }
- { role: contiv_network, run_as: master }
#- { role: contiv_storage, run_as: master }
- { role: contiv_network, run_as: master, when: host_capability|match('.*network.*') }
- { role: contiv_storage, run_as: master }

# service-worker hosts correspond to cluster machines that run the worker/driver
# logic of the infra services.
Expand All @@ -74,10 +74,10 @@
- { role: base }
- { role: docker }
- { role: etcd, run_as: worker }
#- { role: ceph-osd, mon_group_name: service-master, osd_group_name: service-worker }
- { role: ceph-osd, mon_group_name: service-master, osd_group_name: service-worker, when: host_capability|match('.*storage.*') }
- { role: scheduler_stack, run_as: worker }
- { role: contiv_network, run_as: worker }
#- { role: contiv_storage, run_as: worker }
- { role: contiv_network, run_as: worker, when: host_capability|match('.*network.*') }
- { role: contiv_storage, run_as: worker }

# netplugin-node hosts set up netmast/netplugin in a cluster
- hosts: netplugin-node
Expand Down

0 comments on commit 84add1b

Please sign in to comment.