- Fix: ensure that on_error trap is called (display more info on error).
- Set static IPs to VMs.
- Remove domain in cluster definition to avoid side effects of potential dns misconfiguration.
- Minor improvements.
Fixes: https://tracker.ceph.com/issues/53991
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
cephadm_shell="cephadm shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring"
{% for number in range(1, nodes) %}
- ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }}
+ ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}
{% if expanded_cluster is defined %}
- ${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}.{{ domain }}
+ ${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}
{% endif %}
{% endfor %}
parameters:
nodes: 4
+ node_ip_offset: 100
pool: ceph-dashboard
network: ceph-dashboard
- domain: cephlab.com
+ gateway: 192.168.100.1
+ netmask: 255.255.255.0
prefix: ceph
numcpus: 1
memory: 2048
reserveip: true
reservedns: true
sharedkey: true
- domain: {{ domain }}
nets:
- - {{ network }}
+ - name: {{ network }}
+ ip: 192.168.100.{{ node_ip_offset + number }}
+ gateway: {{ gateway }}
+ mask: {{ netmask }}
+ dns: {{ gateway }}
disks: {{ disks }}
pool: {{ pool }}
sharedfolders: [{{ ceph_dev_folder }}]
#!/usr/bin/env bash
-set -ex
+set -eEx
cleanup() {
set +x
printf "\n\nERROR $1 thrown on line $2\n\n"
printf "\n\nCollecting info...\n\n"
printf "\n\nDisplaying MGR logs:\n\n"
- kcli ssh -u root -- ceph-node-00 'cephadm logs -n $(cephadm ls | grep -Eo "mgr\.ceph[0-9a-z.-]+" | head -n 1)'
+ kcli ssh -u root -- ceph-node-00 'cephadm logs -n \$(cephadm ls | grep -Eo "mgr\.ceph[0-9a-z.-]+" | head -n 1) -- --no-tail --no-pager'
for vm_id in 0 1 2
do
local vm="ceph-node-0${vm_id}"
kcli ssh -u root -- ${vm} 'journalctl --no-tail --no-pager -t cloud-init' || true
printf "\n\nEnd of journalctl from VM ${vm}\n\n"
printf "\n\nDisplaying container logs:\n\n"
- kcli ssh -u root -- ${vm} 'podman logs --names --since 30s $(podman ps -aq)' || true
+ kcli ssh -u root -- ${vm} 'podman logs --names --since 30s \$(podman ps -aq)' || true
done
printf "\n\nTEST FAILED.\n\n"
fi
kcli list vm
if [[ ${CLUSTER_DEBUG} != 0 ]]; then
kcli ssh -u root -- ceph-node-00 'podman ps -a'
- kcli ssh -u root -- ceph-node-00 'podman logs --names --since 30s $(podman ps -aq)'
+ kcli ssh -u root -- ceph-node-00 'podman logs --names --since 30s \$(podman ps -aq)'
fi
kcli ssh -u root -- ceph-node-00 'journalctl -n 100 --no-pager -t cloud-init'
done
describe('Create cluster add host page', () => {
const createCluster = new CreateClusterWizardHelper();
const createClusterHostPage = new CreateClusterHostPageHelper();
- const hostnames = [
- 'ceph-node-00.cephlab.com',
- 'ceph-node-01.cephlab.com',
- 'ceph-node-02.cephlab.com',
- 'ceph-node-[01-03].cephlab.com'
- ];
+ const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-[01-03]'];
const addHost = (hostname: string, exist?: boolean, pattern?: boolean, labels: string[] = []) => {
cy.get('button[data-testid=table-action-button]').click();
createClusterHostPage.add(hostname, exist, false, labels);
describe('when Orchestrator is available', () => {
it('should create OSDs', () => {
- const hostnames = [
- 'ceph-node-00.cephlab.com',
- 'ceph-node-02.cephlab.com',
- 'ceph-node-03.cephlab.com'
- ];
+ const hostnames = ['ceph-node-00', 'ceph-node-02', 'ceph-node-03'];
for (const hostname of hostnames) {
osds.create('hdd', hostname, true);
const services = new ServicesPageHelper();
const hosts = new HostsPageHelper();
- const hostnames = [
- 'ceph-node-00.cephlab.com',
- 'ceph-node-01.cephlab.com',
- 'ceph-node-02.cephlab.com',
- 'ceph-node-03.cephlab.com'
- ];
+ const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
beforeEach(() => {
cy.login();
const hosts = new HostsPageHelper();
const services = new ServicesPageHelper();
- const hostnames = [
- 'ceph-node-00.cephlab.com',
- 'ceph-node-01.cephlab.com',
- 'ceph-node-02.cephlab.com',
- 'ceph-node-03.cephlab.com'
- ];
+ const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
beforeEach(() => {
cy.login();