Skip to content

Update the java doc for the method disconnectPhysicalDiskByPath - #9210

Merged
yadvr merged 1 commit into
apache:4.19from
shapeblue:UpdateJavaDocForDisconnectMethodForAdapter
Jun 11, 2024
Merged

yadvr merged 1 commit into
apache:4.19from
shapeblue:UpdateJavaDocForDisconnectMethodForAdapter

Conversation

@harikrishna-patnala

Copy link
Copy Markdown
Member

Description

This PR addresses the issue #8789

The original issue is disconnectPhysicalDiskByPath() implementation in FibreChannelAdaptor always returns true irrespective of the success of the operation. This was already fixed in the PR #8889 .

Ideally this method has to be called after choosing the right adapter based on the storage pool type of the volume path, but currently it is just called in a loop.
https://github.com/shapeblue/cloudstack/blob/05b9b6e2e77b9b633f0fe22aff5f9f3c047b2303/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java#L200-L212

while 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.

In this PR I've added the java doc explaining the method and situation.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@harikrishna-patnala harikrishna-patnala added this to the 4.19.1.0 milestone Jun 11, 2024
@harikrishna-patnala
harikrishna-patnala force-pushed the UpdateJavaDocForDisconnectMethodForAdapter branch from 16eb62d to a235336 Compare June 11, 2024 05:50
@harikrishna-patnala
harikrishna-patnala requested a review from rp- June 11, 2024 05:50
@codecov

codecov Bot commented Jun 11, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.96%. Comparing base (3f2761e) to head (a235336).
Report is 3 commits behind head on 4.19.

Additional details and impacted files
@@             Coverage Diff             @@
##               4.19    #9210     +/-   ##
===========================================
  Coverage     14.96%   14.96%             
- Complexity    10993    10998      +5     
===========================================
  Files          5373     5373             
  Lines        469248   469255      +7     
  Branches      58782    57190   -1592     
===========================================
+ Hits          70210    70221     +11     
+ Misses       391266   391258      -8     
- Partials       7772     7776      +4     
Flag Coverage Δ
uitests 4.30% <ø> (-0.01%) ⬇️
unittests 15.67% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, only javadoc changes

@yadvr
yadvr merged commit acae5c5 into apache:4.19 Jun 11, 2024
@yadvr
yadvr deleted the UpdateJavaDocForDisconnectMethodForAdapter branch June 11, 2024 09:14
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 17, 2024
…pache#9210)

This PR addresses the issue apache#8789

The original issue is disconnectPhysicalDiskByPath() implementation in FibreChannelAdaptor always returns true irrespective of the success of the operation. This was already fixed in the PR apache#8889 .

Ideally this method has to be called after choosing the right adapter based on the storage pool type of the volume path, but currently it is just called in a loop.
https://github.com/shapeblue/cloudstack/blob/05b9b6e2e77b9b633f0fe22aff5f9f3c047b2303/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java#L200-L212

while 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.

In this PR I've added the java doc explaining the method and situation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

FibreChannelAdaptor disconnectPhysicalDiskByPath should not always return true

4 participants