filesystem: xfs resize: minimal required increment (#11033)
Internally XFS uses allocation groups. Allocation groups have a maximum
size of 1 TiB - 1 block. For devices >= 4 TiB XFS uses max size
allocation groups. If a filesystem is extended and the last allocation
group is already at max size, a new allocation group is added. An
allocation group seems to require at least 64 4 KiB blocks.
For devices with integer TiB size (>4), this creates a filesystem that
has initially has 1 unused block per TiB size. The `resize` option
detects this unused space, and tries to resize the filesystem. The
xfs_growfs call is successful (exit 0), but does not increase the file
system size. This is detected as repeated change in the task.
Test case:
```
- hosts: localhost
tasks:
- ansible.builtin.command:
cmd: truncate -s 4T /media/xfs.img
creates: /media/xfs.img
notify: loopdev xfs
- ansible.builtin.meta: flush_handlers
- name: pickup xfs.img resize
ansible.builtin.command:
cmd: losetup -c /dev/loop0
changed_when: false
- community.general.filesystem:
dev: "/dev/loop0"
fstype: "xfs"
- ansible.posix.mount:
src: "/dev/loop0"
fstype: "xfs"
path: "/media/xfs"
state: "mounted"
# always shows a diff even for newly created filesystems
- community.general.filesystem:
dev: "/dev/loop0"
fstype: "xfs"
resizefs: true
handlers:
- name: loopdev xfs
ansible.builtin.command:
cmd: losetup /dev/loop0 /media/xfs.img
```
NB: If the last allocation group is not yet at max size, the filesystem
can be resized. Detecting this requires considering the XFS topology.
Other filesystems (at least ext4) also seem to require a minimum
increment after the initial device size, but seem to use the entire
device after initial creation.
Fun observation: creating a 64(+) TiB filesystem leaves a 64(+) block
gap at the end, that is allocated in a subsequent xfs_growfs call.
(cherry picked from commit f5943201b9)
Co-authored-by: jnaab <25617714+jnaab@users.noreply.github.com>
Co-authored-by: Johannes Naab <johannes.naab@hetzner-cloud.de>
Fix typing failure in CI (#11030)
* Fix typing failure in CI.
* Add changelog fragment.
(cherry picked from commit b471a4a90d)
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add option for '--changed-deps'
* Add changelog fragment
* Re-add the changed_deps option
* Include link to PR
* Rename fragment properly, and include PR number in name
* Add version string and improve doc description
* Update changelogs/fragments/11023-portage_changed_deps.yml
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Refine documentation string further
* Reformat with ruff
* Add a correct changely fragment
* Update plugins/modules/portage.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add Keycloak module to send execute-actions email to users
Signed-off-by: Marius Bertram <marius@brtrm.de>
* Fix Example Typo
Signed-off-by: Marius Bertram <marius@brtrm.de>
* Break if argument_speck() is broken
Signed-off-by: Marius Bertram <marius@brtrm.de>
* Adjust to new tests in main.
* Remove unnecessary version_added.
---------
Signed-off-by: Marius Bertram <marius@brtrm.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* omapi_host: fix bytes vs. str confusion
After an update of the control node from Debian
bookworm to trixie, the omapi_host module fails to
work with the error message:
Key of type 'bytes' is not JSON serializable by the
'module_legacy_m2c' profile.
https://github.com/ansible/ansible/issues/85937 had the
same error, but the fix is a bit more intricate here
because the result dict is dynamically generated from
an API response object.
This also fixes unpacking the MAC and IP address and
hardware type, which were broken for Python3.
* Merge suggestion for changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
* do not unpack_ip twice
Noticed by Felix Fontein <felix@fontein.de>
* mention py3k in changelog fragment, too
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added excludes option to filetree module
* Renamed option 'excludes' to 'exclude'
* Corrected issue and PR links
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added version for documentation
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fixed example of using exclude option
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fixed regular expression in example
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix(pritunl_user): improve resilience to null or missing user parameters
* added changelog fragment - 10955
* standardize 10955 changelog fragment content
Co-authored-by: Felix Fontein <felix@fontein.de>
* simplify user params comparison
Co-authored-by: Felix Fontein <felix@fontein.de>
* simplify list fetch
Co-authored-by: Felix Fontein <felix@fontein.de>
* simplify remote value retrieval
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: djenkins <djenkins@twosix.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
* terraform: Fix bug when None values aren't processed correctly
Just found that i can't pass null values as complex variables into terraform using this module, while i can do that with terraform itself. Fixed undesired behavior.
* chore: changelog fragment 10961-terraform-complexvars-null-bugfix.yaml
* Update changelogs/fragments/10961-terraform-complexvars-null-bugfix.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix condition to check for None type in terraform.py
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* deprecate oneandone modules
* add mod util to runtime.yml
* add changelog frag
* change deprecation version to 13.0.0
* change deprecation version to 13.0.0 in readme.yml as well
* Update changelogs/fragments/10994-oneandone-deprecation.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>