storage: tests_swap failed with one 280GB disk
The tests failed when I use one 1TB disk, it reports "device is too large for new format" from the error output, but it works when I use "mkswap on this disk"
ASK [Create a disk device with swap] ********************************************************************************************************************************************************************************************************
task path: /root/test/storage/tests/tests_swap.yml:18
TASK [storage : Set version specific variables] **********************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main.yml:2
ok: [localhost] => (item=/root/test/storage/vars/RedHat-8.yml) => {
"ansible_facts": {
"blivet_package_list": [
"python3-blivet",
"libblockdev-crypto",
"libblockdev-dm",
"libblockdev-lvm",
"libblockdev-mdraid",
"libblockdev-swap"
]
},
"ansible_included_var_files": [
"/root/test/storage/vars/RedHat-8.yml"
],
"ansible_loop_var": "item",
"changed": false,
"item": "/root/test/storage/vars/RedHat-8.yml"
}
TASK [storage : define an empty list of pools to be used in testing] *************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main.yml:9
ok: [localhost] => {
"ansible_facts": {
"_storage_pools_list": []
},
"changed": false
}
TASK [storage : define an empty list of volumes to be used in testing] ***********************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main.yml:13
ok: [localhost] => {
"ansible_facts": {
"_storage_volumes_list": []
},
"changed": false
}
TASK [storage : include the appropriate provider tasks] **************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main.yml:17
included: /root/test/storage/tasks/main-blivet.yml for localhost
TASK [storage : get a list of rpm packages installed on host machine] ************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:2
skipping: [localhost] => {
"changed": false,
"skip_reason": "Conditional result was False"
}
TASK [storage : make sure blivet is available] ***********************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:7
Running dnf
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1592374364.8981004-202334-29846248641960 && echo ansible-tmp-1592374364.8981004-202334-29846248641960="` echo /root/.ansible/tmp/ansible-tmp-1592374364.8981004-202334-29846248641960 `" ) && sleep 0'
Using module file /usr/lib/python3.6/site-packages/ansible/modules/packaging/os/dnf.py
<localhost> PUT /root/.ansible/tmp/ansible-local-201969g7nl4la9/tmp5_e_9irq TO /root/.ansible/tmp/ansible-tmp-1592374364.8981004-202334-29846248641960/AnsiballZ_dnf.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592374364.8981004-202334-29846248641960/ /root/.ansible/tmp/ansible-tmp-1592374364.8981004-202334-29846248641960/AnsiballZ_dnf.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1592374364.8981004-202334-29846248641960/AnsiballZ_dnf.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592374364.8981004-202334-29846248641960/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"changed": false,
"invocation": {
"module_args": {
"allow_downgrade": false,
"autoremove": false,
"bugfix": false,
"conf_file": null,
"disable_excludes": null,
"disable_gpg_check": false,
"disable_plugin": [],
"disablerepo": [],
"download_dir": null,
"download_only": false,
"enable_plugin": [],
"enablerepo": [],
"exclude": [],
"install_repoquery": true,
"install_weak_deps": true,
"installroot": "/",
"list": null,
"lock_timeout": 30,
"name": [
"python3-blivet",
"libblockdev-crypto",
"libblockdev-dm",
"libblockdev-lvm",
"libblockdev-mdraid",
"libblockdev-swap"
],
"releasever": null,
"security": false,
"skip_broken": false,
"state": "present",
"update_cache": false,
"update_only": false,
"validate_certs": true
}
},
"msg": "Nothing to do",
"rc": 0,
"results": []
}
TASK [storage : initialize internal facts] ***************************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:18
ok: [localhost] => {
"ansible_facts": {
"_storage_pools": [],
"_storage_vol_defaults": [],
"_storage_vol_pools": [],
"_storage_vols_no_defaults": [],
"_storage_vols_no_defaults_by_pool": {},
"_storage_vols_w_defaults": [],
"_storage_volumes": []
},
"changed": false
}
TASK [storage : Apply defaults to pools and volumes [1/6]] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:28
TASK [storage : Apply defaults to pools and volumes [2/6]] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:36
TASK [storage : Apply defaults to pools and volumes [3/6]] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:44
TASK [storage : Apply defaults to pools and volumes [4/6]] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:52
TASK [storage : Apply defaults to pools and volumes [5/6]] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:61
TASK [storage : Apply defaults to pools and volumes [6/6]] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:72
ok: [localhost] => (item={'name': 'test1', 'type': 'disk', 'disks': ['sdj'], 'fs_type': 'swap'}) => {
"ansible_facts": {
"_storage_volumes": [
{
"disks": [
"sdj"
],
"encryption": false,
"encryption_cipher": null,
"encryption_key_file": null,
"encryption_key_size": null,
"encryption_luks_version": null,
"encryption_passphrase": null,
"fs_create_options": "",
"fs_label": "",
"fs_overwrite_existing": true,
"fs_type": "swap",
"mount_check": 0,
"mount_device_identifier": "uuid",
"mount_options": "defaults",
"mount_passno": 0,
"mount_point": "",
"name": "test1",
"raid_chunk_size": null,
"raid_device_count": null,
"raid_level": null,
"raid_metadata_version": null,
"raid_spare_count": null,
"size": 0,
"state": "present",
"type": "disk"
}
]
},
"ansible_loop_var": "volume",
"changed": false,
"volume": {
"disks": [
"sdj"
],
"fs_type": "swap",
"name": "test1",
"type": "disk"
}
}
TASK [storage : debug] ***********************************************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:84
ok: [localhost] => {
"_storage_pools": []
}
TASK [storage : debug] ***********************************************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:87
ok: [localhost] => {
"_storage_volumes": [
{
"disks": [
"sdj"
],
"encryption": false,
"encryption_cipher": null,
"encryption_key_file": null,
"encryption_key_size": null,
"encryption_luks_version": null,
"encryption_passphrase": null,
"fs_create_options": "",
"fs_label": "",
"fs_overwrite_existing": true,
"fs_type": "swap",
"mount_check": 0,
"mount_device_identifier": "uuid",
"mount_options": "defaults",
"mount_passno": 0,
"mount_point": "",
"name": "test1",
"raid_chunk_size": null,
"raid_device_count": null,
"raid_level": null,
"raid_metadata_version": null,
"raid_spare_count": null,
"size": 0,
"state": "present",
"type": "disk"
}
]
}
TASK [storage : get required packages] *******************************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:90
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1592374369.7118692-202368-111377782914919 && echo ansible-tmp-1592374369.7118692-202368-111377782914919="` echo /root/.ansible/tmp/ansible-tmp-1592374369.7118692-202368-111377782914919 `" ) && sleep 0'
Using module file /root/test/storage/library/blivet.py
<localhost> PUT /root/.ansible/tmp/ansible-local-201969g7nl4la9/tmp4ot4o6pr TO /root/.ansible/tmp/ansible-tmp-1592374369.7118692-202368-111377782914919/AnsiballZ_blivet.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592374369.7118692-202368-111377782914919/ /root/.ansible/tmp/ansible-tmp-1592374369.7118692-202368-111377782914919/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1592374369.7118692-202368-111377782914919/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592374369.7118692-202368-111377782914919/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"actions": [],
"changed": false,
"crypts": [],
"invocation": {
"module_args": {
"disklabel_type": null,
"packages_only": true,
"pools": [],
"safe_mode": true,
"use_partitions": null,
"volumes": [
{
"disks": [
"sdj"
],
"encryption": false,
"encryption_cipher": null,
"encryption_key_file": null,
"encryption_key_size": null,
"encryption_luks_version": null,
"encryption_passphrase": null,
"fs_create_options": "",
"fs_label": "",
"fs_overwrite_existing": true,
"fs_type": "swap",
"mount_check": 0,
"mount_device_identifier": "uuid",
"mount_options": "defaults",
"mount_passno": 0,
"mount_point": "",
"name": "test1",
"raid_chunk_size": null,
"raid_device_count": null,
"raid_level": null,
"raid_metadata_version": null,
"raid_spare_count": null,
"size": 0,
"state": "present",
"type": "disk"
}
]
}
},
"leaves": [],
"mounts": [],
"packages": [],
"pools": [],
"volumes": []
}
TASK [storage : make sure required packages are installed] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:99
Running dnf
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1592374373.259246-202437-45788962828849 && echo ansible-tmp-1592374373.259246-202437-45788962828849="` echo /root/.ansible/tmp/ansible-tmp-1592374373.259246-202437-45788962828849 `" ) && sleep 0'
Using module file /usr/lib/python3.6/site-packages/ansible/modules/packaging/os/dnf.py
<localhost> PUT /root/.ansible/tmp/ansible-local-201969g7nl4la9/tmpa8fhw0ws TO /root/.ansible/tmp/ansible-tmp-1592374373.259246-202437-45788962828849/AnsiballZ_dnf.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592374373.259246-202437-45788962828849/ /root/.ansible/tmp/ansible-tmp-1592374373.259246-202437-45788962828849/AnsiballZ_dnf.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1592374373.259246-202437-45788962828849/AnsiballZ_dnf.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592374373.259246-202437-45788962828849/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"changed": false,
"invocation": {
"module_args": {
"allow_downgrade": false,
"autoremove": false,
"bugfix": false,
"conf_file": null,
"disable_excludes": null,
"disable_gpg_check": false,
"disable_plugin": [],
"disablerepo": [],
"download_dir": null,
"download_only": false,
"enable_plugin": [],
"enablerepo": [],
"exclude": [],
"install_repoquery": true,
"install_weak_deps": true,
"installroot": "/",
"list": null,
"lock_timeout": 30,
"name": [],
"releasever": null,
"security": false,
"skip_broken": false,
"state": "present",
"update_cache": false,
"update_only": false,
"validate_certs": true
}
},
"msg": "Nothing to do",
"rc": 0,
"results": []
}
TASK [storage : manage the pools and volumes to match the specified state] *******************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:104
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761 && echo ansible-tmp-1592374376.9155169-202453-71324387066761="` echo /root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761 `" ) && sleep 0'
Using module file /root/test/storage/library/blivet.py
<localhost> PUT /root/.ansible/tmp/ansible-local-201969g7nl4la9/tmpb81wdwno TO /root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/ /root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py", line 102, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 1190, in <module>
File "/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 1187, in main
File "/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 1150, in run_module
File "/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 868, in manage_volume
File "/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 353, in manage
File "/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 385, in _create
File "/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py", line 340, in _reformat
File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
return m(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/blivet/blivet.py", line 828, in format_device
raise e
File "/usr/lib/python3.6/site-packages/blivet/blivet.py", line 824, in format_device
self.devicetree.actions.add(create_ac)
File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
return m(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/blivet/actionlist.py", line 76, in add
action.apply()
File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
return m(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/blivet/deviceaction.py", line 607, in apply
self.device.format = self._format
File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
return m(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/blivet/devices/storage.py", line 781, in <lambda>
lambda d, f: d._set_format(f),
File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
return m(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/blivet/devices/storage.py", line 732, in _set_format
raise errors.DeviceError("device is too large for new format")
blivet.errors.DeviceError: device is too large for new format
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py\", line 102, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1592374376.9155169-202453-71324387066761/AnsiballZ_blivet.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.blivet', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1190, in <module>\n File \"/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1187, in main\n File \"/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 1150, in run_module\n File \"/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 868, in manage_volume\n File \"/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 353, in manage\n File \"/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 385, in _create\n File \"/tmp/ansible_blivet_payload_5h2_lfy7/ansible_blivet_payload.zip/ansible/modules/blivet.py\", line 340, in _reformat\n File \"/usr/lib/python3.6/site-packages/blivet/threads.py\", line 53, in run_with_lock\n return m(*args, **kwargs)\n File \"/usr/lib/python3.6/site-packages/blivet/blivet.py\", line 828, in format_device\n raise e\n File \"/usr/lib/python3.6/site-packages/blivet/blivet.py\", line 824, in format_device\n self.devicetree.actions.add(create_ac)\n File \"/usr/lib/python3.6/site-packages/blivet/threads.py\", line 53, in run_with_lock\n return m(*args, **kwargs)\n File \"/usr/lib/python3.6/site-packages/blivet/actionlist.py\", line 76, in add\n action.apply()\n File \"/usr/lib/python3.6/site-packages/blivet/threads.py\", line 53, in run_with_lock\n return m(*args, **kwargs)\n File \"/usr/lib/python3.6/site-packages/blivet/deviceaction.py\", line 607, in apply\n self.device.format = self._format\n File \"/usr/lib/python3.6/site-packages/blivet/threads.py\", line 53, in run_with_lock\n return m(*args, **kwargs)\n File \"/usr/lib/python3.6/site-packages/blivet/devices/storage.py\", line 781, in <lambda>\n lambda d, f: d._set_format(f),\n File \"/usr/lib/python3.6/site-packages/blivet/threads.py\", line 53, in run_with_lock\n return m(*args, **kwargs)\n File \"/usr/lib/python3.6/site-packages/blivet/devices/storage.py\", line 732, in _set_format\n raise errors.DeviceError(\"device is too large for new format\")\nblivet.errors.DeviceError: device is too large for new format\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
localhost : ok=31 changed=0 unreachable=0 failed=1 skipped=19 rescued=0 ignored=0
[root@storageqe-62 storage]# lsblk | grep sdj
sdj 8:144 0 931.5G 0 disk
[root@storageqe-62 storage]# mkswap /dev/sdj
Setting up swapspace version 1, size = 931.5 GiB (1000204881920 bytes)
no label, UUID=85eb5383-f60f-4e9a-8644-79cd1ea51c18
[root@storageqe-62 storage]# echo $?
0
Also failed when I use one 280GB disk:
[root@storageqe-62 storage]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 279.4G 0 disk
├─sda1 8:1 0 600M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 277.8G 0 part
├─rhel_storageqe--62-root 253:0 0 70G 0 lvm /
├─rhel_storageqe--62-swap 253:1 0 7.9G 0 lvm [SWAP]
└─rhel_storageqe--62-home 253:2 0 200G 0 lvm /home
sdb 8:16 0 279.4G 0 disk
Blivet currently limits swap size to 128 GiB, see https://github.com/storaged-project/blivet/pull/850 and https://bugzilla.redhat.com/show_bug.cgi?id=1656485
Blivet currently limits swap size to 128 GiB, see storaged-project/blivet#850 and https://bugzilla.redhat.com/show_bug.cgi?id=1656485
So it's one limitation from Blivet, thanks for the info.
It should fail in a more graceful way at least, not with a traceback.
The size limit for swap was increased to 16 TiB in blivet 3.3.0 which should be available in all supported distributions.