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

Level is interperted as a string for raid-1 chunk check #43

Closed
tnosaj opened this issue Nov 19, 2024 · 1 comment
Closed

Level is interperted as a string for raid-1 chunk check #43

tnosaj opened this issue Nov 19, 2024 · 1 comment
Labels

Comments

@tnosaj
Copy link

tnosaj commented Nov 19, 2024

Description

The if to ensure that the chunk size is not provided in raid1 setups fails if the value is not cast correctly.

(item={'name': 'md0', 'devices': ['/dev/nvme2n1', '/dev/nvme3n1'], 'filesystem': 'ext4', 'level': '1', 'mountpoint': '/var/lib/postgresql', 'state': 'present', 'opts': 'noatime'})

In this example (taken 1:1 from the defaults file), the level value is interpreted as a string. As a result, the chunk check fails, and the chunk=512K is passed to mdadm create, and as described in #35, the creation fails:

failed: [XXXX] (item={'name': 'md0', 'devices': ['/dev/nvme2n1', '/dev/nvme3n1'], 'filesystem': 'ext4', 'level': '1', 'mountpoint': '/var/lib/postgre
sql', 'state': 'present', 'opts': 'noatime'}) => {"ansible_loop_var": "item", "changed": true, "cmd": "yes | mdadm --create /dev/md0 --level=1 --chunk=512K --metadata=1.2 --raid-d
evices=2 /dev/nvme2n1 /dev/nvme3n1", "delta": "0:00:00.003486", "end": "2024-11-19 18:38:40.930926", "item": {"devices": ["/dev/nvme2n1", "/dev/nvme3n1"], "filesystem": "ext4", "l
evel": "1", "mountpoint": "/var/lib/postgresql", "name": "md0", "opts": "noatime", "state": "present"}, "msg": "non-zero return code", "rc": 1, "start": "2024-11-19 18:38:40.92744
0", "stderr": "mdadm: specifying chunk size is forbidden for this level", "stderr_lines": ["mdadm: specifying chunk size is forbidden for this level"], "stdout": "", "stdout_lines
": []} 

In all other invocations of this value, this does not make a difference , it is only in this comparison that the type is problematic.

Copy link

stale bot commented Jan 18, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 18, 2025
@stale stale bot closed this as completed Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant