Giter Club home page Giter Club logo

cephadm-ansible's Introduction

cephadm-ansible

cephadm-ansible is a collection of Ansible playbooks to simplify workflows that are not covered by cephadm. The workflows covered are:

  • Preflight: Initial setup of hosts before bootstrapping the cluster
  • Client: Setting up client hosts
  • Purge: Remove a Ceph cluster

Terminology

admin host:
A host where the admin keyring and ceph config file is present.
Although the admin host and the bootstrap host are usually the same host, it is possible to have multiple admin hosts later.
cephadm will make a host become 'admin' when the label _admin is added to that host. (ie: ceph orch host label add <host> _admin).
This hosts should be present in the group [admin] in the ansible inventory.
If for some reason you decide a host shouldn't be a 'admin host' anymore, you have to :

  • remove it from the group [admin] in the ansible inventory,
  • remove the admin keyring,
  • remove the ceph config file,
  • remove the '_admin' label. (ie ceph orch host label rm <host> _admin)

ansible host:
The host where any cephadm-ansible playbook is run.

bootstrap host:
The host where the ceph cluster will start.
Unless you pass --skip-admin-label option to ceph bootstram command, this host will get the admin keyring and the ceph config file present, therefore, it should be considered as an 'admin host'. This hosts should be present in the group [admin] in the ansible inventory.

Ansible inventory

The ansible inventory is a file where all the hosts intended to be part of the ceph cluster will be listed.
The most common format are INI or YAML.

Although you probably want to keep it as simple as possible, you can organize your inventory and create groups, cephadm-ansible won't make any difference except for the following requirements:

  • Client hosts must be defined in a dedicated group [clients].
  • Both cephadm-purge-cluster.yml and cephadm-clients.yml playbooks requires a group [admin] with at least one admin host (usually it will be the bootstrap node).

NOTE: the name of the client group can be changed. In that case you have to set the variable client_group.

Otherwise, you can create groups such as [monitors], [osds], [rgws], that might help you keep clarity in your inventory file and probably ease the --limit usage if you plan to use it to target a group of node only.

A basic inventory would look like following:

# cat hosts
ceph-mon1
ceph-mon2
ceph-mon3
ceph-osd1
ceph-osd2
ceph-osd3
ceph-mds1
ceph-mds2
ceph-rgw1
ceph-rgw2

[clients]
ceph-client1
ceph-client2
ceph-client3

[admin]
ceph-mon1

Preflight

This playbook configures the Ceph repository. It also installs some prerequisites (podman, lvm2, chronyd, cephadm, ...)

Usage:

ansible-playbook -i <inventory host file> cephadm-preflight.yml

You can limit the execution to a set of hosts by using --limit option:

ansible-playbook -i <inventory host file> cephadm-preflight.yml --limit <my_osd_group|my_node_name>

You can override variables using --extra-vars parameter:

ansible-playbook -i <inventory host file> cephadm-preflight.yml --extra-vars "ceph_origin=rhcs"

If you plan to deploy client nodes, you must define a group called "clients" in your inventory:

eg:

$ cat hosts
node1
node2
node3

[clients]
client1
client2
client3
node123

Then you can run the playbook as shown above.

Options:

ceph_origin: The source of Ceph repositories.
valid values:

  • rhcs: Repository from Red Hat Ceph Storage.
  • community: Community repository (https://download.ceph.com)
  • custom: Custom repository.
  • shaman: Devel repository.

default: community

ceph_stable_key: URL to the gpg key.
default: https://download.ceph.com/keys/release.asc

ceph_release: The release of Ceph. default: pacific

ceph_dev_branch: The development branch to be used in shaman when ceph_origin is 'shaman'.
default: main

ceph_dev_sha1: The sha1 corresponding to the build to be used when ceph_origin is 'shaman'.
default: latest

custom_repo_url: The url of the repository when ceph_origin is 'custom'. custom_repo_gpgkey: The url of the gpg key corresponding to the repository set in custom_repo_url when ceph_origin is 'custom'.

Purge

This playbook purges a Ceph cluster managed with cephadm

You must define a group [admin] in your inventory with a node where the admin keyring is present at /etc/ceph/ceph.client.admin.keyring

Usage:

ansible-playbook -i <inventory host file> cephadm-purge-cluster.yml -e fsid=<your fsid>

cephadm-ansible's People

Contributors

andrewschoen avatar asm0deuz avatar dsavineau avatar guits avatar ktdreyer avatar pcuzner avatar sebastian-philipp avatar tobiasmcnulty avatar tserlin avatar ycy1766 avatar youngjuwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cephadm-ansible's Issues

while deploying ansible preflight

i'm getting this error when i run ansible-playbook ceph-admpreflight.
I hadn't this last Friday, can someone understand why ?

FAILED - RETRYING: prevent ceph certificate error (3 retries left).
FAILED - RETRYING: prevent ceph certificate error (3 retries left).
FAILED - RETRYING: prevent ceph certificate error (3 retries left).
FAILED - RETRYING: prevent ceph certificate error (3 retries left).
FAILED - RETRYING: prevent ceph certificate error (2 retries left).
FAILED - RETRYING: prevent ceph certificate error (2 retries left).
FAILED - RETRYING: prevent ceph certificate error (2 retries left).
FAILED - RETRYING: prevent ceph certificate error (2 retries left).
FAILED - RETRYING: prevent ceph certificate error (1 retries left).
FAILED - RETRYING: prevent ceph certificate error (1 retries left).
FAILED - RETRYING: prevent ceph certificate error (1 retries left).
FAILED - RETRYING: prevent ceph certificate error (1 retries left).
fatal: [gros-83.nancy.grid5000.fr]: FAILED! => changed=false 

Support for Rocky Linux

Hello!

Can support for Rocky Linux be added?


PLAY [localhost] ************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY [localhost] ************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY [all] ******************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ******************************************************************************************************************************************************************************************************************
ok: [10.0.0.2]

TASK [debug] ****************************************************************************************************************************************************************************************************************************
ok: [10.0.0.2] => {
    "msg": "distribution_major_version is 9"
}

TASK [debug] ****************************************************************************************************************************************************************************************************************************
ok: [10.0.0.2] => {
    "msg": "architecture is x86_64"
}

TASK [debug] ****************************************************************************************************************************************************************************************************************************
ok: [10.0.0.2] => {
    "msg": "distribution is Rocky"
}

TASK [enable red hat ceph storage tools repository] *************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [disable older rhceph repositories if any] *****************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [set_fact _ceph_repo] **************************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [configure ceph repository key] ****************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [configure ceph stable repository] *************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [fetch ceph development repository] ************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [configure ceph development repository] ********************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [remove ceph_stable repositories] **************************************************************************************************************************************************************************************************
skipping: [10.0.0.2] => (item=ceph_stable) 
skipping: [10.0.0.2] => (item=ceph_stable_noarch) 
skipping: [10.0.0.2]

TASK [set_fact ceph_custom_repositories] ************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [setup custom repositories] ********************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [enable required CentOS repository for epel] ***************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [install package] ******************************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [install ceph-common on rhel] ******************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [install prerequisites packages] ***************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [ensure chronyd is running] ********************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [prevent ceph certificate error] ***************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [configure ceph community repository stable key] ***********************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [configure Ceph community repository] **********************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [configure Ceph testing repository] ************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [configure Ceph custom repositories] ***********************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [install prerequisites packages] ***************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [install podman] *******************************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [uninstall old version packages] ***************************************************************************************************************************************************************************************************
skipping: [10.0.0.2] => (item=docker) 
skipping: [10.0.0.2] => (item=docker-engine) 
skipping: [10.0.0.2] => (item=docker.io) 
skipping: [10.0.0.2] => (item=containerd) 
skipping: [10.0.0.2] => (item=runc) 
skipping: [10.0.0.2]

TASK [configure docker repository key] **************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [setup docker repository] **********************************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [install docker] *******************************************************************************************************************************************************************************************************************
skipping: [10.0.0.2] => (item=docker-ce) 
skipping: [10.0.0.2] => (item=docker-ce-cli) 
skipping: [10.0.0.2] => (item=containerd.io) 
skipping: [10.0.0.2]

PLAY [localhost] ************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY [all] ******************************************************************************************************************************************************************************************************************************

TASK [fail if insecure_registry is undefined] *******************************************************************************************************************************************************************************************
skipping: [10.0.0.2]

TASK [add registry as insecure registry in registries.conf] *****************************************************************************************************************************************************************************
skipping: [10.0.0.2]

PLAY RECAP ******************************************************************************************************************************************************************************************************************************
10.0.0.2                  : ok=4    changed=0    unreachable=0    failed=0    skipped=28   rescued=0    ignored=0   

run CI tests on el9

Currently users run cephadm-ansible on RHEL 8. We need to be able to run cephadm-ansible on RHEL 9 too.

RHEL 9 ships its own (minimal) version of ansible-core so we need to make sure cephadm-ansible works with that Ansible version.

Can you please add CI tests to run on RHEL 9?

RHEL 9 ansible-core lacks rhsm_repository module

The rhsm_repository module is not available in RHEL 9's ansible-core package:

ERROR! couldn't resolve module/action 'rhsm_repository'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/builddir/build/BUILD/cephadm-ansible-1.8.0/cephadm-preflight.yml': line 54, column 11, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

      block:
        - name: enable red hat storage tools repository
          ^ here

We need to figure out if this module is packaged elsewhere, or package it ourselves, or bundle it into cephadm-ansible (not my preference... but maybe the best option at this point)

Purge behavior when calling `cephadm-purge-cluster.yml` with `--limit`

The cephadm-purge-cluster.yml pre-purge checks fail in a not-so-good way when one calls the playbook with a --limit to a subset of the hosts in the inventory (e.g., those hosts that are in the cluster).

As an alternative, the plays could have hosts: all set and the following added to each task to achieve the same behavior in a compatible way:

      delegate_to: localhost
      run_once: true

Otherwise, once sees skipping: no hosts matched on the applicable plays. The "confirm whether user really wants to purge the cluster" play even prompts the user to see if they want to purge the cluster, but continues to purge the cluster no matter what they type.

If this sounds like an acceptable solution I can make a PR.

Error running cephadm-preflight

I clone the repo and try to run the cephadm-preflight playbook but I get this error:

ERROR! 'ansible.builtin.import_playbook' is not a valid attribute for a Play

The error appears to be in '/mydata/cephadm-ansible/cephadm-preflight.yml': line 21, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: variables validations
  ^ here

I don't try to modify the preflight playbook file because I don't know what will be the repercussions.
Anyone has an idea ?

Edit: I'm working on ubuntu 20.04, python3.8, ansible 2.9

Preflight fails with "nothing provides libthrift-0.15.0.so()(64bit) needed by ceph-common-2:17.2.7-0.el9.x86_64"

Running cephadm-preflight.yml against RHEL9.2 in preparation for Ceph 6 fails with:

fatal: [ceph1]: FAILED! => changed=false 
  attempts: 3
  failures: []
  msg: |-
    Depsolve Error occurred:
     Problem: cannot install the best candidate for the job
      - nothing provides libthrift-0.15.0.so()(64bit) needed by ceph-common-2:17.2.7-0.el9.x86_64
  rc: 1
  results: []

Enabling the EPEL repository (e.g. using the geerlingguy.repo-epel role) as a "pre-preflight" step means the preflight playbook works but given the preflight playbook is about preparing the hosts and installing prerequisites it feels that this should be part of that.

Is Ansible 2.10 actually required?

We're looking at packaging cephadm-ansible downstream, and the requirement in "cephadm-ansible.spec.in" is for Ansible 2.10.

However, Ansible 2.9.22 is the latest version available in RHEL 8 and RHEL 7. I don't even see Ansible 2.10 in the just-released Fedora 34.

Is cephadm-ansible dependent on something in Ansible 2.10 that's not in Ansible 2.9?

Thanks.

upgrade ceph version

I am interested in contributing to the development of Ceph or upgrading its version using Ceph ADM. Could you please guide me on how to get started with contributing?

Playbooks do not run as an AWX project

It looks like per #147 the community.general collection needs to be installed in order to fulfill module requirements. There isn't a requirements.yml file that specifies this though, so on AWX (and RH Automation Controller by extension I assume?) the execution environment containers do not install the necessary dependencies.

requirements.yml

---
collections:
  - community.general

AWX should load requirements from the project root per this playbook.

I'll create a PR for this. I don't think I see any other required modules?

versioning

Is there a way to force a specific version of ceph to be installed ?

Running pre-flight on Debian 11 does... nothing?

Strange behavior when running this against Debian 11, it quite literally executes nothing:

$ ansible-playbook -i ./inventory/hosts cephadm-preflight.yml --flush-cache

PLAY [localhost] **********************************************************************************************************************************************************************

TASK [fail if insecure_registry is undefined] *****************************************************************************************************************************************
Thursday 01 December 2022  18:34:48 +0800 (0:00:00.016)       0:00:00.016 ***** 
skipping: [localhost]

PLAY [localhost] **********************************************************************************************************************************************************************

TASK [fail when ceph_origin is custom with no repository defined] *********************************************************************************************************************
Thursday 01 December 2022  18:34:48 +0800 (0:00:00.035)       0:00:00.051 ***** 
skipping: [localhost]

TASK [fail if baseurl is not defined for ceph_custom_repositories] ********************************************************************************************************************
Thursday 01 December 2022  18:34:48 +0800 (0:00:00.018)       0:00:00.070 ***** 
skipping: [localhost]

PLAY [all] ****************************************************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************************************
Thursday 01 December 2022  18:34:48 +0800 (0:00:00.048)       0:00:00.118 ***** 
ok: [ceph2.perthchat2.org]
ok: [ceph1.perthchat2.org]
ok: [ceph3.perthchat2.org]

TASK [enable red hat storage tools repository] ****************************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:03.020)       0:00:03.139 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [disable older rhceph repositories if any] ***************************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.071)       0:00:03.210 ***** 
skipping: [ceph1.perthchat2.org] => (item=rhceph-4-tools-for-rhel-8-x86_64-rpms) 
skipping: [ceph1.perthchat2.org] => (item=rhceph-4-mon-for-rhel-8-x86_64-rpms) 
skipping: [ceph1.perthchat2.org] => (item=rhceph-4-osd-for-rhel-8-x86_64-rpms) 
skipping: [ceph2.perthchat2.org] => (item=rhceph-4-tools-for-rhel-8-x86_64-rpms) 
skipping: [ceph2.perthchat2.org] => (item=rhceph-4-mon-for-rhel-8-x86_64-rpms) 
skipping: [ceph2.perthchat2.org] => (item=rhceph-4-osd-for-rhel-8-x86_64-rpms) 
skipping: [ceph3.perthchat2.org] => (item=rhceph-4-tools-for-rhel-8-x86_64-rpms) 
skipping: [ceph3.perthchat2.org] => (item=rhceph-4-mon-for-rhel-8-x86_64-rpms) 
skipping: [ceph3.perthchat2.org] => (item=rhceph-4-osd-for-rhel-8-x86_64-rpms) 

TASK [configure red hat ceph community repository stable key] *************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.092)       0:00:03.303 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [configure red hat ceph stable community repository] *****************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.059)       0:00:03.362 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [configure red hat ceph stable noarch community repository] **********************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.061)       0:00:03.423 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [fetch ceph red hat development repository] **************************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.056)       0:00:03.480 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [configure ceph red hat development repository] **********************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.067)       0:00:03.547 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [remove ceph_stable repositories] ************************************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.056)       0:00:03.603 ***** 
skipping: [ceph1.perthchat2.org] => (item=ceph_stable) 
skipping: [ceph1.perthchat2.org] => (item=ceph_stable_noarch) 
skipping: [ceph2.perthchat2.org] => (item=ceph_stable) 
skipping: [ceph2.perthchat2.org] => (item=ceph_stable_noarch) 
skipping: [ceph3.perthchat2.org] => (item=ceph_stable) 
skipping: [ceph3.perthchat2.org] => (item=ceph_stable_noarch) 

TASK [set_fact ceph_custom_repositories] **********************************************************************************************************************************************
Thursday 01 December 2022  18:34:51 +0800 (0:00:00.072)       0:00:03.676 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [setup custom repositories] ******************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.064)       0:00:03.741 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [enable CentOS PowerTools repository for epel] ***********************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.062)       0:00:03.803 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [install package] ****************************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.059)       0:00:03.863 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [install ceph-common on rhel] ****************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.068)       0:00:03.932 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [install prerequisites packages] *************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.054)       0:00:03.986 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [ensure chronyd is running] ******************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.056)       0:00:04.043 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [prevent ceph certificate error] *************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.063)       0:00:04.107 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [configure ceph community repository stable key] *********************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.066)       0:00:04.173 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [configure Ceph community repository] ********************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.050)       0:00:04.223 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [configure Ceph testing repository] **********************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.068)       0:00:04.291 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [configure Ceph custom repositories] *********************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.065)       0:00:04.357 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [install prerequisites packages] *************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.051)       0:00:04.409 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [install podman] *****************************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.054)       0:00:04.463 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [uninstall old version packages] *************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.067)       0:00:04.530 ***** 
skipping: [ceph1.perthchat2.org] => (item=docker) 
skipping: [ceph2.perthchat2.org] => (item=docker) 
skipping: [ceph1.perthchat2.org] => (item=docker-engine) 
skipping: [ceph2.perthchat2.org] => (item=docker-engine) 
skipping: [ceph2.perthchat2.org] => (item=docker.io) 
skipping: [ceph1.perthchat2.org] => (item=docker.io) 
skipping: [ceph2.perthchat2.org] => (item=containerd) 
skipping: [ceph2.perthchat2.org] => (item=runc) 
skipping: [ceph1.perthchat2.org] => (item=containerd) 
skipping: [ceph1.perthchat2.org] => (item=runc) 
skipping: [ceph3.perthchat2.org] => (item=docker) 
skipping: [ceph3.perthchat2.org] => (item=docker-engine) 
skipping: [ceph3.perthchat2.org] => (item=docker.io) 
skipping: [ceph3.perthchat2.org] => (item=containerd) 
skipping: [ceph3.perthchat2.org] => (item=runc) 

TASK [configure docker repository key] ************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.093)       0:00:04.624 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [setup docker repository] ********************************************************************************************************************************************************
Thursday 01 December 2022  18:34:52 +0800 (0:00:00.066)       0:00:04.691 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [install docker] *****************************************************************************************************************************************************************
Thursday 01 December 2022  18:34:53 +0800 (0:00:00.068)       0:00:04.760 ***** 
skipping: [ceph1.perthchat2.org] => (item=docker-ce) 
skipping: [ceph1.perthchat2.org] => (item=docker-ce-cli) 
skipping: [ceph1.perthchat2.org] => (item=containerd.io) 
skipping: [ceph2.perthchat2.org] => (item=docker-ce) 
skipping: [ceph2.perthchat2.org] => (item=docker-ce-cli) 
skipping: [ceph3.perthchat2.org] => (item=docker-ce) 
skipping: [ceph3.perthchat2.org] => (item=docker-ce-cli) 
skipping: [ceph2.perthchat2.org] => (item=containerd.io) 
skipping: [ceph3.perthchat2.org] => (item=containerd.io) 

PLAY [localhost] **********************************************************************************************************************************************************************

TASK [fail if insecure_registry is undefined] *****************************************************************************************************************************************
Thursday 01 December 2022  18:34:53 +0800 (0:00:00.097)       0:00:04.857 ***** 
skipping: [localhost]

PLAY [all] ****************************************************************************************************************************************************************************

TASK [fail if insecure_registry is undefined] *****************************************************************************************************************************************
Thursday 01 December 2022  18:34:53 +0800 (0:00:00.063)       0:00:04.920 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

TASK [add registry as insecure registry in registries.conf] ***************************************************************************************************************************
Thursday 01 December 2022  18:34:53 +0800 (0:00:00.063)       0:00:04.983 ***** 
skipping: [ceph1.perthchat2.org]
skipping: [ceph2.perthchat2.org]
skipping: [ceph3.perthchat2.org]

PLAY RECAP ****************************************************************************************************************************************************************************
ceph1.perthchat2.org       : ok=1    changed=0    unreachable=0    failed=0    skipped=28   rescued=0    ignored=0   
ceph2.perthchat2.org       : ok=1    changed=0    unreachable=0    failed=0    skipped=28   rescued=0    ignored=0   
ceph3.perthchat2.org       : ok=1    changed=0    unreachable=0    failed=0    skipped=28   rescued=0    ignored=0   
localhost                  : ok=0    changed=0    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0   

Thursday 01 December 2022  18:34:53 +0800 (0:00:00.077)       0:00:05.060 ***** 
=============================================================================== 
Gathering Facts ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 3.02s
install docker ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.10s
uninstall old version packages ------------------------------------------------------------------------------------------------------------------------------------------------- 0.09s
disable older rhceph repositories if any --------------------------------------------------------------------------------------------------------------------------------------- 0.09s
add registry as insecure registry in registries.conf --------------------------------------------------------------------------------------------------------------------------- 0.08s
remove ceph_stable repositories ------------------------------------------------------------------------------------------------------------------------------------------------ 0.07s
enable red hat storage tools repository ---------------------------------------------------------------------------------------------------------------------------------------- 0.07s
setup docker repository -------------------------------------------------------------------------------------------------------------------------------------------------------- 0.07s
install package ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.07s
configure Ceph community repository -------------------------------------------------------------------------------------------------------------------------------------------- 0.07s
install podman ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.07s
fetch ceph red hat development repository -------------------------------------------------------------------------------------------------------------------------------------- 0.07s
configure docker repository key ------------------------------------------------------------------------------------------------------------------------------------------------ 0.07s
prevent ceph certificate error ------------------------------------------------------------------------------------------------------------------------------------------------- 0.07s
configure Ceph testing repository ---------------------------------------------------------------------------------------------------------------------------------------------- 0.07s
set_fact ceph_custom_repositories ---------------------------------------------------------------------------------------------------------------------------------------------- 0.06s
ensure chronyd is running ------------------------------------------------------------------------------------------------------------------------------------------------------ 0.06s
fail if insecure_registry is undefined ----------------------------------------------------------------------------------------------------------------------------------------- 0.06s
fail if insecure_registry is undefined ----------------------------------------------------------------------------------------------------------------------------------------- 0.06s
setup custom repositories ------------------------------------------------------------------------------------------------------------------------------------------------------ 0.06s

Consider migrating the project to single stable branch model?

Can cephadm-ansible migrate to a model with only 1 stable branch?
ie: only one stable branch would support all Ceph stable releases.

This is not a strong request, just a suggestion of something we might want to think about/consider if possible. I think that would be easier in terms of maintenance.

preflight should provide the option of deploying multipathing

If the osd host is using an external enclosure, the SAS devices could be multipathed. In this scenario multipathing is needed to avoid data corruption.

Perhaps during preflight there could be a variable that the admin can set that will include a multipathing role during the preparation of the host?

Debian, Ubuntu or openSUSE support

Hi guys!

Can I modify or wrote playbooks to these distributions? There is a possibility to do this merge request if I wrote?

There is a Ubuntu on "master" branch, but I was talking about "pacific" one.

Thanks!

Preflight repo issues in airgapped ubuntu environments

Running into several issues trying to run the preflight playbook in an ubuntu airgapped environment:

  1. ceph_stable_key is always required, no matter what kind of repo. Our airgapped mirror works fine with just [trusted=yes] http://bla/path

  2. Documentation says ceph custom repo and repo_url are mutually exclusive, they are not. If you define custom URL you also have to define the repo. Again, just the one line is enough.

  3. Ceph custom repositories should be custom. The path has distribution_release hardcoded, should be defined to be custom. You can set components, but you can't set (or remove) distribution_release.

  4. Docker is hardcoded to go to download.docker.com. Definitely not airgapped.

Gather log files from all the nodes of the cluster

ceph-ansible had a playbook to gather all log files from cluster nodes to administration node (ansible node).
playbook - infrastructure-playbooks/gather-ceph-logs.yml

It would be nice if we have this feature available here as well

Chrony issue deploying in a firewalled lab environment

In an environment where normal ntp services are restricted, you tend to run a local timesource and sync to that. This would typically be part of a build process. However, the purge cluster play, removes chrony so this is lost and then a repeated install deploys the default chrony configuration from repo which results in a cluster suffering from clock skew issues.

Would it make sense to include a flag to prevent purge from removing chrony, to avoid this issue?

No work preflight on ubuntu jammy

When a run ansible-playbook -i ../inventory.yaml cephadm-preflight.yml getting error:

fatal: [UbCeph1]: FAILED! => changed=false 
  attempts: 3
  msg: 'Failed to update apt cache: W:Updating from such a repository can''t be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository ''https://download.ceph.com/debian-quincy jammy Release'' does not have a Release file.

After that i go to URL and see only bullseye and focal... but it is soo old!
Some search getting me repo with jammy https://download.ceph.com/debian-reef/ what is reef? How can i know about some reef?

Ok trying to use another URL by ansible-playbook -i ../inventory.yaml cephadm-preflight.yml -e "ceph_origin=custom" -e "custom_repo_url=https://download.ceph.com/debian-reef"

And getting same error again... WTF? You broke my apt system and doesn't get it back to working state (((
Trying to ansible-playbook -i ../inventory.yaml cephadm-purge-cluster.yml
And error again, but another:

fatal: [UbCeph1 -> localhost]: FAILED! => changed=false 
  msg: |-
    You must provide the cluster fsid to be purged.
    e.g. ansible-playbook -i <inventory host file> cephadm-purge-cluster.yml -e fsid=<your fsid>

Aaaaammm... What is fsid? Where i can get it? Nothing info about it...
Okay, going to remove broken repos on servers manually by hands FU#$%$#$%#$%....

Try again ansible-playbook -i ../inventory.yaml cephadm-preflight.yml -e "ceph_origin=custom" -e "custom_repo_url=https://download.ceph.com/debian-reef"

And error again FU#$%$#$%#$%....

fatal: [UbCeph1]: FAILED! => 
  msg: '''ceph_custom_repositories'' is undefined. ''ceph_custom_repositories'' is undefined'

It is totally unusable for fresh ubuntu distros (((
How can i use it correctly with my env?

What value needed for ceph_custom_repositories ?

cephadm: error: unrecognized arguments: --zap-osds

Turns out, cephadm-ansible is a bit ahead of Ceph here. If you see this error

    usage: cephadm [-h] [--image IMAGE] [--docker] [--data-dir DATA_DIR]
                   [--log-dir LOG_DIR] [--logrotate-dir LOGROTATE_DIR]
                   [--unit-dir UNIT_DIR] [--verbose] [--timeout TIMEOUT]
                   [--retry RETRY] [--env ENV] [--no-container-init]
                   {version,pull,inspect-image,ls,list-networks,adopt,rm-daemon,rm-cluster,run,shell,enter,ceph-volume,unit,logs,bootstrap,deploy,check-host,prepare-host,add-repo,rm-repo,install,registry-login,gather-facts,exporter,host-maintenance,verify-prereqs}
                   ...
    cephadm: error: unrecognized arguments: --zap-osds

Simply remove this argument from the playbook, till 16.2.5 is released.

Playbook only runs "gather_facts" on the first run?

So tried running the cephadm-ansible playbook, and I didn't realise ceph has no official repo for Ubuntu 22:

TASK [prevent ceph certificate error] *************************************************************************************************************************************************
Thursday 01 December 2022  16:33:45 +0800 (0:00:00.071)       0:00:01.190 ***** 
FAILED - RETRYING: prevent ceph certificate error (3 retries left).
FAILED - RETRYING: prevent ceph certificate error (3 retries left).
FAILED - RETRYING: prevent ceph certificate error (3 retries left).
FAILED - RETRYING: prevent ceph certificate error (2 retries left).
FAILED - RETRYING: prevent ceph certificate error (2 retries left).
FAILED - RETRYING: prevent ceph certificate error (2 retries left).
FAILED - RETRYING: prevent ceph certificate error (1 retries left).
FAILED - RETRYING: prevent ceph certificate error (1 retries left).
FAILED - RETRYING: prevent ceph certificate error (1 retries left).
fatal: [ceph3.perthchat2.org]: FAILED! => changed=false 
  attempts: 3
  msg: 'Failed to update apt cache: W:Updating from such a repository can''t be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository ''https://download.ceph.com/debian-quincy jammy Release'' does not have a Release file.'
fatal: [ceph2.perthchat2.org]: FAILED! => changed=false 
  attempts: 3
  msg: 'Failed to update apt cache: W:Updating from such a repository can''t be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository ''https://download.ceph.com/debian-quincy jammy Release'' does not have a Release file.'
fatal: [ceph1.perthchat2.org]: FAILED! => changed=false 
  attempts: 3
  msg: 'Failed to update apt cache: W:Updating from such a repository can''t be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository ''https://download.ceph.com/debian-quincy jammy Release'' does not have a Release file.'

The code for this module:

    - name: Ubuntu related tasks
      when: ansible_facts['distribution'] == 'Ubuntu'
      block:
        - name: enable repo from download.ceph.com
          block:
            - name: prevent ceph certificate error
              apt:
                name: ca-certificates
                state: latest
                update_cache: yes
              register: result
              until: result is succeeded

So I quickly (using ansible) remake all the hosts as Debian 11, but I then get the exact same error...

It seems like:

- name: variables validations
  ansible.builtin.import_playbook: validate/preflight.yml

- hosts: all
  become: true
  gather_facts: true
  tasks:
    - name: import_role ceph_defaults
      import_role:
        name: ceph_defaults

It isn't actually running 'gather_facts' again to observe the new host-OS... but why? :P

Request to delete pull request #216

Hello,

I'm so sorry, just created pull request by accident trying to do the same in my fork of this project.

I'm really sorry about that. Would you be so kind and delete the pull request please?
Thank you very much in advance :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.