Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1848250

Summary: storage: tests_disk_errors.yml will be failed if system has SWAP configured
Product: Red Hat Enterprise Linux 8 Reporter: Zhang Yi <yizhan>
Component: rhel-system-rolesAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: David Jež <djez>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: djez, storage-qe
Target Milestone: rcKeywords: Rebase
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:storage
Fixed In Version: rhel-system-roles-1.0-15.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 04:03:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zhang Yi 2020-06-18 05:15:14 UTC
Description of problem:
storage: tests_disk_errors.yml will be failed if system has SWAP configured

Cloned from https://github.com/linux-system-roles/storage/issues/111

Version-Release number of selected component (if applicable):
rhel-system-roles-1.0-11.el8

How reproducible:


Steps to Reproduce:
# ansible-playbook -i inventory tests/tests_disk_errors.yml

TASK [Try to replace the file system on disk in safe mode] ***********************************************************************************************************************************************************************************
task path: /root/test/storage/tests/tests_disk_errors.yml:101

---snip---

TASK [storage : debug] ***********************************************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:113
ok: [localhost] => {
    "blivet_output": {
        "actions": [],
        "changed": false,
        "crypts": [],
        "failed": false,
        "leaves": [
            "/dev/sda1",
            "/dev/sda2",
            "/dev/mapper/rhel_storageqe--62-home",
            "/dev/mapper/rhel_storageqe--62-root",
            "/dev/mapper/rhel_storageqe--62-swap",
            "/dev/sdb",
            "/dev/sdh",
            "/dev/sdi",
            "/dev/sdj",
            "/dev/sdc",
            "/dev/sdk",
            "/dev/sdl1",
            "/dev/sdd",
            "/dev/sde",
            "/dev/sdf",
            "/dev/sdg",
            "/dev/nvme0n1"
        ],
        "mounts": [
            {
                "path": "/opt/test1",
                "state": "absent"
            },
            {
                "dump": 0,
                "fstype": "ext4",
                "opts": "defaults",
                "passno": 0,
                "path": "none",
                "src": "UUID=6190b98d-8e08-4a5d-b64d-1f7f99f1e9f6",
                "state": "mounted"
            }
        ],
        "packages": [
            "e2fsprogs",
            "lvm2",
            "xfsprogs",
            "dosfstools"
        ],
        "pools": [],
        "volumes": [
            {
                "_device": "/dev/nvme0n1",
                "_kernel_device": "/dev/nvme0n1",
                "_mount_id": "UUID=6190b98d-8e08-4a5d-b64d-1f7f99f1e9f6",
                "_raw_device": "/dev/nvme0n1",
                "_raw_kernel_device": "/dev/nvme0n1",
                "disks": [
                    "nvme0n1"
                ],
                "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": "ext4",
                "mount_check": 0,
                "mount_device_identifier": "uuid",
                "mount_options": "defaults",
                "mount_passno": 0,
                "mount_point": "none",
                "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 : set the list of pools for test verification] *********************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:116
ok: [localhost] => {"ansible_facts": {"_storage_pools_list": []}, "changed": false}

TASK [storage : set the list of volumes for test verification] *******************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:120
ok: [localhost] => {"ansible_facts": {"_storage_volumes_list": [{"_device": "/dev/nvme0n1", "_kernel_device": "/dev/nvme0n1", "_mount_id": "UUID=6190b98d-8e08-4a5d-b64d-1f7f99f1e9f6", "_raw_device": "/dev/nvme0n1", "_raw_kernel_device": "/dev/nvme0n1", "disks": ["nvme0n1"], "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": "ext4", "mount_check": 0, "mount_device_identifier": "uuid", "mount_options": "defaults", "mount_passno": 0, "mount_point": "none", "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"}]}, "changed": false}

TASK [storage : remove obsolete mounts] ******************************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:136
changed: [localhost] => (item={'path': '/opt/test1', 'state': 'absent'}) => {"ansible_loop_var": "mount_info", "changed": true, "dump": "0", "fstab": "/etc/fstab", "mount_info": {"path": "/opt/test1", "state": "absent"}, "name": "/opt/test1", "opts": "defaults", "passno": "0"}

TASK [storage : tell systemd to refresh its view of /etc/fstab] ******************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:147
ok: [localhost] => {"changed": false, "name": null, "status": {}}

TASK [storage : set up new/current mounts] ***************************************************************************************************************************************************************************************************
task path: /root/test/storage/tasks/main-blivet.yml:152
failed: [localhost] (item={'src': 'UUID=6190b98d-8e08-4a5d-b64d-1f7f99f1e9f6', 'path': 'none', 'fstype': 'ext4', 'opts': 'defaults', 'dump': 0, 'passno': 0, 'state': 'mounted'}) => {"ansible_loop_var": "mount_info", "changed": false, "mount_info": {"dump": 0, "fstype": "ext4", "opts": "defaults", "passno": 0, "path": "none", "src": "UUID=6190b98d-8e08-4a5d-b64d-1f7f99f1e9f6", "state": "mounted"}, "msg": "Error mounting none: mount: /root/test/storage/tests/none: unknown filesystem type 'swap'.\n"}

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
localhost                  : ok=95   changed=4    unreachable=0    failed=1    skipped=45   rescued=3    ignored=0 


[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 
sdc                           8:32   0 186.3G  0 disk 
sdd                           8:48   0 111.8G  0 disk 
sde                           8:64   0 111.8G  0 disk 
sdf                           8:80   0 931.5G  0 disk 
sdg                           8:96   0 931.5G  0 disk 
sdh                           8:112  0 931.5G  0 disk 
sdi                           8:128  0 931.5G  0 disk 
sdj                           8:144  0 931.5G  0 disk 
sdk                           8:160  0 279.4G  0 disk 
sdl                           8:176  0 279.4G  0 disk 
└─sdl1                        8:177  0 279.4G  0 part /root/test
nvme0n1                     259:0    0 745.2G  0 disk 
[root@storageqe-62 storage]# cat /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Tue Jun 16 02:49:03 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/rhel_storageqe--62-root /                       xfs     defaults        0 0
UUID=0c459216-6a71-4860-8e5f-97bfc9c93095 /boot                   xfs     defaults        0 0
UUID=3189-4B31          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
/dev/mapper/rhel_storageqe--62-home /home                   xfs     defaults        0 0
/dev/mapper/rhel_storageqe--62-swap none                    swap    defaults        0 0
UUID=6190b98d-8e08-4a5d-b64d-1f7f99f1e9f6 none ext4 defaults 0 0

[root@storageqe-62 storage]# blkid | grep 6190b98d-8e08-4a5d-b64d-1f7f99f1e9f
/dev/nvme0n1: UUID="6190b98d-8e08-4a5d-b64d-1f7f99f1e9f6" TYPE="ext4"

Actual results:


Expected results:


Additional info:

I tried disabling the SWAP partition on fstab and it passed.

Comment 8 errata-xmlrpc 2020-11-04 04:03:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rhel-system-roles bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4809