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

Device replacement test fails on LSO cluster with the error: ocs_ci.ocs.exceptions.VSLMNotFoundException #9898

Closed
mashetty330 opened this issue Jun 4, 2024 · 5 comments · Fixed by #10281
Assignees
Labels
bug Something isn't working

Comments

@mashetty330
Copy link
Contributor

When you run the device replacement tests on LSO cluster, I got the below error:

def test_device_replacement(self, nodes):
    """
    Test device replacement in stretch cluster

    """
  osd_device_replacement(nodes)

tests/functional/disaster-recovery/sc_arbiter/test_device_replacement.py:25:


ocs_ci/ocs/osd_operations.py:49: in osd_device_replacement
volume_path = nodes.get_volume_path(backing_volume)
ocs_ci/ocs/platform_nodes.py:540: in get_volume_path
return self.vsphere.get_volume_path(
ocs_ci/utility/vsphere.py:1689: in get_volume_path
vslm = self.get_vslm_id(volume_id, ds, storage)


self = <ocs_ci.utility.vsphere.VSPHERE object at 0x7f30737b6220>, volume_id = '/mnt/local-storage/localblock/scsi-36000c29d920431d5657a21749bc20860', datastore = 'vim.Datastore:datastore-26305'
storage = 'vim.vslm.vcenter.VStorageObjectManager:VStorageObjectManager'

def get_vslm_id(self, volume_id, datastore, storage):
    """
    Gets the VSLM ID

    Args:
        volume_id (str): Volume ID
        datastore (vim.Datastore): Datastore instance
        storage (vim.vslm.vcenter.VStorageObjectManager): vStorageObjectManager

    Returns:
        vim.vslm.ID

    Raises:
        VSLMNotFoundException: In case VSLM not found

    """
    vslms = storage.ListVStorageObject(datastore)
    for vslm in vslms:
        if vslm.id == volume_id:
            return vslm
    else:
        logger.error(f"vslm not found for volume {volume_id}")
      raise VSLMNotFoundException

E ocs_ci.ocs.exceptions.VSLMNotFoundException

I did a basic analysis and found out that below expectation in the code is not meeting.

 if vslm.id == volume_id:
@mashetty330 mashetty330 added the bug Something isn't working label Jun 4, 2024
@vavuthu
Copy link
Contributor

vavuthu commented Jun 11, 2024

@mashetty330 could you provide the job link

@vavuthu
Copy link
Contributor

vavuthu commented Jun 11, 2024

When you run the device replacement tests on LSO cluster, I got the below error:

def test_device_replacement(self, nodes):
    """
    Test device replacement in stretch cluster

    """
  osd_device_replacement(nodes)

tests/functional/disaster-recovery/sc_arbiter/test_device_replacement.py:25:

didn't see this test case in https://github.com/red-hat-storage/ocs-ci/tree/master/tests/functional/disaster-recovery/sc_arbiter

@mashetty330
Copy link
Contributor Author

@mashetty330 could you provide the job link

@vavuthu you can run device replacement test in LSO cluster. I will provide you with the job

@mashetty330
Copy link
Contributor Author

@vavuthu please find the job https://url.corp.redhat.com/d9814df

@vavuthu
Copy link
Contributor

vavuthu commented Aug 12, 2024

u can run device replacement test in L

test case doesn't exist in repo. you are running test case from your PR ( #9548 ) which is not merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants