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

perf(fuse): add/remove "used-by-pod" annotations on fuse pod when publishing/unpublishing #954

Closed
wants to merge 7 commits into from

Conversation

AlbeeSo
Copy link
Member

@AlbeeSo AlbeeSo commented Jan 16, 2024

What type of PR is this?

What this PR does / why we need it:

add/remove annotations like used-by-pod/09ec7b80-71d1-4fe9-8fa1-ea234563b05a: "20240116195325" on fuse pod when publishing/unpublishing, to help users understand the mapping between application pods and fuse pods

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 16, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AlbeeSo
Once this PR has been reviewed and has the lgtm label, please assign mowangdk for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

@huww98 huww98 left a comment

Choose a reason for hiding this comment

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

I would recommend csi.alibabacloud.com/used-by-pod/namespace/pod-name as annotation name.

pkg/oss/utils.go Show resolved Hide resolved
pkg/mounter/fuse_containerized_mounter.go Outdated Show resolved Hide resolved
@AlbeeSo AlbeeSo requested a review from huww98 January 18, 2024 08:41
@huww98
Copy link
Contributor

huww98 commented Jan 18, 2024

This annotation should always have the same result as kubectl describe pvc xxx now, right?

But if this is combined with #957 , consider:

  1. Pod "a" start, fuse pod "fuse-a" start with used-by-pod/a
  2. fuse pod "fuse-a" fail
  3. Pod "b" start, fuse pod "fuse-b" start with used-by-pod/b
  4. Pod "b" finished, then "fuse-b" is left with no used-by-pod

This seems OK.

@AlbeeSo
Copy link
Member Author

AlbeeSo commented Jan 18, 2024

This annotation should always have the same result as kubectl describe pvc xxx now, right?

But if this is combined with #957 , consider:

  1. Pod "a" start, fuse pod "fuse-a" start with used-by-pod/a
  2. fuse pod "fuse-a" fail
  3. Pod "b" start, fuse pod "fuse-b" start with used-by-pod/b
  4. Pod "b" finished, then "fuse-b" is left with no used-by-pod

This seems OK.

here is a small demo for fuse pod crash case:

  1. create an app pod with oss pv, with a fuse pod csi.alibabacloud.com/used-by-pod-5c7af695-e754-4b5b-9f08-609a76f6eac2: "2024-01-18T20:45:02+08:00"
  2. fuse pod crash by killing fuse daemon
  3. create another app pod, fuse restart with annotation csi.alibabacloud.com/used-by-pod-c0e4839c-8f73-41de-99ad-e998cddbdaba: "2024-01-18T21:01:09+08:00"
  4. pod 5c7af695-e754-4b5b-9f08-609a76f6eac2 need to restart even it is on pvc's used-by list.

@huww98
Copy link
Contributor

huww98 commented Jan 19, 2024

I still have concerns about using UID in the user interface.

How about:

  • label: csi.alibabacloud.com/namespace: "<namespace of pvc/pod>"
  • annotation: csi.alibabacloud.com/used-by-pod: "<pod-name1>,<pod-name2>"

I know this is harder to implement, as we need to pull the old annotation to add new pod. But it may be more friendly to users.

csi.alibabacloud.com/used-by-pod-<pod name> have issue about the length limit on annotation name

@AlbeeSo
Copy link
Member Author

AlbeeSo commented Jan 25, 2024

I still have concerns about using UID in the user interface.

How about:

  • label: csi.alibabacloud.com/namespace: "<namespace of pvc/pod>"
  • annotation: csi.alibabacloud.com/used-by-pod: ","

I know this is harder to implement, as we need to pull the old annotation to add new pod. But it may be more friendly to users.

csi.alibabacloud.com/used-by-pod-<pod name> have issue about the length limit on annotation name

the point is we cannot get the pod name on unpublish stage unless we record it.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 7, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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/test-infra repository.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 5, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 5, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants