Skip to content

Fix ScaleIO/Powerflex SDC id deletion on host disconnect - #7689

Merged
yadvr merged 1 commit into
apache:4.18from
shapeblue:FixSDCidDeletionOnHostDisconnect
Jul 3, 2023
Merged

yadvr merged 1 commit into
apache:4.18from
shapeblue:FixSDCidDeletionOnHostDisconnect

Conversation

@harikrishna-patnala

@harikrishna-patnala harikrishna-patnala commented Jun 26, 2023 •

Copy link
Copy Markdown
Member

Description

This PR fixes an intermittent issue where SDC id (local_path) is getting deleted and not getting populated when host connects back again.

Fix is to remove the code to delete the records from storage_pool_host_ref table. We are anyways updating the entry if the SDC ID is changed during agent restart which is anyways required inorder to get the new connections. I've quickly verified the host delete scenario to check the storage_pool_host_ref entries behavior, entries are getting deleted.

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)

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@harikrishna-patnala

Copy link
Copy Markdown
Member Author

@blueorangutan package

@codecov

codecov Bot commented Jun 26, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7689 (b86eac2) into 4.18 (faaf72b) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               4.18    #7689   +/-   ##
=========================================
  Coverage     13.00%   13.00%           
  Complexity     9013     9013           
=========================================
  Files          2719     2719           
  Lines        256854   256851    -3     
  Branches      40048    40047    -1     
=========================================
  Hits          33413    33413           
+ Misses       219255   219252    -3     
  Partials       4186     4186           
Impacted Files Coverage Δ
...torage/datastore/provider/ScaleIOHostListener.java 0.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@nvazquez nvazquez 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.

Code LGTM

@weizhouapache

Copy link
Copy Markdown
Member

code lgtm

@DaanHoogland DaanHoogland added this to the 4.18.1.0 milestone Jun 26, 2023

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes LGTM but didn't test it, this may need a manual QA confirmation. Thanks.

@harikrishna-patnala

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 6352

@borisstoyanov

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@borisstoyanov a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6354

@borisstoyanov

Copy link
Copy Markdown
Contributor

@blueorangutan test

@borisstoyanov borisstoyanov 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, manually tested it by dropping connection to a storage pool. Let's wait for the Marvin tests to finish

@harikrishna-patnala

Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-6908)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44119 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7689-t6908-kvm-centos7.zip
Smoke tests completed. 107 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_migrate_VM_and_root_volume Error 77.80 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 52.49 test_vm_life_cycle.py

if (storagePoolHost != null) {
_storagePoolHostDao.deleteStoragePoolHostDetails(hostId, poolId);
}

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.

@harikrishna-patnala I think, better to remove the record on host disconnect as it gets updated (with any SDC Id changes) on host re-connect. Any issue, if it is deleted from storage_pool_host_ref?

Other storage providers also remove it on disconnect, check here:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes @sureshanaparti there is some race condition issue, entry in storage_pool_host_ref is getting deleted and the new entry is not getting added during host connect. Since we are dealing with SDC ID updation and creating a new entry if does not exist during host connect, I've removed the deleting part in host disconnect.

If the entry of SDC ID is not there in storage_pool_host_ref all Powerflex operations are affected.

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.

yes @sureshanaparti there is some race condition issue, entry in storage_pool_host_ref is getting deleted and the new entry is not getting added during host connect. Since we are dealing with SDC ID updation and creating a new entry if does not exist during host connect, I've removed the deleting part in host disconnect.

If the entry of SDC ID is not there in storage_pool_host_ref all Powerflex operations are affected.

@harikrishna-patnala What is that race condition issue? It's fine if dealing with SDC ID updation on host connect. What if the host is removed, and not connected again. Check if these entries of the host are removed from storage_pool_host_ref or not. If host is connected, ensure that SDC ID is properly added/updated for that host in storage_pool_host_ref, then no Powerflex operations are affected.

@harikrishna-patnala harikrishna-patnala Jul 3, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think race condition happening in multiple management server setup. Yes all entries are getting deleting when host is removed, so upon adding it again new entries will be made. Even if SDC ID is changed which is unlikely event, even then it will be updated during host connect. @sureshanaparti

@yadvr

yadvr commented Jul 3, 2023

Copy link
Copy Markdown
Member

Intermittent failures same as #7345 merging this

@yadvr
yadvr merged commit 7082013 into apache:4.18 Jul 3, 2023
@yadvr
yadvr deleted the FixSDCidDeletionOnHostDisconnect branch July 3, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants