Skip to content
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

DFBUGS-906: Prevent dataloss due to the concurrent RPC calls (occurrence is very low) #425

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

yati1998
Copy link
Member

This PR includes series for commits for the following actions

Introduce in memory lock for NodePublish and UnPublish (we should not be dependent on the CO and make assumption that CO makes the calls serial for the same volID and the targetPath)
Use os.Remove instead of os.Removeall to remove the empty directory, os.Removeall ends up removing everything in the path

We should not be dependent on the CO to ensure
that it will serialize the request instead of
that we need to have own internal locks to ensure
that we dont do concurrent operations for same
request.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 38c0e64)
We should not be dependent on the CO to ensure
that it will serialize the request instead of
that we need to have own internal locks to ensure
that we dont do concurrent operations for same
request.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 38b0a4c)
using os.RemoveAll will remove everything
in the director after the Umount we should
be using os.Remove only to remove the empty
directory

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit ffa8eaf)
using os.RemoveAll will remove everything
in the director after the Umount we should
be using os.Remove only to remove the empty
directory

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 39cc628)
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid jira ticket of any type jira/invalid-bug Indicates that the referenced jira bug is invalid for the branch this PR is targeting labels Nov 26, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@yati1998: This pull request references [Jira Issue DFBUGS-906](https://issues.redhat.com//browse/DFBUGS-906), which is invalid:

  • expected the bug to target the "odf-4.18" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

This PR includes series for commits for the following actions

Introduce in memory lock for NodePublish and UnPublish (we should not be dependent on the CO and make assumption that CO makes the calls serial for the same volID and the targetPath)
Use os.Remove instead of os.Removeall to remove the empty directory, os.Removeall ends up removing everything in the path

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the approved Its a good idea label Nov 26, 2024
@Madhu-1
Copy link
Member

Madhu-1 commented Nov 26, 2024

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Code looks good label Nov 26, 2024
Copy link

openshift-ci bot commented Nov 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Madhu-1, yati1998

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 26, 2024

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@Madhu-1: This pull request references [Jira Issue DFBUGS-906](https://issues.redhat.com//browse/DFBUGS-906), which is invalid:

  • expected the bug to target the "odf-4.18" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@yati1998
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@yati1998: This pull request references [Jira Issue DFBUGS-906](https://issues.redhat.com//browse/DFBUGS-906), which is invalid:

  • expected the bug to target the "odf-4.18" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@yati1998
Copy link
Member Author

/jira refresh

1 similar comment
@Madhu-1
Copy link
Member

Madhu-1 commented Nov 26, 2024

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@yati1998: An error was encountered updating to the POST state for bug DFBUGS-906 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. Error marking step #34077648 finished: root cause: Tried to update an entity that does not exist.: request failed. Please analyze the request body for more details. Status code: 400:

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that the referenced jira bug is valid for the branch this PR is targeting label Nov 26, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@Madhu-1: This pull request references [Jira Issue DFBUGS-906](https://issues.redhat.com//browse/DFBUGS-906), which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (odf-4.18) matches configured target version for branch (odf-4.18)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ypersky1980

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that the referenced jira bug is invalid for the branch this PR is targeting label Nov 26, 2024
Copy link

openshift-ci bot commented Nov 26, 2024

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: ypersky1980.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@Madhu-1: This pull request references [Jira Issue DFBUGS-906](https://issues.redhat.com//browse/DFBUGS-906), which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (odf-4.18) matches configured target version for branch (odf-4.18)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ypersky1980

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 1245510 into red-hat-storage:release-4.18 Nov 26, 2024
13 checks passed
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2024

@yati1998: [Jira Issue DFBUGS-906](https://issues.redhat.com//browse/DFBUGS-906): All pull requests linked via external trackers have merged:

[Jira Issue DFBUGS-906](https://issues.redhat.com//browse/DFBUGS-906) has been moved to the MODIFIED state.

In response to this:

This PR includes series for commits for the following actions

Introduce in memory lock for NodePublish and UnPublish (we should not be dependent on the CO and make assumption that CO makes the calls serial for the same volID and the targetPath)
Use os.Remove instead of os.Removeall to remove the empty directory, os.Removeall ends up removing everything in the path

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Its a good idea jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that the referenced jira bug is valid for the branch this PR is targeting jira/valid-reference Indicates that this PR references a valid jira ticket of any type lgtm Code looks good
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants