Skip to content

FibreChannelAdaptor disconnectPhysicalDiskByPath should not always return true #8789

Closed

Description

@rp-
ISSUE TYPE
  • Bug Report
COMPONENT NAME
KVM-Storage
CLOUDSTACK VERSION
4.19.0
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

I'm not pointing fingers as the Linstor driver also needs a fix for that(comming), but
disconnectPhysicalDiskByPath should only return true if it is able to handle that path.
Currently it tries to handle every path and if it is used as the first entry in the StorageadaptorMap it will always "win",
even if it isn't the driver device.
Also the formatting looks a bit off in that method.

public boolean disconnectPhysicalDiskByPath(String localPath) {

STEPS TO REPRODUCE
Have a non FibreChannel primary storage and stop/move a VM to another host.
disconnectbyPath will be called and if FibreChannel adaptor is 1. in the Map it will take over the disconnect call.
EXPECTED RESULTS
FibreChannel driver only handling paths belonging to it
ACTUAL RESULTS

@rg9975

Activity

  1. rg9975 commented on Mar 14, 2024

    @rg9975

    Thank you for flagging this, I will include a fix for this in a forthcoming 4.19.1 pull request.

  2. added this to the 4.19.1.0 milestone on Mar 14, 2024
  3. harikrishna-patnala commented on Jun 10, 2024

    @harikrishna-patnala
    Member

    @rp- I see the following part has be already handled in the PR #8889
    public boolean disconnectPhysicalDiskByPath(String localPath) {

    I'm trying to fix the case of running into the loop of all adapters by somehow passing the storage pool type to that caller cleanup() method but this is touching all over the code (which I fear it creates other regressions), instead I feel we can keep it the current way only since Fibrechannel adapter has already fixed. Whats your thoughts @rp-

  4. rp- commented on Jun 10, 2024

    @rp-
    ContributorAuthor

    For now, yes.

    But I think a rework, and keeping track of the storage pool a path belongs too would be very good.
    Otherwise with a new primary storage or a regression would trigger such a bug again.

  5. harikrishna-patnala commented on Jun 11, 2024

    @harikrishna-patnala
    Member

    Thanks @rp- let me add a clear java doc on that method for that purpose and explaining the possible bug.

  6. yadvr commented on Jun 11, 2024

    @yadvr
    Member

    Javadoc addressed by #9210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions