Comment 0 for bug 1836633

Revision history for this message
Ming Lei (mlei) wrote :

Brief Description
-----------------
Attempted to wipe a unassigned disk, run cmd "system host-disk-wipe --confirm <node> <disk id>", the output result was "None"

Severity
--------
Provide the severity of the defect.
Undetermined

Steps to Reproduce
------------------
1. On controller or compute node, find a unassigned disk uuid. e.g. "system host-disk-list controller 0"
2. Run "system host-disk-wipe --confirm <node> <disk id>"
3. Will see the output: "None"

Expected Behavior
------------------
output should be wipe disk results

Actual Behavior
----------------
output: "None"

Reproducibility
---------------
100% Reproducible

System Configuration
--------------------
Storage system: WCP_113-121 (Other lab had same results)

Branch/Pull Time/Commit
-----------------------
STX_master 20190713T013000Z

Last Pass
---------

Timestamp/Logs
--------------
[2019-07-13 19:56:10,565] 60 DEBUG MainThread conftest.update_results:: ***Failure at test call: /home/svc-cgcsauto/wassp-repos.new/testcases/cgcs/CGCSAuto/testcases/functional/storage/test_hostpartitions.py:973: AssertionError: Expected wipe disk to pass but instead failed
***Details: def test_host_disk_wipe_unassigned_disk():
        """
        This test attempts to run system host-disk-wipe on a node using any
        unassigned disk.

        Command format is:

        system host-disk-wipe [--confirm] <hostname or id> <disk uuid>

        Note, host-disk-wipe is only applicable to controller and compute nodes. It
        cannot be used on the rootfs disk. It cannot be used for a disk that is
        used by a PV or has partitions used by a PV.

        Arguments:
        - None

        Test Steps:
        1. Determine which disks are unassigned by comparing size_gib to
        available_gib in system host-disk-list
        2. Attempt to wipe the disk
        3. Expect it to pass

        Assumptions:
        - None
        """
        computes = system_helper.get_hosts(personality="compute", availability="available")
        controllers = system_helper.get_hosts(personality="controller", availability="available")
        hosts = controllers + computes

        found_disk = False
        for host in hosts:
            LOG.info("Query disks on host {}".format(host))
            disks = storage_helper.get_host_disks(host)
            for disk_uuid in disks:
                cmd = "host-disk-show {} {}".format(host, disk_uuid)
                rc, out = cli.system(cmd)
                size_gib = table_parser.get_value_two_col_table(table_parser.table(out), "size_gib")
                available_gib = table_parser.get_value_two_col_table(table_parser.table(out), "available_gib")
                if int(float(size_gib)) == int(float(available_gib)):
                    found_disk = True
                    LOG.tc_step("Attempting to wipe disk {} from host {}".format(disk_uuid, host))
                    cmd = 'host-disk-wipe --confirm {} {}'.format(host, disk_uuid)
                    rc, out = cli.system(cmd, fail_ok=True)
> assert rc == 0, "Expected wipe disk to pass but instead failed"
E AssertionError: Expected wipe disk to pass but instead failed
E assert 1 == 0

testcases/functional/storage/test_hostpartitions.py:973: AssertionError

Test Activity
-------------
Storage Regression Testing