diff --git a/roles/cephadm/defaults/main.yml b/roles/cephadm/defaults/main.yml index 9fe728a738..ccbfb4a5d6 100644 --- a/roles/cephadm/defaults/main.yml +++ b/roles/cephadm/defaults/main.yml @@ -1,13 +1,14 @@ --- -cephadm_ceph_apt_repo: "deb http://download.ceph.com/debian-octopus/ {{ ansible_distribution_release }} main" +cephadm_ceph_release: "pacific" +cephadm_ceph_apt_repo: "deb http://download.ceph.com/debian-{{ cephadm_ceph_release }}/ {{ ansible_distribution_release }} main" cephadm_ceph_rpm_repos: - shortname: "ceph" name: "Ceph {{ ansible_architecture }} repository" - url: "http://download.ceph.com/rpm-octopus/el8/{{ ansible_architecture }}/" + url: "http://download.ceph.com/rpm-{{ cephadm_ceph_release }}/el8/{{ ansible_architecture }}/" - shortname: "ceph-noarch" name: "Ceph noarch repository" - url: "http://download.ceph.com/rpm-octopus/el8/noarch/" + url: "http://download.ceph.com/rpm-{{ cephadm_ceph_release }}/el8/noarch/" cephadm_ceph_rpm_gpg_key: http://download.ceph.com/keys/release.gpg diff --git a/roles/cephadm/tasks/main.yml b/roles/cephadm/tasks/main.yml index d8795050e1..e2d02615f1 100644 --- a/roles/cephadm/tasks/main.yml +++ b/roles/cephadm/tasks/main.yml @@ -49,6 +49,7 @@ --skip-dashboard --skip-firewalld --mon-ip={{ mon_ip }} + --mon-addrv='[v2:{{ mon_ip }}:3300,v1:{{ mon_ip }}:6789]' become: True register: cephadm_bootstrap_output @@ -64,6 +65,13 @@ dest: "/var/run/ceph/{{ ceph_fsid }}/cluster.yml" become: True +- name: Check Ceph Orchestrator state + command: + cmd: > + cephadm shell -- + ceph orch status --detail + become: True + - name: Apply cluster spec command: cmd: > diff --git a/roles/cephadm/templates/cephadm.yml.j2 b/roles/cephadm/templates/cephadm.yml.j2 index 236ede26f2..2aee3f8196 100644 --- a/roles/cephadm/templates/cephadm.yml.j2 +++ b/roles/cephadm/templates/cephadm.yml.j2 @@ -1,8 +1,10 @@ {% for host in groups['all'] %} --- service_type: host -hostname: {{ host }} -labels: +hostname: {{ hostvars[host]['ansible_hostname'] }} +addr: {{ hostvars[host]['ansible_vxlan0']['ipv4']['address'] }} +labels: +- _admin - mon - mgr - osd diff --git a/tests/get_logs.sh b/tests/get_logs.sh index a6e471cb47..110f40836c 100644 --- a/tests/get_logs.sh +++ b/tests/get_logs.sh @@ -88,6 +88,8 @@ copy_logs() { # cephadm related logs mkdir -p ${LOG_DIR}/ceph + sudo cp /etc/ceph/ceph.conf ${LOG_DIR}/ceph + sudo cp -Rf /var/run/ceph/* ${LOG_DIR}/ceph sudo cephadm shell -- ceph --connect-timeout 5 -s > ${LOG_DIR}/ceph/ceph_s.txt sudo cephadm shell -- ceph --connect-timeout 5 osd tree > ${LOG_DIR}/ceph/ceph_osd_tree.txt