Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon-osd separation fixes. making netplugin optional for service_worker #108

Merged
merged 3 commits into from
Mar 21, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ validate_certs: "yes"
# env:
# service_vip:
# control_interface:

host_capability: "compute, storage, network"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vvb

I still have a minor nit. I think we don't need both network and compute capabilities. I think we just need two capabilities for now, viz. to say that host provides disk-storage and that it can-run-user-containers, right?

I refer the latter as compute but I realize it is not a good name. Shall just rename compute to something like can-run-user-containers if keeps it clear?

ceph-mon, contiv_storage, contiv_network and scheduler_stack needs to run on hosts with this capability.

ceph-osd need to run on hosts with storage capability.

12 changes: 12 additions & 0 deletions roles/ceph-common/handlers/main.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's leave ceph* and contiv_storage roles commented out in these host-groups until #19 is fixed otherwise it breaks the commission/decommission workflows in cluster/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