Repository: kubernetes-sigs/gcp-filestore-csi-driver
Pull request #337 (2022-07-28 19:13:09)

Instance validation improvement when choosing eligible instances
<!--  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**:
When selecting eligible instance, we used to match instance only based on sc prefix. Such matching may lead to potential bug because we didn't consider the ip reservation, network, cmek etc. So this fix is to match instances with a more strict criteria including all potential field for a multishare filestore instance. ([design doc](https://docs.google.com/document/d/1t4M_wa4yEQGvtHInjk5ECSuukZ2a6CXhAVU_wgFymOc/edit#heading=h.uiuhxyj6a9zs))
**Which issue(s) this PR fixes**:
<!--
*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 [b/240149274](b/240149274), [b/238641345](b/238641345)

**Special notes for your reviewer**:
`reserved-ip-range` matching is skipped for now. We might need to enable it latter if transformation from ip range name to CIDR range is feasible.
**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
N/A
```


k8s-ci-robot: Hi @tyuchn. Thanks for your PR.

I'm waiting for a [kubernetes-sigs](https://github.com/orgs/kubernetes-sigs/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-sigs%2Fgcp-filestore-csi-driver).

<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: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/pull/337#" title="Author self-approved">tyuchn</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign saikat-royc for approval by writing `/assign @saikat-royc` in a comment. For more information see:[The Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

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

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

- **[OWNERS](https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/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":["saikat-royc"]} -->
leiyiz: /ok-to-test
k8s-ci-robot: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 1119d6f6c2e3d4fb089a3deecb9ea6f946980d8c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554226558397321216/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | c7f702455a24350161ac625ec6793ae009da363b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554600099487682560/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | d6bece51cd34443905c0b6ff8ea082d56d55104c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554602215606325248/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 8b379d91be78615bfd5ebd0720acb969fe34647c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554609536344526848/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | d1f822ba45c48d2f9fe4f1d5ad4205d19fff86c0 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554610694861623296/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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 -->
leiyiz: and have you manually tested your change
k8s-ci-robot: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 6aebe97893204ea6df2e784b516ee5f32f6268fb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554909554829955072/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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 -->
leiyiz: /retest
saikat-royc: looks good after comments are addressed.
k8s-ci-robot: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | a0ae0a54bf8987da6700b7a0e28eb5f6b7c37bfa | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554998216519323648/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 476cff50be662b3fc2a446fecfe3b3a3bc98fc44 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1554998979912011776/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 476cff50be662b3fc2a446fecfe3b3a3bc98fc44 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1555000547726069760/) | unknown | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 476cff50be662b3fc2a446fecfe3b3a3bc98fc44 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-e2e/1555001571270463488/) | unknown | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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 -->
leiyiz: /hold
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/pull/337#pullrequestreview-1064242454" title="Approved">leiyiz</a>*, *<a href="https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/pull/337#" title="Author self-approved">tyuchn</a>*

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

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

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

- ~~[OWNERS](https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/blob/master/OWNERS)~~ [leiyiz]

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":[]} -->
leiyiz: /lgtm cancel
leiyiz: /hold cancel
k8s-ci-robot: @tyuchn: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 994682a04a62af66dbaf85689c2e6eb1c78690f9 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/337/pull-gcp-filestore-csi-driver-kubernetes-integration/1555807276009263104/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=337). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Atyuchn). 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-sigs/gcp-filestore-csi-driver/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 -->

Patch:
diff --git a/CHANGELOG/CHANGELOG-1.3.md b/CHANGELOG/CHANGELOG-1.3.md
index 1779a6a3..6512a9f1 100644
--- a/CHANGELOG/CHANGELOG-1.3.md
+++ b/CHANGELOG/CHANGELOG-1.3.md
@@ -1,11 +1,3 @@
-# v1.3.2 - Changelog since v1.3.1
-
-## Changes by Kind
-
-### Bug or Regression
-
-- Multishare ip reservation bug fix ([#341](https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/pull/341), [@tyuchn](https://github.com/tyuchn))
-
 # v1.3.1 - Changelog since v1.3.0
 
 ### Other (Cleanup)
diff --git a/README.md b/README.md
index f0c2a559..530619d3 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ dynamically created and mounted by workloads.
 ## Project Status
 Status: GA
 
-Latest image: `k8s.gcr.io/cloud-provider-gcp/gcp-filestore-csi-driver:v1.3.2`
+Latest image: `k8s.gcr.io/cloud-provider-gcp/gcp-filestore-csi-driver:v1.3.1`
 
 Also see [known issues](KNOWN_ISSUES.md) and [CHANGELOG](CHANGELOG.md).
 
@@ -47,7 +47,6 @@ The following table captures the compatibility matrix of the core filestore driv
 | v1.2.7 (GA)                             |  yes |  yes  |
 | v1.3.0 (GA)                             |  yes |  yes  |
 | v1.3.1 (GA)                             |  yes |  yes  |
-| v1.3.2 (GA)                             |  yes |  yes  |
 | master                                  |  yes |  yes  |
 
 The manifest bundle which captures all the driver components (driver pod which includes the containers csi-external-provisioner, csi-external-resizer, csi-external-snapshotter, gcp-filestore-driver, csi-driver-registrar, csi driver object, rbacs, pod security policies etc) can be picked up from the master branch [overlays](deploy/kubernetes/overlays) directory. We structure the overlays directory per minor version of kubernetes because not all driver components can be used with all kubernetes versions. For example volume snapshots are supported 1.17+ kubernetes versions thus [stable-1-16](deploy/kubernetes/overlays/stable-1-16) driver manifests does not contain the snapshotter sidecar. Read more about overlays [here](docs/release/overlays.md).
diff --git a/deploy/kubernetes/images/prow-gke-release-staging-rc-master/image.yaml b/deploy/kubernetes/images/prow-gke-release-staging-rc-master/image.yaml
index 2027d740..175b2f2d 100644
--- a/deploy/kubernetes/images/prow-gke-release-staging-rc-master/image.yaml
+++ b/deploy/kubernetes/images/prow-gke-release-staging-rc-master/image.yaml
@@ -41,5 +41,5 @@ metadata:
 imageTag:
   name: k8s.gcr.io/cloud-provider-gcp/gcp-filestore-csi-driver
   newName: gcr.io/k8s-staging-cloud-provider-gcp/gcp-filestore-csi-driver
-  newTag: "v1.3.2-rc1"
+  newTag: "v1.3.1-rc1"
 ---
diff --git a/deploy/kubernetes/images/stable-master/image.yaml b/deploy/kubernetes/images/stable-master/image.yaml
index ee83a22c..c7f1e6ee 100644
--- a/deploy/kubernetes/images/stable-master/image.yaml
+++ b/deploy/kubernetes/images/stable-master/image.yaml
@@ -40,5 +40,5 @@ metadata:
   name: imagetag-gce-fs-driver
 imageTag:
   name: k8s.gcr.io/cloud-provider-gcp/gcp-filestore-csi-driver
-  newTag: "v1.3.2"
+  newTag: "v1.3.1"
 ---
diff --git a/pkg/cloud_provider/file/fake.go b/pkg/cloud_provider/file/fake.go
index d66aa57a..e2d1e412 100644
--- a/pkg/cloud_provider/file/fake.go
+++ b/pkg/cloud_provider/file/fake.go
@@ -295,17 +295,14 @@ func (manager *fakeServiceManager) ListMultishareInstances(ctx context.Context,
 func (manager *fakeServiceManager) StartCreateMultishareInstanceOp(ctx context.Context, obj *MultishareInstance) (*filev1beta1multishare.Operation, error) {
 	instance := &MultishareInstance{
 		Project:       defaultProject,
-		Location:      defaultRegion,
+		Location:      obj.Location,
 		Name:          obj.Name,
 		Tier:          obj.Tier,
 		CapacityBytes: obj.CapacityBytes,
-		Network: Network{
-			Name:            obj.Network.Name,
-			Ip:              obj.Network.Ip,
-			ReservedIpRange: obj.Network.ReservedIpRange,
-		},
-		Labels: obj.Labels,
-		State:  "READY",
+		Network:       obj.Network,
+		KmsKeyName:    obj.KmsKeyName,
+		Labels:        obj.Labels,
+		State:         "READY",
 	}
 	manager.createdMultishareInstance[obj.Name] = instance
 	meta := &filev1beta1multishare.OperationMetadata{
diff --git a/pkg/csi_driver/multishare_ops_manager.go b/pkg/csi_driver/multishare_ops_manager.go
index cfc6e64a..56a575c3 100644
--- a/pkg/csi_driver/multishare_ops_manager.go
+++ b/pkg/csi_driver/multishare_ops_manager.go
@@ -68,10 +68,6 @@ func (m *MultishareOpsManager) setupEligibleInstanceAndStartWorkflow(ctx context
 
 	// Check ShareCreateMap if a share create is already in progress.
 	shareName := util.ConvertVolToShareName(req.Name)
-	instanceScPrefix, err := getInstanceSCPrefix(req)
-	if err != nil {
-		return nil, nil, status.Error(codes.InvalidArgument, err.Error())
-	}
 
 	ops, err := m.listMultishareResourceRunningOps(ctx)
 	if err != nil {
@@ -103,7 +99,7 @@ func (m *MultishareOpsManager) setupEligibleInstanceAndStartWorkflow(ctx context
 	}
 
 	// No share or running share create op found. Proceed to eligible instance check.
-	eligible, numIneligible, err := m.runEligibleInstanceCheck(ctx, instanceScPrefix, ops, req)
+	eligible, numIneligible, err := m.runEligibleInstanceCheck(ctx, req, ops, instance)
 	if err != nil {
 		return nil, nil, status.Error(codes.Aborted, err.Error())
 	}
@@ -344,9 +340,9 @@ func (m *MultishareOpsManager) verifyNoRunningInstanceOrShareOpsForInstance(inst
 }
 
 // runEligibleInstanceCheck returns a list of ready and non-ready instances.
-func (m *MultishareOpsManager) runEligibleInstanceCheck(ctx context.Context, instanceScPrefix string, ops []*OpInfo, req *csi.CreateVolumeRequest) ([]*file.MultishareInstance, int, error) {
+func (m *MultishareOpsManager) runEligibleInstanceCheck(ctx context.Context, req *csi.CreateVolumeRequest, ops []*OpInfo, target *file.MultishareInstance) ([]*file.MultishareInstance, int, error) {
 	klog.Infof("ListMultishareInstances call initiated for request %+v.", req)
-	instances, err := m.listInstanceForStorageClassPrefix(ctx, instanceScPrefix)
+	instances, err := m.listMatchedInstances(ctx, req, target)
 	if err != nil {
 		return nil, 0, err
 	}
@@ -651,16 +647,69 @@ func containsOpWithInstanceTargetPrefix(instance *file.MultishareInstance, ops [
 	return nil, nil
 }
 
-func (m *MultishareOpsManager) listInstanceForStorageClassPrefix(ctx context.Context, prefix string) ([]*file.MultishareInstance, error) {
+// listMatchedInstances will list all instances in current project,
+// but only matched instances will be returned.
+func (m *MultishareOpsManager) listMatchedInstances(ctx context.Context, req *csi.CreateVolumeRequest, target *file.MultishareInstance) ([]*file.MultishareInstance, error) {
 	instances, err := m.cloud.File.ListMultishareInstances(ctx, &file.ListFilter{Project: m.cloud.Project, Location: "-"})
 	if err != nil {
 		return nil, err
 	}
 	var finalInstances []*file.MultishareInstance
 	for _, i := range instances {
-		if val, ok := i.Labels[util.ParamMultishareInstanceScLabelKey]; ok && val == prefix {
+		matched, err := isMatchedInstance(i, target, req)
+		if err != nil {
+			return nil, err
+		}
+		klog.Infof("Found source instance %+v, comparing with target instance %+v and StorageClass parameters %v, matched = %t", *i, *target, req.GetParameters(), matched)
+		if matched {
 			finalInstances = append(finalInstances, i)
 		}
 	}
 	return finalInstances, nil
 }
+
+// A source instance will be considered as "matched" with the target instance
+// if and only if the following requirements were met:
+// 1. Both source and target instance should have a label with key
+//    "storage_gke_io_storage-class-id", and the value should be the same.
+// 2. (Check if exists) The ip address of the target instance should be
+//    within the ip range specified in "reserved-ipv4-cidr".
+// 3. (Check if exists) The ip address of the target instance should be
+//    within the ip range specified in "reserved-ip-range".
+// 4. Both source and target instance should be in the same location.
+// 5. Both source and target instance should be under the same tier.
+// 6. Both source and target instance should be in the same VPC network.
+// 7, Both source and target instance should have the same connect mode.
+// 8. Both source and target instance should have the same KmsKeyName.
+func isMatchedInstance(source, target *file.MultishareInstance, req *csi.CreateVolumeRequest) (bool, error) {
+	if scPrefixSource, ok := source.Labels[util.ParamMultishareInstanceScLabelKey]; ok {
+		if _, ok := target.Labels[util.ParamMultishareInstanceScLabelKey]; !ok {
+			return false, fmt.Errorf("label %q missing in target instance %+v", util.ParamMultishareInstanceScLabelKey, target)
+		}
+		if scPrefixSource != target.Labels[util.ParamMultishareInstanceScLabelKey] {
+			return false, nil
+		}
+	} else {
+		return false, nil
+	}
+	params := req.GetParameters()
+	if instanceCIDR, ok := params[paramReservedIPV4CIDR]; ok {
+		withinRange, err := IsIpWithinRange(source.Network.Ip, instanceCIDR)
+		if err != nil {
+			return false, err
+		}
+		if !withinRange {
+			return false, nil
+		}
+	}
+	// Skip validation for parameter "reserved-ip-range" since it requires
+	// extra compute api auth and not clear if it's required.
+	if strings.EqualFold(source.Location, target.Location) &&
+		strings.EqualFold(source.Tier, target.Tier) &&
+		strings.EqualFold(source.Network.Name, target.Network.Name) &&
+		strings.EqualFold(source.Network.ConnectMode, target.Network.ConnectMode) &&
+		strings.EqualFold(source.KmsKeyName, target.KmsKeyName) {
+		return true, nil
+	}
+	return false, nil
+}
diff --git a/pkg/csi_driver/utils.go b/pkg/csi_driver/utils.go
index 68f06bc2..b2108c8d 100644
--- a/pkg/csi_driver/utils.go
+++ b/pkg/csi_driver/utils.go
@@ -17,6 +17,9 @@ limitations under the License.
 package driver
 
 import (
+	"fmt"
+	"net"
+
 	csi "github.com/container-storage-interface/spec/lib/go/csi"
 	"github.com/golang/glog"
 	pbSanitizer "github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
@@ -59,3 +62,12 @@ func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, h
 	}
 	return resp, err
 }
+
+// IsIpWithinRange checks if an ip address is within the given ip range.
+func IsIpWithinRange(ipAddress, ipRange string) (bool, error) {
+	_, ipnet, err := net.ParseCIDR(ipRange)
+	if err != nil {
+		return false, fmt.Errorf("failed to parse cidr range %s: %v", ipRange, err)
+	}
+	return ipnet.Contains(net.ParseIP(ipAddress)), nil
+}


Test patch:
diff --git a/pkg/csi_driver/multishare_controller_test.go b/pkg/csi_driver/multishare_controller_test.go
index 661fc608..a7fa773a 100644
--- a/pkg/csi_driver/multishare_controller_test.go
+++ b/pkg/csi_driver/multishare_controller_test.go
@@ -761,9 +761,11 @@ func TestMultishareCreateVolume(t *testing.T) {
 						util.ParamMultishareInstanceScLabelKey: testInstanceScPrefix,
 					},
 					CapacityBytes: 1 * util.Tb,
-					Tier:          "Enterprise",
+					Tier:          "enterprise",
 					Network: file.Network{
-						Ip: testIP,
+						Ip:          testIP,
+						Name:        defaultNetwork,
+						ConnectMode: directPeering,
 					},
 					State: "READY",
 				},
@@ -775,9 +777,11 @@ func TestMultishareCreateVolume(t *testing.T) {
 						util.ParamMultishareInstanceScLabelKey: testInstanceScPrefix,
 					},
 					CapacityBytes: 1 * util.Tb,
-					Tier:          "Enterprise",
+					Tier:          "enterprise",
 					Network: file.Network{
-						Ip: testIP,
+						Ip:          testIP,
+						Name:        defaultNetwork,
+						ConnectMode: directPeering,
 					},
 					State: "READY",
 				},
@@ -796,6 +800,7 @@ func TestMultishareCreateVolume(t *testing.T) {
 				},
 				Parameters: map[string]string{
 					paramMultishareInstanceScLabel: testInstanceScPrefix,
+					paramTier:                      "enterprise",
 				},
 				VolumeCapabilities: []*csi.VolumeCapability{
 					{
diff --git a/pkg/csi_driver/multishare_ops_manager_test.go b/pkg/csi_driver/multishare_ops_manager_test.go
index 1cb0207f..f90a7075 100644
--- a/pkg/csi_driver/multishare_ops_manager_test.go
+++ b/pkg/csi_driver/multishare_ops_manager_test.go
@@ -449,7 +449,7 @@ func TestInstanceNeedsExpand(t *testing.T) {
 	}
 }
 
-func TestListInstanceForStorageClassPrefix(t *testing.T) {
+func TestListMatchedInstances(t *testing.T) {
 	found := func(inputList []*file.MultishareInstance, i *file.MultishareInstance) bool {
 		for _, f := range inputList {
 			if f.Project == i.Project && f.Location == i.Location && f.Name == i.Name {
@@ -462,16 +462,42 @@ func TestListInstanceForStorageClassPrefix(t *testing.T) {
 	tests := []struct {
 		name             string
 		initInstanceList []*file.MultishareInstance
-		prefix           string
 		expectedList     []*file.MultishareInstance
+		req              *csi.CreateVolumeRequest
+		target           *file.MultishareInstance
+		expectError      bool
 	}{
 		{
-			name:   "empty init inistance list",
-			prefix: "testprefix",
+			name: "empty init inistance list",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 		},
 		{
-			name:   "non-empty init inistance list",
-			prefix: "testprefix",
+			name: "non-empty init inistance list",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstanceList: []*file.MultishareInstance{
 				{
 					Name:     "test-instance",
@@ -494,8 +520,20 @@ func TestListInstanceForStorageClassPrefix(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-empty init inistance list, 1 instance match",
-			prefix: "testprefix-1",
+			name: "non-empty init inistance list, 1 instance match",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix-1",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix-1",
+				},
+			},
 			initInstanceList: []*file.MultishareInstance{
 				{
 					Name:     "test-instance-1",
@@ -526,8 +564,20 @@ func TestListInstanceForStorageClassPrefix(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-empty init inistance list, 2 instances match",
-			prefix: "testprefix",
+			name: "non-empty init inistance list, 2 instances match",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstanceList: []*file.MultishareInstance{
 				{
 					Name:     "test-instance-1",
@@ -573,6 +623,260 @@ func TestListInstanceForStorageClassPrefix(t *testing.T) {
 				},
 			},
 		},
+		{
+			name: "non-specified sc prefix in init instance list",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
+			initInstanceList: []*file.MultishareInstance{
+				{
+					Name:     "test-instance",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels:   map[string]string{},
+				},
+			},
+		},
+		{
+			name: "1 ip address within, 1 out of reserved-ipv4-cidr",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+					paramReservedIPV4CIDR:          "10.0.0.0/24",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+				Network: file.Network{
+					ReservedIpRange: "10.0.0.0/24",
+				},
+			},
+			initInstanceList: []*file.MultishareInstance{
+				{
+					Name:     "test-instance-0",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/21",
+						Ip:              "10.0.0.1",
+					},
+				},
+				{
+					Name:     "test-instance-1",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "11.0.0.0/24",
+						Ip:              "11.0.0.1",
+					},
+				},
+			},
+			expectedList: []*file.MultishareInstance{
+				{
+					Name:     "test-instance-0",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/24",
+						Ip:              "10.0.0.1",
+					},
+				},
+			},
+		},
+		{
+			name: "location, tier, network, connect-mode and cmek alignment test",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+					paramReservedIPV4CIDR:          "10.0.0.0/24",
+					paramTier:                      "enterprise",
+					paramNetwork:                   "shared-network",
+					paramInstanceEncryptionKmsKey:  "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+				Network: file.Network{
+					ReservedIpRange: "10.0.0.0/24",
+					ConnectMode:     directPeering,
+					Name:            "shared-network",
+				},
+				Tier:       "enterprise",
+				KmsKeyName: "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key",
+			},
+			initInstanceList: []*file.MultishareInstance{
+				{
+					Name:     "test-instance-0",
+					Project:  "test-project",
+					Location: "us-west1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/24",
+						ConnectMode:     directPeering,
+						Name:            "shared-network",
+						Ip:              "10.0.0.2",
+					},
+					Tier:       "enterprise",
+					KmsKeyName: "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key",
+				},
+				{
+					Name:     "test-instance-1",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/24",
+						ConnectMode:     directPeering,
+						Name:            "shared-network",
+						Ip:              "10.0.0.2",
+					},
+					Tier:       "standard",
+					KmsKeyName: "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key",
+				},
+				{
+					Name:     "test-instance-2",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/24",
+						ConnectMode:     directPeering,
+						Name:            "default",
+						Ip:              "10.0.0.2",
+					},
+					Tier:       "enterprise",
+					KmsKeyName: "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key",
+				},
+				{
+					Name:     "test-instance-3",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/24",
+						ConnectMode:     directPeering,
+						Name:            "shared-network",
+						Ip:              "10.0.0.2",
+					},
+					Tier:       "enterprise",
+					KmsKeyName: "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key-1",
+				},
+				{
+					Name:     "test-instance-4",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/24",
+						ConnectMode:     directPeering,
+						Name:            "shared-network",
+						Ip:              "10.0.0.2",
+					},
+					Tier: "enterprise",
+				},
+				{
+					Name:     "test-instance-5",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/21",
+						ConnectMode:     directPeering,
+						Name:            "shared-network",
+						Ip:              "10.0.0.2",
+					},
+					Tier:       "enterprise",
+					KmsKeyName: "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key",
+				},
+			},
+			expectedList: []*file.MultishareInstance{
+				{
+					Name:     "test-instance-5",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+					Network: file.Network{
+						ReservedIpRange: "10.0.0.0/21",
+						ConnectMode:     directPeering,
+						Name:            "shared-network",
+						Ip:              "10.0.0.2",
+					},
+					Tier:       "enterprise",
+					KmsKeyName: "projects/test-project/locations/us-central1/keyRings/test-cmek-key-ring/cryptoKeys/test-cmek-key",
+				},
+			},
+		},
+		{
+			name: "invalid reserved-ipv4-cidr",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+					paramReservedIPV4CIDR:          "test-ip-range",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
+			initInstanceList: []*file.MultishareInstance{
+				{
+					Name:     "test-instance",
+					Project:  "test-project",
+					Location: "us-central1",
+					Labels: map[string]string{
+						util.ParamMultishareInstanceScLabelKey: "testprefix",
+					},
+				},
+			},
+			expectError: true,
+		},
 	}
 	for _, tc := range tests {
 		t.Run(tc.name, func(t *testing.T) {
@@ -586,7 +890,13 @@ func TestListInstanceForStorageClassPrefix(t *testing.T) {
 			}
 
 			manager := NewMultishareOpsManager(cloudProvider)
-			filteredList, err := manager.listInstanceForStorageClassPrefix(context.Background(), tc.prefix)
+			filteredList, err := manager.listMatchedInstances(context.Background(), tc.req, tc.target)
+			if tc.expectError && err == nil {
+				t.Errorf("expected error: %v", err)
+			}
+			if !tc.expectError && err != nil {
+				t.Errorf("unexpectded error: %v", err)
+			}
 			for _, fi := range filteredList {
 				if !found(tc.expectedList, fi) {
 					t.Errorf("Failed to find instance")
@@ -1198,20 +1508,32 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 	}
 	tests := []struct {
 		name                  string
-		prefix                string
 		ops                   []*OpInfo
 		initInstances         []*file.MultishareInstance
 		initShares            []*file.Share
 		expectedNonReadyCount int
 		expectedReadyInstance []*file.MultishareInstance
 		req                   *csi.CreateVolumeRequest
+		target                *file.MultishareInstance
 	}{
 		{
 			name: "no instances",
 		},
 		{
-			name:   "all ready instances",
-			prefix: "testprefix",
+			name: "all ready instances",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "test-instance-1",
@@ -1254,8 +1576,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-ready instances (instance update)",
-			prefix: "testprefix",
+			name: "non-ready instances (instance update)",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1277,8 +1611,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-ready instances (share create)",
-			prefix: "testprefix",
+			name: "non-ready instances (share create)",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1300,8 +1646,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-ready instances (share update)",
-			prefix: "testprefix",
+			name: "non-ready instances (share update)",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1323,8 +1681,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-ready instances (share delete)",
-			prefix: "testprefix",
+			name: "non-ready instances (share delete)",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1346,8 +1716,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-ready instances 0, instance delete not counted as ready",
-			prefix: "testprefix",
+			name: "non-ready instances 0, instance delete not counted as ready",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1368,8 +1750,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "non-ready instances (share delete), ready instance",
-			prefix: "testprefix",
+			name: "non-ready instances (share delete), ready instance",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1411,8 +1805,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "no ready instance, no non-ready instance, instance with 10 shares not eligible",
-			prefix: "testprefix",
+			name: "no ready instance, no non-ready instance, instance with 10 shares not eligible",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1538,8 +1944,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "ready instance, non-ready instances, other instance state not count",
-			prefix: "testprefix",
+			name: "ready instance, non-ready instances, other instance state not count",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1617,8 +2035,20 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			},
 		},
 		{
-			name:   "creating instance count as non-ready",
-			prefix: "testprefix",
+			name: "creating instance count as non-ready",
+			req: &csi.CreateVolumeRequest{
+				Parameters: map[string]string{
+					paramMultishareInstanceScLabel: "testprefix",
+				},
+			},
+			target: &file.MultishareInstance{
+				Name:     "test-target-instance",
+				Project:  "test-project",
+				Location: "us-central1",
+				Labels: map[string]string{
+					util.ParamMultishareInstanceScLabelKey: "testprefix",
+				},
+			},
 			initInstances: []*file.MultishareInstance{
 				{
 					Name:     "instance-1",
@@ -1658,7 +2088,7 @@ func TestRunEligibleInstanceCheck(t *testing.T) {
 			cloudProvider, err := cloud.NewFakeCloud()
 			cloudProvider.File = s
 			manager := NewMultishareOpsManager(cloudProvider)
-			ready, nonReady, err := manager.runEligibleInstanceCheck(context.Background(), tc.prefix, tc.ops, tc.req)
+			ready, nonReady, err := manager.runEligibleInstanceCheck(context.Background(), tc.req, tc.ops, tc.target)
 			if err != nil {
 				t.Errorf("unexpected error")
 			}
diff --git a/test/remote/instance.go b/test/remote/instance.go
index 4f973c74..aa040160 100644
--- a/test/remote/instance.go
+++ b/test/remote/instance.go
@@ -84,7 +84,7 @@ func (i *InstanceInfo) CreateOrGetInstance(serviceAccount string) error {
 		return fmt.Errorf("Failed to create firewall rule: %v", err)
 	}
 
-	imageURL := "projects/debian-cloud/global/images/family/debian-9"
+	imageURL := "projects/debian-cloud/global/images/family/debian-11"
 	inst := &compute.Instance{
 		Name:        i.name,
 		MachineType: machineType(i.zone, ""),