Repository: kubernetes-csi/external-provisioner
Pull request #560 (2021-02-05 12:23:59)

feat: Add migrated label to metrics
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md
3. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

**What type of PR is this?**
> Uncomment only one ` /kind <>` line, hit enter to put that in a new line, and remove leading whitespaces from that line:
>
> /kind api-change
> /kind bug
> /kind cleanup
> /kind design
> /kind documentation
> /kind failing-test

/kind feature
> /kind flake

**What this PR does / why we need it**:
This PR is an extension to https://github.com/kubernetes-csi/csi-lib-utils/pull/77 to send "migrated" label in the metrics

**Which issue(s) this PR fixes**:
Partially Addressed # kubernetes/kubernetes#98279
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
Set the value of "migrated" field in the metrics to true or false to indicate if the call is a migration enabled feature or not
```


k8s-ci-robot: @nearora-msft: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our [release note process](https://git.k8s.io/community/contributors/guide/release-notes.md) to remove it.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
k8s-ci-robot: Hi @nearora-msft. Thanks for your PR.

I'm waiting for a [kubernetes-csi](https://github.com/orgs/kubernetes-csi/people) member to verify that this patch is reasonable to test. If it is, they should reply with `/ok-to-test` on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should [join the org](https://git.k8s.io/community/community-membership.md#member) to skip this step.

Once the patch is verified, the new status will be reflected by the `ok-to-test` label.

I understand the commands that are listed [here](https://go.k8s.io/bot-commands?repo=kubernetes-csi%2Fexternal-provisioner).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>

k8s-ci-robot: Welcome @nearora-msft! <br><br>It looks like this is your first PR to <a href='https://github.com/kubernetes-csi/external-provisioner'>kubernetes-csi/external-provisioner</a> 🎉. Please refer to our [pull request process documentation](https://git.k8s.io/community/contributors/guide/pull-requests.md) to help your PR have a smooth ride to approval. <br><br>You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. [Here is the bot commands documentation](https://go.k8s.io/bot-commands). <br><br>You can also check if kubernetes-csi/external-provisioner has [its own contribution guidelines](https://github.com/kubernetes-csi/external-provisioner/tree/master/CONTRIBUTING.md). <br><br>You may want to refer to our [testing guide](https://git.k8s.io/community/contributors/devel/sig-testing/testing.md) if you run into trouble with your tests not passing. <br><br>If you are having difficulty getting your pull request seen, please follow the [recommended escalation practices](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#why-is-my-pull-request-not-getting-reviewed). Also, for tips and tricks in the contribution process you may want to read the [Kubernetes contributor cheat sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet/README.md). We want to make sure your contribution gets all the attention it needs! <br><br>Thank you, and welcome to Kubernetes. :smiley:
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-csi/external-provisioner/pull/560#" title="Author self-approved">nearora-msft</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **jsafrane** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @jsafrane` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-csi%2Fexternal-provisioner).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-csi/external-provisioner/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["jsafrane"]} -->
Jiawei0227: /assign
Jiawei0227: Hey Neha, thanks a lot for your contribution!
/cc @msau42 
/ok-to-test

I had some comments. I am wondering can you also help to verify the change locally? You can 
```
make container
```
to build a local container and push it to dockerhub or wherever you are comfortable with. And then deploy it with a CSI driver into your cluster. Then if you trigger some operation like create volume, it should be able to generate some metrics. You can login to the node that deployed this node and do a `curl localhost:22021/metrics` to check the results. Let me know if you encounter any issues. If you dont know how to do that I am happy to test it as well once you addressed the comments.
Jiawei0227: And can you also add a release-note for this?
k8s-ci-robot: @nearora-msft: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-unit | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358696683931701248) | `/test pull-kubernetes-csi-external-provisioner-unit`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @nearora-msft: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-unit | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358696683931701248) | `/test pull-kubernetes-csi-external-provisioner-unit`
pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18/1358696683805872128) | `/test pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @nearora-msft: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-unit | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358696683931701248) | `/test pull-kubernetes-csi-external-provisioner-unit`
pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18/1358696683805872128) | `/test pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1358696683860398080) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @nearora-msft: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-unit | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358696683931701248) | `/test pull-kubernetes-csi-external-provisioner-unit`
pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18/1358696683805872128) | `/test pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1358696683860398080) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1358696683889758208) | `/test pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @nearora-msft: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18/1358696683805872128) | `/test pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1358696683860398080) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1358696683889758208) | `/test pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-unit | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358739580722876416) | `/test pull-kubernetes-csi-external-provisioner-unit`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @nearora-msft: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1358696683860398080) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1358696683889758208) | `/test pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-unit | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358739580722876416) | `/test pull-kubernetes-csi-external-provisioner-unit`
pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18 | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18/1358739580500578304) | `/test pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @nearora-msft: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | fe4da47fa41c6861b79fdb4fc2d94a169ecade20 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1358696683889758208) | `/test pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-unit | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358739580722876416) | `/test pull-kubernetes-csi-external-provisioner-unit`
pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18 | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18/1358739580500578304) | `/test pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1358739580571881472) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @nearora-msft: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-unit | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-unit/1358739580722876416) | `/test pull-kubernetes-csi-external-provisioner-unit`
pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18 | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18/1358739580500578304) | `/test pull-kubernetes-csi-external-provisioner-1-18-on-kubernetes-1-18`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1358739580571881472) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | 373c012ea94b45471dd2a41f623d0e94da64ea6d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/560/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1358739580643184640) | `/test pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=560). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Anearora-msft). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-csi/external-provisioner/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
nearora-msft: > curl localhost:22021/metrics

Tested it with the azuredisk csi driver and I see these metrics in the node. The metrics are published with the migrated label indeed.

csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="5"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="10"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="15"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="25"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="50"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="120"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="300"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="600"} 24
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="+Inf"} 24
csi_sidecar_operations_seconds_sum{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false"} 1.9117699509999997
csi_sidecar_operations_seconds_count{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false"} 24
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="0.1"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="0.25"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="0.5"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="1"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="2.5"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="5"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="10"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="15"} 1
csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="25"} 1

nearora-msft: > > curl localhost:22021/metrics
> 
> Tested it with the azuredisk csi driver and I see these metrics in the node. The metrics are published with the migrated label indeed.
> 
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="5"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="10"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="15"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="25"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="50"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="120"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="300"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="600"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false",le="+Inf"} 24
> csi_sidecar_operations_seconds_sum{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false"} 1.9117699509999997
> csi_sidecar_operations_seconds_count{driver_name="disk.csi.azure.com",grpc_status_code="Unknown",method_name="/csi.v1.Controller/DeleteVolume",migrated="false"} 24
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="0.1"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="0.25"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="0.5"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="1"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="2.5"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="5"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="10"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="15"} 1
> csi_sidecar_operations_seconds_bucket{driver_name="unknown-driver",grpc_status_code="OK",method_name="/csi.v1.Identity/GetPluginInfo",migrated="false",le="25"} 1

Adding metrics for CreateVolume too:
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="0.1"} 0
100csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="0.25"} 0
 16511   csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="0.5"} 0
 0 1651csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="1"} 0
1 csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="2.5"} 0
   0  csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="5"} 1
   0  2995k   csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="10"} 1
   0 --:csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="15"} 1
--:-- --:--:csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="25"} 1
-- --:--:-csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="50"} 1
- 3224kcsi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="120"} 1

csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="300"} 1
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="600"} 1
csi_sidecar_operations_seconds_bucket{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false",le="+Inf"} 1
csi_sidecar_operations_seconds_sum{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false"} 2.690683139
csi_sidecar_operations_seconds_count{driver_name="disk.csi.azure.com",grpc_status_code="OK",method_name="/csi.v1.Controller/CreateVolume",migrated="false"} 1
Jiawei0227: /lgtm
Thanks for your contribution! I tested it locally and it works well for migration cases. 

/assign @msau42 @pohly 
I will let Patrick and Michelle to take a second look and approve.
k8s-ci-robot: New changes are detected. LGTM label has been removed.
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-csi/external-provisioner/pull/560#" title="Author self-approved">nearora-msft</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **msau42** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @msau42` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-csi%2Fexternal-provisioner).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-csi/external-provisioner/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["msau42"]} -->
k8s-ci-robot: New changes are detected. LGTM label has been removed.

Patch:
diff --git a/cmd/csi-provisioner/csi-provisioner.go b/cmd/csi-provisioner/csi-provisioner.go
index 18ddc97cc..b7cbab5d0 100644
--- a/cmd/csi-provisioner/csi-provisioner.go
+++ b/cmd/csi-provisioner/csi-provisioner.go
@@ -201,6 +201,32 @@ func main() {
 	}
 	klog.V(2).Infof("Detected CSI driver %s", provisionerName)
 
+	translator := csitrans.New()
+	supportsMigrationFromInTreePluginName := ""
+	if translator.IsMigratedCSIDriverByName(provisionerName) {
+		supportsMigrationFromInTreePluginName, err = translator.GetInTreeNameFromCSIName(provisionerName)
+		if err != nil {
+			klog.Fatalf("Failed to get InTree plugin name for migrated CSI plugin %s: %v", provisionerName, err)
+		}
+		klog.V(2).Infof("Supports migration from in-tree plugin: %s", supportsMigrationFromInTreePluginName)
+
+		// Create a new connection with the metrics manager with migrated label
+		metricsManager = metrics.NewCSIMetricsManagerWithOptions(provisionerName, metrics.WithMigration())
+		migratedGrpcClient, err := ctrl.Connect(*csiEndpoint, metricsManager)
+		if err != nil {
+			klog.Error(err.Error())
+			os.Exit(1)
+		}
+		grpcClient.Close()
+		grpcClient = migratedGrpcClient
+
+		err = ctrl.Probe(grpcClient, *operationTimeout)
+		if err != nil {
+			klog.Error(err.Error())
+			os.Exit(1)
+		}
+	}
+
 	// Prepare http endpoint for metrics + leader election healthz
 	mux := http.NewServeMux()
 	if addr != "" {
@@ -326,15 +352,7 @@ func main() {
 		controller.NodesLister(nodeLister),
 	}
 
-	translator := csitrans.New()
-
-	supportsMigrationFromInTreePluginName := ""
-	if translator.IsMigratedCSIDriverByName(provisionerName) {
-		supportsMigrationFromInTreePluginName, err = translator.GetInTreeNameFromCSIName(provisionerName)
-		if err != nil {
-			klog.Fatalf("Failed to get InTree plugin name for migrated CSI plugin %s: %v", provisionerName, err)
-		}
-		klog.V(2).Infof("Supports migration from in-tree plugin: %s", supportsMigrationFromInTreePluginName)
+	if supportsMigrationFromInTreePluginName != "" {
 		provisionerOptions = append(provisionerOptions, controller.AdditionalProvisionerNames([]string{supportsMigrationFromInTreePluginName}))
 	}
 
diff --git a/go.mod b/go.mod
index 744c42019..dd86f2856 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@ require (
 	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/googleapis/gnostic v0.5.3 // indirect
 	github.com/imdario/mergo v0.3.11 // indirect
-	github.com/kubernetes-csi/csi-lib-utils v0.9.0
+	github.com/kubernetes-csi/csi-lib-utils v0.9.1
 	github.com/kubernetes-csi/csi-test/v4 v4.0.2
 	github.com/kubernetes-csi/external-snapshotter/client/v3 v3.0.0
 	github.com/miekg/dns v1.1.35 // indirect
@@ -36,7 +36,7 @@ require (
 	k8s.io/klog/v2 v2.4.0
 	k8s.io/kubernetes v1.20.0
 	sigs.k8s.io/controller-runtime v0.7.0
-	sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.3.0
+	sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.2.0
 )
 
 replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.20.0
diff --git a/go.sum b/go.sum
index fadee0f3f..b4c55b5d8 100644
--- a/go.sum
+++ b/go.sum
@@ -470,8 +470,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
 github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/kubernetes-csi/csi-lib-utils v0.9.0 h1:TbuDmxoVqM+fvVkzG/7sShyX/8jUln0ElLHuETcsQJI=
-github.com/kubernetes-csi/csi-lib-utils v0.9.0/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M=
+github.com/kubernetes-csi/csi-lib-utils v0.9.1 h1:sGq6ifVujfMSkfTsMZip44Ttv8SDXvsBlFk9GdYl/b8=
+github.com/kubernetes-csi/csi-lib-utils v0.9.1/go.mod h1:8E2jVUX9j3QgspwHXa6LwyN7IHQDjW9jX3kwoWnSC+M=
 github.com/kubernetes-csi/csi-test/v4 v4.0.2 h1:MNj94SFHOGK6lOy+yDgxI+zlFWaPcgByqBH3JZZGyZI=
 github.com/kubernetes-csi/csi-test/v4 v4.0.2/go.mod h1:z3FYigjLFAuzmFzKdHQr8gUPm5Xr4Du2twKcxfys0eI=
 github.com/kubernetes-csi/external-snapshotter/client/v3 v3.0.0 h1:OYDCOjVcx/5wNzlZ/At8otRibUlw0T6R0xOD31f32bw=
@@ -1287,8 +1287,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyz
 sigs.k8s.io/controller-runtime v0.7.0 h1:bU20IBBEPccWz5+zXpLnpVsgBYxqclaHu1pVDl/gEt8=
 sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU=
 sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
-sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.3.0 h1:IKsKAnscMyIOqyl8s8V7guTcx0QBEa6OT57EPgAgpmM=
-sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.3.0/go.mod h1:DhZ52sQMJHW21+JXyA2LRUPRIxKnrNrwh+QFV+2tVA4=
+sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.2.0 h1:W9pg6FBDxI8A/G0FbDjwKXvIG7ZDfyQODtoGzHFxa60=
+sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.2.0/go.mod h1:DhZ52sQMJHW21+JXyA2LRUPRIxKnrNrwh+QFV+2tVA4=
 sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8=
 sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
 sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go
index 200f30c53..479d337c7 100644
--- a/pkg/controller/controller.go
+++ b/pkg/controller/controller.go
@@ -21,6 +21,7 @@ import (
 	"errors"
 	"fmt"
 	"os"
+	"strconv"
 	"strings"
 	"time"
 
@@ -726,7 +727,8 @@ func (p *csiProvisioner) Provision(ctx context.Context, options controller.Provi
 	pvName := req.Name
 	provisionerCredentials := req.Secrets
 
-	createCtx, cancel := context.WithTimeout(ctx, p.timeout)
+	createCtx := markAsMigrated(ctx, result.migratedVolume)
+	createCtx, cancel := context.WithTimeout(createCtx, p.timeout)
 	defer cancel()
 	klog.V(5).Infof("CreateVolumeRequest %+v", req)
 	rep, err := p.csiClient.CreateVolume(createCtx, req)
@@ -1097,11 +1099,13 @@ func (p *csiProvisioner) Delete(ctx context.Context, volume *v1.PersistentVolume
 	}
 
 	var err error
+	var migratedVolume bool
 	if p.translator.IsPVMigratable(volume) {
 		// we end up here only if CSI migration is enabled in-tree (both overall
 		// and for the specific plugin that is migratable) causing in-tree PV
 		// controller to yield deletion of PVs with in-tree source to external provisioner
 		// based on AnnDynamicallyProvisioned annotation.
+		migratedVolume = true
 		volume, err = p.translator.TranslateInTreePVToCSI(volume)
 		if err != nil {
 			return err
@@ -1162,7 +1166,8 @@ func (p *csiProvisioner) Delete(ctx context.Context, volume *v1.PersistentVolume
 			klog.Warningf("failed to get storageclass: %s, proceeding to delete without secrets. %v", storageClassName, err)
 		}
 	}
-	deleteCtx, cancel := context.WithTimeout(ctx, p.timeout)
+	deleteCtx := markAsMigrated(ctx, migratedVolume)
+	deleteCtx, cancel := context.WithTimeout(deleteCtx, p.timeout)
 	defer cancel()
 
 	if err := p.canDeleteVolume(volume); err != nil {
@@ -1714,3 +1719,7 @@ func checkFinalizer(obj metav1.Object, finalizer string) bool {
 	}
 	return false
 }
+
+func markAsMigrated(parent context.Context, hasMigrated bool) context.Context {
+	return context.WithValue(parent, connection.AdditionalInfoKey, connection.AdditionalInfo{Migrated: strconv.FormatBool(hasMigrated)})
+}
diff --git a/vendor/github.com/kubernetes-csi/csi-lib-utils/connection/connection.go b/vendor/github.com/kubernetes-csi/csi-lib-utils/connection/connection.go
index ac07d59be..fbd8d37b5 100644
--- a/vendor/github.com/kubernetes-csi/csi-lib-utils/connection/connection.go
+++ b/vendor/github.com/kubernetes-csi/csi-lib-utils/connection/connection.go
@@ -150,7 +150,7 @@ func connect(
 		return nil, errors.New("OnConnectionLoss callback only supported for unix:// addresses")
 	}
 
-	klog.Infof("Connecting to %s", address)
+	klog.V(5).Infof("Connecting to %s", address)
 
 	// Connect in background.
 	var conn *grpc.ClientConn
@@ -191,6 +191,13 @@ type ExtendedCSIMetricsManager struct {
 	metrics.CSIMetricsManager
 }
 
+type AdditionalInfo struct {
+	Migrated string
+}
+type AdditionalInfoKeyType struct{}
+
+var AdditionalInfoKey AdditionalInfoKeyType
+
 // RecordMetricsClientInterceptor is a gPRC unary interceptor for recording metrics for CSI operations
 // in a gRPC client.
 func (cmm ExtendedCSIMetricsManager) RecordMetricsClientInterceptor(
@@ -203,11 +210,35 @@ func (cmm ExtendedCSIMetricsManager) RecordMetricsClientInterceptor(
 	start := time.Now()
 	err := invoker(ctx, method, req, reply, cc, opts...)
 	duration := time.Since(start)
-	cmm.RecordMetrics(
+
+	var cmmBase metrics.CSIMetricsManager
+	cmmBase = cmm
+	if cmm.HaveAdditionalLabel(metrics.LabelMigrated) {
+		// record migration status
+		additionalInfo := ctx.Value(AdditionalInfoKey)
+		migrated := "false"
+		if additionalInfo != nil {
+			additionalInfoVal, ok := additionalInfo.(AdditionalInfo)
+			if !ok {
+				klog.Errorf("Failed to record migrated status, cannot convert additional info %v", additionalInfo)
+				return err
+			}
+			migrated = additionalInfoVal.Migrated
+		}
+		cmmv, metricsErr := cmm.WithLabelValues(map[string]string{metrics.LabelMigrated: migrated})
+		if metricsErr != nil {
+			klog.Errorf("Failed to record migrated status, error: %v", metricsErr)
+		} else {
+			cmmBase = cmmv
+		}
+	}
+	// Record the default metric
+	cmmBase.RecordMetrics(
 		method,   /* operationName */
 		err,      /* operationErr */
 		duration, /* operationDuration */
 	)
+
 	return err
 }
 
diff --git a/vendor/github.com/kubernetes-csi/csi-lib-utils/metrics/metrics.go b/vendor/github.com/kubernetes-csi/csi-lib-utils/metrics/metrics.go
index 495e1ff85..3baab8ca7 100644
--- a/vendor/github.com/kubernetes-csi/csi-lib-utils/metrics/metrics.go
+++ b/vendor/github.com/kubernetes-csi/csi-lib-utils/metrics/metrics.go
@@ -47,6 +47,9 @@ const (
 	labelGrpcStatusCode   = "grpc_status_code"
 	unknownCSIDriverName  = "unknown-driver"
 
+	// LabelMigrated is the Label that indicate whether this is a CSI migration operation
+	LabelMigrated = "migrated"
+
 	// CSI Operation Latency with status code total - Histogram Metric
 	operationsLatencyMetricName = "operations_seconds"
 	operationsLatencyHelp       = "Container Storage Interface operation duration with gRPC error code status total"
@@ -83,6 +86,10 @@ type CSIMetricsManager interface {
 	// and then accumulates values.
 	WithLabelValues(labels map[string]string) (CSIMetricsManager, error)
 
+	// HaveAdditionalLabel can be used to check if the additional label
+	// value is defined in the metrics manager
+	HaveAdditionalLabel(name string) bool
+
 	// SetDriverName is called to update the CSI driver name. This should be done
 	// as soon as possible, otherwise metrics recorded by this manager will be
 	// recorded with an "unknown-driver" driver_name.
@@ -149,6 +156,13 @@ func WithLabels(labels map[string]string) MetricsManagerOption {
 	}
 }
 
+// WithMigration adds the migrated field to the current metrics label
+func WithMigration() MetricsManagerOption {
+	return func(cmm *csiMetricsManager) {
+		cmm.additionalLabelNames = append(cmm.additionalLabelNames, LabelMigrated)
+	}
+}
+
 // WithProcessStartTime controlls whether process_start_time_seconds is registered
 // in the registry of the metrics manager. It's enabled by default out of convenience
 // (no need to do anything special in most sidecars) but should be disabled in more
@@ -316,7 +330,7 @@ func (cmmv *csiMetricsManagerWithValues) WithLabelValues(labels map[string]strin
 	}
 	// Now add all new values.
 	for name, value := range labels {
-		if !extended.haveAdditionalLabel(name) {
+		if !extended.HaveAdditionalLabel(name) {
 			return nil, fmt.Errorf("label %q was not defined via WithLabelNames", name)
 		}
 		if v, ok := extended.additionalValues[name]; ok {
@@ -327,7 +341,7 @@ func (cmmv *csiMetricsManagerWithValues) WithLabelValues(labels map[string]strin
 	return extended, nil
 }
 
-func (cmm *csiMetricsManager) haveAdditionalLabel(name string) bool {
+func (cmm *csiMetricsManager) HaveAdditionalLabel(name string) bool {
 	for _, n := range cmm.additionalLabelNames {
 		if n == name {
 			return true
diff --git a/vendor/modules.txt b/vendor/modules.txt
index ab1ea6645..355d53087 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -57,7 +57,7 @@ github.com/hashicorp/golang-lru/simplelru
 github.com/imdario/mergo
 # github.com/json-iterator/go v1.1.10
 github.com/json-iterator/go
-# github.com/kubernetes-csi/csi-lib-utils v0.9.0
+# github.com/kubernetes-csi/csi-lib-utils v0.9.1
 ## explicit
 github.com/kubernetes-csi/csi-lib-utils/connection
 github.com/kubernetes-csi/csi-lib-utils/leaderelection
@@ -600,7 +600,7 @@ sigs.k8s.io/controller-runtime/pkg/client
 sigs.k8s.io/controller-runtime/pkg/client/apiutil
 sigs.k8s.io/controller-runtime/pkg/client/fake
 sigs.k8s.io/controller-runtime/pkg/internal/objectutil
-# sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.3.0
+# sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.2.0
 ## explicit
 sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller
 sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller/metrics
diff --git a/vendor/sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller/controller.go b/vendor/sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller/controller.go
index 229f3ba21..f68730291 100644
--- a/vendor/sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller/controller.go
+++ b/vendor/sigs.k8s.io/sig-storage-lib-external-provisioner/v6/controller/controller.go
@@ -710,16 +710,13 @@ func NewProvisionController(
 		controller.claimInformer = informer.Core().V1().PersistentVolumeClaims().Informer()
 		controller.claimInformer.AddEventHandler(claimHandler)
 	}
-	err = controller.claimInformer.AddIndexers(cache.Indexers{uidIndex: func(obj interface{}) ([]string, error) {
+	controller.claimInformer.AddIndexers(cache.Indexers{uidIndex: func(obj interface{}) ([]string, error) {
 		uid, err := getObjectUID(obj)
 		if err != nil {
 			return nil, err
 		}
 		return []string{uid}, nil
 	}})
-	if err != nil {
-		klog.Fatalf("Error setting indexer %s for pvc informer: %v", uidIndex, err)
-	}
 	controller.claimsIndexer = controller.claimInformer.GetIndexer()
 
 	// -----------------
@@ -801,7 +798,9 @@ func (ctrl *ProvisionController) enqueueClaim(obj interface{}) {
 		utilruntime.HandleError(err)
 		return
 	}
-	ctrl.claimQueue.Add(uid)
+	if ctrl.claimQueue.NumRequeues(uid) == 0 {
+		ctrl.claimQueue.Add(uid)
+	}
 }
 
 // enqueueVolume takes an obj and converts it into a namespace/name string which
@@ -813,7 +812,11 @@ func (ctrl *ProvisionController) enqueueVolume(obj interface{}) {
 		utilruntime.HandleError(err)
 		return
 	}
-	ctrl.volumeQueue.Add(key)
+	// Re-Adding is harmless but try to add it to the queue only if it is not
+	// already there, because if it is already there we *must* be retrying it
+	if ctrl.volumeQueue.NumRequeues(key) == 0 {
+		ctrl.volumeQueue.Add(key)
+	}
 }
 
 // forgetVolume Forgets an obj from the given work queue, telling the queue to


Test patch:
diff --git a/pkg/controller/controller_test.go b/pkg/controller/controller_test.go
index e5805dc09..8304625f9 100644
--- a/pkg/controller/controller_test.go
+++ b/pkg/controller/controller_test.go
@@ -4394,6 +4394,23 @@ func TestDeleteMigration(t *testing.T) {
 	}
 }
 
+func TestMarkAsMigrated(t *testing.T) {
+	t.Run("context has the migrated label for the migratable plugins", func(t *testing.T) {
+		ctx := context.Background()
+		migratedCtx := markAsMigrated(ctx, true)
+		additionalInfo := migratedCtx.Value(connection.AdditionalInfoKey)
+		if additionalInfo == nil {
+			t.Errorf("test: %s, no migrated label found in the context", t.Name())
+		}
+		additionalInfoVal := additionalInfo.(connection.AdditionalInfo)
+		migrated := additionalInfoVal.Migrated
+
+		if migrated != "true" {
+			t.Errorf("test: %s, expected: %v, got: %v", t.Name(), "true", migrated)
+		}
+	})
+}
+
 func createFakeCSIPV(volumeHandle string) *v1.PersistentVolume {
 	return &v1.PersistentVolume{
 		Spec: v1.PersistentVolumeSpec{