-
Notifications
You must be signed in to change notification settings - Fork 21
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
Bugfix/link volume to volume #324
Conversation
@@ -382,6 +382,7 @@ func (revProxy *StandAloneProxy) GetRouter() http.Handler { | |||
router.PathPrefix(utils.Prefix + "/{version}/system/symmetrix/{symid}").HandlerFunc(revProxy.ServeReverseProxy) | |||
router.PathPrefix(utils.Prefix + "/{version}/sloprovisioning/symmetrix/{symid}").HandlerFunc(revProxy.ServeReverseProxy) | |||
router.PathPrefix(utils.PrivatePrefix + "/{version}/replication/symmetrix/{symid}").HandlerFunc(revProxy.ServeReverseProxy) | |||
router.PathPrefix(utils.PrivatePrefix + "/{version}/sloprovisioning/symmetrix/{symid}").HandlerFunc(revProxy.ServeReverseProxy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a missing private handler for sloprovisioning and our request was dropped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to indicate that all requests using that API will get dropped. Was this the original problem? Any idea why it took this long to be found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we did the testing, we saw a 404 error because we used a private prefix for the request but there was no appropriate handler. @delldubey Could you provide more details for this Handler?
@@ -470,7 +471,11 @@ func (s *service) LinkVolumeToVolume(ctx context.Context, symID string, vol *typ | |||
// Link the Target to the created snapshot | |||
err = s.LinkVolumeToSnapshot(ctx, symID, vol.VolumeID, tgtDevID, snapID, reqID, isCopy, pmaxClient) | |||
if err != nil { | |||
return err | |||
if strings.Contains(err.Error(), errDesiredState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to return an error message if the error message contains "already in the desired state or mode" which is part of idempotency step
@@ -1093,6 +1093,18 @@ func (f *feature) iCallLinkVolumeToSnapshot() error { | |||
return nil | |||
} | |||
|
|||
func (f *feature) iCallLinkVolumeToSnapshotAgain() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between iCallLinkVolumeToSnapshotAgain() and iCallLinkVolumeToSnapshot() is that we do not add a prefix to req. name to simulate slow Unisphere and test the idempotency step
@@ -1106,6 +1118,18 @@ func (f *feature) iCallLinkVolumeToVolume() error { | |||
return nil | |||
} | |||
|
|||
func (f *feature) iCallLinkVolumeToVolumeAgain() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between iCallLinkVolumeToVolumeAgain() andiCallLinkVolumeToVolume() is that we do not add a prefix to req. name to simulate slow Unisphere and test the idempotency step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…si-powermax into bugfix/LinkVolumeToVolume
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add idempotency check and private handler for slow provisioning
Description
Issue: When a bootable source volume is cloned, the cloned (target) volume is seen to be empty, so the resulting VM cannot boot.
Cause: The array's delayed response to the REST API request causes the initial clone workflow to fail. The retry process does not adequately check if the target volume has been properly created and linked to the snapshot. This leads to an empty volume being created
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Unit test results:
standaloneproxy results:
unit-test:
godog result:
Int test results:
ok command-line-arguments 86.931s coverage: 11.0% of statements in ../../service