You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "rp- (via GitHub)" <gi...@apache.org> on 2024/02/05 10:03:52 UTC
[PR] Linstor fix migration while node offline [cloudstack]
rp- opened a new pull request, #8610:
URL: https://github.com/apache/cloudstack/pull/8610
### Description
If a Linstor node is down while migrating resource, allow-two-primaries
setting will fail because we can't reach the downed node. But it will
still set the property on the other nodes and migration should work.
We now just report an error instead of completely failing.
This PR also containes a cherry-picked commit from the main branch f176e7d122be0a9fa448dea547aa2d2e0e867352
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] 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
- [x] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
Nested Linstor cluster with a non hyperconverged setup and a node evicted.
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610#issuecomment-1926836062
> Commit: [1f6954c](https://github.com/apache/cloudstack/commit/1f6954c7cc5955c21de3c09131991554e5772fc5) should also be applied to 4.19 and main But I can make a separate PR for that?
Entire PR changes can be forward merged to 4.19 / main. I think, merge excludes other changes if there are already in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610#issuecomment-1929098834
@DaanHoogland a [SL] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610#issuecomment-1934706722
Merged based on smoketests. All changes in Linstor plugin.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610#discussion_r1478085188
##########
plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java:
##########
@@ -353,19 +361,21 @@ public boolean disconnectPhysicalDiskByPath(String localPath)
ApiCallRcList answers = api.resourceDefinitionModify(rsc.get().getName(), rdm);
if (answers.hasError())
{
- s_logger.error("Failed to remove 'allow-two-primaries' on " + rsc.get().getName());
- throw new CloudRuntimeException(answers.get(0).getMessage());
+ s_logger.error(
+ String.format("Failed to remove 'allow-two-primaries' on %s: %s",
+ rsc.get().getName(), LinstorUtil.getBestErrorMessage(answers)));
+ // do not fail here as removing allow-two-primaries property isn't fatal
}
return true;
}
s_logger.warn("Linstor: Couldn't find resource for this path: " + localPath);
} catch (ApiException apiEx) {
- s_logger.error(apiEx);
- throw new CloudRuntimeException(apiEx.getBestMessage(), apiEx);
+ s_logger.error(apiEx.getBestMessage());
+ // do not fail here as removing allow-two-primaries property isn't fatal
}
}
- return false;
Review Comment:
@rp- any case returns false (on error / exception above ?)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "rp- (via GitHub)" <gi...@apache.org>.
rp- commented on PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610#issuecomment-1926621404
Commit: 1f6954c7cc5955c21de3c09131991554e5772fc5 should also be applied to 4.19 and main
But I can make a separate PR for that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud merged PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "rp- (via GitHub)" <gi...@apache.org>.
rp- commented on code in PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610#discussion_r1478091192
##########
plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java:
##########
@@ -353,19 +361,21 @@ public boolean disconnectPhysicalDiskByPath(String localPath)
ApiCallRcList answers = api.resourceDefinitionModify(rsc.get().getName(), rdm);
if (answers.hasError())
{
- s_logger.error("Failed to remove 'allow-two-primaries' on " + rsc.get().getName());
- throw new CloudRuntimeException(answers.get(0).getMessage());
+ s_logger.error(
+ String.format("Failed to remove 'allow-two-primaries' on %s: %s",
+ rsc.get().getName(), LinstorUtil.getBestErrorMessage(answers)));
+ // do not fail here as removing allow-two-primaries property isn't fatal
}
return true;
}
s_logger.warn("Linstor: Couldn't find resource for this path: " + localPath);
} catch (ApiException apiEx) {
- s_logger.error(apiEx);
- throw new CloudRuntimeException(apiEx.getBestMessage(), apiEx);
+ s_logger.error(apiEx.getBestMessage());
+ // do not fail here as removing allow-two-primaries property isn't fatal
}
}
- return false;
Review Comment:
AFAIS every upper caller is ignoring the return value anyway
But we don't need to do any disconnect, it is just a bit of a tidy up to remove the property and nothing fatal if it fails.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Linstor fix migration while node offline [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #8610:
URL: https://github.com/apache/cloudstack/pull/8610#issuecomment-1929096625
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org