Skip to content

Commit 05db110

Browse files
authored
Merge branch 'master' into fix-fqdn-maintenance
2 parents a760aaf + 3a76e9b commit 05db110

22 files changed

+151
-75
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Update changelogs on galaxy version bump
2+
on:
3+
push:
4+
paths:
5+
- galaxy.yml
6+
branches:
7+
- antsibull_changelogs # change before merge
8+
jobs:
9+
bump-changelogs:
10+
uses: stackhpc/.github/.github/workflows/antsibull-release.yml@update_changelogs # todo: change to main once merged

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
report_paths: '**/tests/output/*/*.xml'
7373

7474
- name: Upload HTML report
75-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@v4
7676
with:
7777
name: coverage-html
7878
path: ansible_collections/stackhpc/cephadm/tests/output/reports/coverage/

CHANGELOG.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ stackhpc.cephadm Release Notes
44

55
.. contents:: Topics
66

7+
v1.19.1
8+
=======
9+
10+
Bugfixes
11+
--------
12+
13+
- pools - cephadm_pool tasks now correctly run with sudo
14+
715
v1.16.0
816
=======
917

@@ -15,15 +23,12 @@ longer generates keyring files on Ceph hosts, and additional tasks
1523
are required to write keyring files to disk - see the cephadm_keys
1624
README.md for further details.
1725

18-
1926
Minor Changes
2027
-------------
2128

22-
- Deprecate `generate_keys` functionality in cephadm_keys plugin
2329
- Deprecate `fetch_inital_keys` functionality in cephadm_keys plugin
24-
- Fix issue with idempotency in cephadm_keys plugin, by no longer
25-
generating user keyring files on Ceph hosts.
26-
30+
- Deprecate `generate_keys` functionality in cephadm_keys plugin
31+
- Fix issue with idempotency in cephadm_keys plugin, by no longer generating user keyring files on Ceph hosts.
2732

2833
v1.13.0
2934
=======
@@ -33,7 +38,6 @@ Release Summary
3338

3439
Minor release adding support for choosing plugin in EC profiles
3540

36-
3741
Minor Changes
3842
-------------
3943

changelogs/changelog.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
ancestor: null
22
releases:
33
1.13.0:
4+
changes:
5+
minor_changes:
6+
- Add support for choosing plugin in EC profiles
7+
release_summary: 'Minor release adding support for choosing plugin in EC profiles
8+
9+
'
410
release_date: '2023-02-28'
11+
1.16.0:
512
changes:
6-
release_summary: |
7-
Minor release adding support for choosing plugin in EC profiles
813
minor_changes:
9-
- Add support for choosing plugin in EC profiles
14+
- Deprecate `fetch_inital_keys` functionality in cephadm_keys plugin
15+
- Deprecate `generate_keys` functionality in cephadm_keys plugin
16+
- Fix issue with idempotency in cephadm_keys plugin, by no longer generating
17+
user keyring files on Ceph hosts.
18+
release_summary: 'Fix idempotency issue in cephadm_keys plugin. `cephadm_keys`
19+
no
20+
21+
longer generates keyring files on Ceph hosts, and additional tasks
22+
23+
are required to write keyring files to disk - see the cephadm_keys
24+
25+
README.md for further details.
26+
27+
'
28+
release_date: '2024-07-28'
29+
1.19.1:
30+
changes:
31+
bugfixes:
32+
- pools - cephadm_pool tasks now correctly run with sudo
33+
fragments:
34+
- sudo-fix.yml
35+
release_date: '2025-01-08'

changelogs/fragments/.gitkeep

Whitespace-only changes.

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace: "stackhpc"
22
name: "cephadm"
3-
version: "1.18.0"
3+
version: "1.19.3"
44
readme: "README.md"
55
authors:
66
- "Michal Nasiadka"

plugins/modules/cephadm_ec_profile.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
- Restrict placement to devices of a specific class (hdd/ssd)
7878
required: false
7979
type: str
80+
crush_failure_domain:
81+
description:
82+
- Set the failure domain for the CRUSH rule (e.g., 'rack', 'host', 'osd')
83+
required: false
84+
type: str
8085
8186
author:
8287
- Guillaume Abrioux <[email protected]>
@@ -94,6 +99,13 @@
9499
cephadm_ec_profile:
95100
name: foo
96101
state: absent
102+
103+
- name: create an erasure code profile with custom failure domain
104+
cephadm_ec_profile:
105+
name: foo-osd
106+
k: 4
107+
m: 2
108+
crush_failure_domain: osd
97109
'''
98110

99111
from ansible.module_utils.basic import AnsibleModule
@@ -120,7 +132,7 @@ def get_profile(module, name):
120132
return cmd
121133

122134

123-
def create_profile(module, name, k, m, stripe_unit, crush_device_class, directory, plugin, force=False): # noqa: E501
135+
def create_profile(module, name, k, m, stripe_unit, crush_device_class, crush_failure_domain, directory, plugin, force=False): # noqa: E501
124136
'''
125137
Create a profile
126138
'''
@@ -130,6 +142,8 @@ def create_profile(module, name, k, m, stripe_unit, crush_device_class, director
130142
args.append('stripe_unit={0}'.format(stripe_unit))
131143
if crush_device_class:
132144
args.append('crush-device-class={0}'.format(crush_device_class))
145+
if crush_failure_domain:
146+
args.append('crush-failure-domain={0}'.format(crush_failure_domain))
133147
if directory:
134148
args.append('directory={0}'.format(plugin))
135149
if plugin:
@@ -165,6 +179,7 @@ def run_module():
165179
k=dict(type='str', required=False),
166180
m=dict(type='str', required=False),
167181
crush_device_class=dict(type='str', required=False),
182+
crush_failure_domain=dict(type='str', required=False),
168183
directory=dict(type='str', required=False),
169184
plugin=dict(type='str', required=False),
170185
)
@@ -182,6 +197,7 @@ def run_module():
182197
k = module.params.get('k')
183198
m = module.params.get('m')
184199
crush_device_class = module.params.get('crush_device_class')
200+
crush_failure_domain = module.params.get('crush_failure_domain')
185201
directory = module.params.get('directory')
186202
plugin = module.params.get('plugin')
187203

@@ -209,6 +225,7 @@ def run_module():
209225
current_profile['m'] != m or \
210226
current_profile.get('stripe_unit', stripe_unit) != stripe_unit or \
211227
current_profile.get('crush-device-class', crush_device_class) != crush_device_class or \
228+
current_profile.get('crush-failure-domain', crush_failure_domain) != crush_failure_domain or \
212229
current_profile.get('directory', directory) != directory or \
213230
current_profile.get('plugin', plugin) != plugin: # noqa: E501
214231
rc, cmd, out, err = exec_command(module,
@@ -218,6 +235,7 @@ def run_module():
218235
m,
219236
stripe_unit,
220237
crush_device_class, # noqa: E501
238+
crush_failure_domain,
221239
directory,
222240
plugin,
223241
force=True)) # noqa: E501
@@ -230,6 +248,7 @@ def run_module():
230248
m,
231249
stripe_unit, # noqa: E501
232250
crush_device_class, # noqa: E501
251+
crush_failure_domain,
233252
directory,
234253
plugin))
235254
if rc == 0:

plugins/modules/cephadm_key.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,31 @@
6969

7070
EXAMPLES = '''
7171
- name: create cephx key
72-
ceph_key:
72+
cephadm_key:
7373
name: "{{ item.name }}"
7474
state: present
7575
caps: "{{ item.caps }}"
7676
with_items: "{{ keys_to_create }}"
7777
7878
- name: delete cephx key
79-
ceph_key:
79+
cephadm_key:
8080
name: "my_key"
8181
state: absent
8282
8383
- name: info cephx key
84-
ceph_key:
84+
cephadm_key:
8585
name: "my_key"
8686
state: info
8787
8888
- name: info cephx admin key (plain)
89-
ceph_key:
89+
cephadm_key:
9090
name: client.admin
9191
output_format: plain
9292
state: info
9393
register: client_admin_key
9494
9595
- name: list cephx keys
96-
ceph_key:
96+
cephadm_key:
9797
state: list
9898
'''
9999

@@ -320,17 +320,17 @@ def run_module():
320320
else:
321321
rc, cmd, out, err = exec_commands(module, update_key(name, caps)) # noqa: E501
322322
if rc != 0:
323-
result["stdout"] = "Couldn't update caps for {0}".format(name)
323+
result["msg"] = "Couldn't update caps for {0}".format(name)
324324
result["stderr"] = err
325-
module.exit_json(**result)
325+
module.fail_json(**result)
326326
changed = True
327327

328328
else:
329329
rc, cmd, out, err = exec_commands(module, create_key(name, caps)) # noqa: E501
330330
if rc != 0:
331-
result["stdout"] = "Couldn't create {0}".format(name)
331+
result["msg"] = "Couldn't create {0}".format(name)
332332
result["stderr"] = err
333-
module.exit_json(**result)
333+
module.fail_json(**result)
334334
changed = True
335335

336336
elif state == "absent":

roles/cephadm/defaults/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ cephadm_fsid: ""
66
# Recreate cluster
77
cephadm_recreate: false
88
# Packages
9-
cephadm_custom_repos: false
9+
# NOTE(seunghun1ee): Set cephadm_custom_repos to true by default when host OS
10+
# is Ubuntu Noble.
11+
# This is because Ceph images for Noble are coming from Ubuntu repository
12+
# https://packages.ubuntu.com/noble-updates/cephadm
13+
cephadm_custom_repos: "{{ ansible_facts.distribution_release == 'noble' }}"
1014
cephadm_package_update: false
1115
# Images
1216
cephadm_image: ""

roles/cephadm/tasks/osds.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@
2020
# NOTE: Without this, the delegate hosts's ansible_host variable will not
2121
# be respected.
2222
ansible_host: "{{ mon_ansible_host if 'mons' in group_names else hostvars[groups['mons'][0]].ansible_host }}"
23+
until: osd_add_result.rc == 0
24+
retries: 3
25+
delay: 10

0 commit comments

Comments
 (0)