Repository: kubernetes-csi/external-provisioner
Pull request #469 (2020-08-21 13:07:26)

Set READONLY flag in CSI PV based on PVC accessmode
Refer: https://github.com/kubernetes/kubernetes/issues/70505


```release-note
The provisioner sidecar now has an argument called `controller-publish-readonly`
which set the value of CSI PV spec `readonly` field value based on the PVC access mode. 

If this flag has been set to `true` and pvc access mode carry only `ROX` access mode,
the controller automatically set PersistentVolume.spec.CSIPersistentVolumeSource.readOnly
field  to `true`.
```
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



humblec: /assign @xing-yang 
humblec: @msau42 @xing-yang @saad-ali @jsafrane ptal :+1: 
xing-yang: @humblec In the proposal described in kubernetes/kubernetes#70505, there is also the following.  I don't see that is addressed by this PR?
```
Add new csiControllerPublishVolumeReadOnly StorageClass parameter to CSI external-provisioner
```
humblec: > @humblec In the proposal described in [kubernetes/kubernetes#70505](https://github.com/kubernetes/kubernetes/issues/70505), there is also the following. I don't see that is addressed by this PR?
> 
> ```
> Add new csiControllerPublishVolumeReadOnly StorageClass parameter to CSI external-provisioner
> ```

@xing-yang I was in an impression that, the SC param is an optional one. Or is it mandatory that, we will expose the SC param too ? 
xing-yang: >> @humblec In the proposal described in kubernetes/kubernetes#70505, there is also the following. I don't see that is addressed by this PR?

>>> Add new csiControllerPublishVolumeReadOnly StorageClass parameter to CSI external-provisioner

> @xing-yang I was in an impression that, the SC param is an optional one. Or is it mandatory that, we will expose the SC param too ?

@humblec based on  kubernetes/kubernetes#70505, "Add new csiControllerPublishVolumeReadOnly StorageClass parameter to CSI external-provisioner" should be addressed as well.  

@saad-ali can you chime in as you wrote the original proposal.
humblec: > > > @humblec In the proposal described in [kubernetes/kubernetes#70505](https://github.com/kubernetes/kubernetes/issues/70505), there is also the following. I don't see that is addressed by this PR?
> 
> > > > Add new csiControllerPublishVolumeReadOnly StorageClass parameter to CSI external-provisioner
> 
> > @xing-yang I was in an impression that, the SC param is an optional one. Or is it mandatory that, we will expose the SC param too ?
> 
> @humblec based on [kubernetes/kubernetes#70505](https://github.com/kubernetes/kubernetes/issues/70505), "Add new csiControllerPublishVolumeReadOnly StorageClass parameter to CSI external-provisioner" should be addressed as well.
> 

Somehow I was in an impression that its  either 1 or 2 in that proposal  :), so I was trying clarify. I will wait for @saad-ali thought to double confirm.  

> @saad-ali can you chime in as you wrote the original proposal.


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/469#" title="Author self-approved">humblec</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"]} -->
humblec: While we wait confirmation, I have added an extra commit for SC param. Please take a look at it and share your thoughts @xing-yang 
k8s-ci-robot: @humblec: The following test **failed**, say `/retest` to rerun all failed tests:

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

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=469). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahumblec). 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 -->
saad-ali: This looks good to me. It uses the PVC access mode to auto set the value of `PV.spec.CSIPersistentVolumeSource.readOnly` which is always left `false` today. And it provides a StorageClass parameter to override the automation if desired.

/lgtm
/approve

Adding a hold to give others an opportunity to review.

/hold
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-csi/external-provisioner/pull/469#" title="Author self-approved">humblec</a>*, *<a href="https://github.com/kubernetes-csi/external-provisioner/pull/469#issuecomment-726587624" title="Approved">saad-ali</a>*

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

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-csi/external-provisioner/blob/master/OWNERS)~~ [saad-ali]

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":[]} -->
k8s-ci-robot: @humblec: PR needs rebase.

<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>
verult: /assign
k8s-ci-robot: @humblec: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=469). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahumblec). 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: @humblec: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21/1397209286437769216) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=469). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahumblec). 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 -->
humblec: Summary of the great discussions so far :)

- [ ] Unlike the initial solution we planned in the referred issue, ie `a new flag in SC`, the consensus here is to place `this new readonly option as a 'driver' arg/param` and give control to SP driver/vendor to set it.

- [ ]  There is a concern about how to be give the  platform  for `unclean` journal correction scenario in certain cases if SP publish the volume as `RO`, a couple of thoughts here is that, regardless of what is marked in PV source, SP driver can do 'RW' or 'RO' at publish/stage.  But its good to have some documentation added  to the CSI spec around the PUBLISH_READONLY controller capability. Drivers that assert that capability will need to be prepared to mount unmodifiable volumes on the nodes, which means understanding how to deal with unclean journals of each of the fstypes that your driver support.

Additional thoughts:

CSI spec so far have below 'READ_ONLY' specific capabilities available, however it is not yet used in provisioner sidecar, so the decision to mark `readonly` can skip these capabilities check for now, and just rely on the `arg/param` value of the driver discussed above. Please let me know if I failed to conclude here.
 
```
      // Can only be published once as readonly on a single node, at
      // any given time.
      SINGLE_NODE_READER_ONLY = 2;

      // Can be published as readonly at multiple nodes simultaneously.
      MULTI_NODE_READER_ONLY = 3;
```

 @msau42 @xing-yang @jsafrane @bswartz @pohly @gnufied please let me know if I missed any other suggestion so far. 
humblec: @verult as you are busy with other stuffs, with your permission, I am taking this PR  back :+1: 
k8s-ci-robot: New changes are detected. LGTM label has been removed.
k8s-ci-robot: @humblec: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21/1397209286437769216) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21`
pull-kubernetes-csi-external-provisioner-unit | 754885ea608f909c8dd6d767d11b9171da172119 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-unit/1414954294104297472) | `/test pull-kubernetes-csi-external-provisioner-unit`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-csi&repo=external-provisioner&pr=469). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahumblec). 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 -->
humblec: [Changes in the last refresh compared to previous version]
- [x] new flag has been introduced in the provisioner sidecar
- [x] Removed SC param setting which was the initial POC based on the reference issue
- [x] Test cases have been added for provisioner sidecar flag to be `true` and `false` against MULTI_NODE_MULTI_READER capability

PTAL.. Thanks :+1:   

k8s-ci-robot: @humblec: PR needs rebase.

<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: @humblec: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21/1423593985007423488) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21`

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

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21/1423593985007423488) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1423593984801902592) | `/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=469). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahumblec). 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: @humblec: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21/1423593985007423488) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1423593984801902592) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1423593984848039936) | `/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=469). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahumblec). 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: @humblec: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21/1423593985007423488) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1423593984801902592) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1423593984848039936) | `/test pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21/1423593984898371584) | `/test pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21`

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

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20 | 0f8990744f98032d8f6fd1ded18dea17e88fc96b | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20/1397191443302322176) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21/1423593985007423488) | `/test pull-kubernetes-csi-external-provisioner-distributed-on-kubernetes-1-21`
pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19/1423593984801902592) | `/test pull-kubernetes-csi-external-provisioner-1-19-on-kubernetes-1-19`
pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20/1423593984848039936) | `/test pull-kubernetes-csi-external-provisioner-1-20-on-kubernetes-1-20`
pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21 | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21/1423593984898371584) | `/test pull-kubernetes-csi-external-provisioner-1-21-on-kubernetes-1-21`
pull-kubernetes-csi-external-provisioner-unit | ad43b5d76300b3ba0c8a74fff9605fb7e384f285 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-csi_external-provisioner/469/pull-kubernetes-csi-external-provisioner-unit/1423593984952897536) | `/test pull-kubernetes-csi-external-provisioner-unit`

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

Patch:
diff --git a/README.md b/README.md
index 563d40ad6..f1f1838b0 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,7 @@ Note that the external-provisioner does not scale with more replicas. Only one e
 
 * `--extra-create-metadata`: Enables the injection of extra PVC and PV metadata as parameters when calling `CreateVolume` on the driver (keys: "csi.storage.k8s.io/pvc/name", "csi.storage.k8s.io/pvc/namespace", "csi.storage.k8s.io/pv/name")
 
+* `controller-publish-readonly`: This option enables PV to be marked as readonly at controller publish volume call if PVC accessmode has been set to ROX. Defaults to `false`.
 ##### Storage capacity arguments
 
 See the [storage capacity section](#capacity-support) below for details.
diff --git a/cmd/csi-provisioner/csi-provisioner.go b/cmd/csi-provisioner/csi-provisioner.go
index 37b42897b..41dc14280 100644
--- a/cmd/csi-provisioner/csi-provisioner.go
+++ b/cmd/csi-provisioner/csi-provisioner.go
@@ -103,17 +103,13 @@ var (
 	nodeDeploymentImmediateBinding = flag.Bool("node-deployment-immediate-binding", true, "Determines whether immediate binding is supported when deployed on each node.")
 	nodeDeploymentBaseDelay        = flag.Duration("node-deployment-base-delay", 20*time.Second, "Determines how long the external-provisioner sleeps initially before trying to own a PVC with immediate binding.")
 	nodeDeploymentMaxDelay         = flag.Duration("node-deployment-max-delay", 60*time.Second, "Determines how long the external-provisioner sleeps at most before trying to own a PVC with immediate binding.")
+	controllerPublishReadOnly      = flag.Bool("controller-publish-readonly", false, "This option enables PV to be marked as readonly at controller publish volume call if PVC accessmode has been set to ROX.")
 
 	featureGates        map[string]bool
 	provisionController *controller.ProvisionController
 	version             = "unknown"
 )
 
-type leaderElection interface {
-	Run() error
-	WithNamespace(namespace string)
-}
-
 func main() {
 	var config *rest.Config
 	var err error
@@ -392,6 +388,7 @@ func main() {
 		*extraCreateMetadata,
 		*defaultFSType,
 		nodeDeployment,
+		*controllerPublishReadOnly,
 	)
 
 	var capacityController *capacity.Controller
diff --git a/pkg/controller/clone_controller.go b/pkg/controller/clone_controller.go
index 417e6b11e..1968f3c1b 100644
--- a/pkg/controller/clone_controller.go
+++ b/pkg/controller/clone_controller.go
@@ -79,6 +79,8 @@ func (p *CloningProtectionController) Run(ctx context.Context, threadiness int)
 		}, time.Second, ctx.Done())
 	}
 
+	go p.claimInformer.Run(ctx.Done())
+
 	klog.Infof("Started CloningProtection controller")
 	<-ctx.Done()
 	klog.Info("Shutting down CloningProtection controller")
diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go
index 360e3ba23..268fd16ea 100644
--- a/pkg/controller/controller.go
+++ b/pkg/controller/controller.go
@@ -259,6 +259,7 @@ type csiProvisioner struct {
 	extraCreateMetadata                   bool
 	eventRecorder                         record.EventRecorder
 	nodeDeployment                        *internalNodeDeployment
+	controllerPublishReadOnly             bool
 }
 
 var _ controller.Provisioner = &csiProvisioner{}
@@ -337,6 +338,7 @@ func NewCSIProvisioner(client kubernetes.Interface,
 	extraCreateMetadata bool,
 	defaultFSType string,
 	nodeDeployment *NodeDeployment,
+	controllerPublishReadOnly bool,
 ) controller.Provisioner {
 	broadcaster := record.NewBroadcaster()
 	broadcaster.StartLogging(klog.Infof)
@@ -369,6 +371,7 @@ func NewCSIProvisioner(client kubernetes.Interface,
 		vaLister:                              vaLister,
 		extraCreateMetadata:                   extraCreateMetadata,
 		eventRecorder:                         eventRecorder,
+		controllerPublishReadOnly:             controllerPublishReadOnly,
 	}
 	if nodeDeployment != nil {
 		provisioner.nodeDeployment = &internalNodeDeployment{
@@ -810,9 +813,17 @@ func (p *csiProvisioner) Provision(ctx context.Context, options controller.Provi
 			return nil, controller.ProvisioningInBackground, sourceErr
 		}
 	}
+	pvReadOnly := false
+	volCaps := req.GetVolumeCapabilities()
+	// if the request only has one accessmode and if its ROX, set readonly to true
+	// TODO: check for the driver capability of MULTI_NODE_READER_ONLY capability from the CSI driver
+	if len(volCaps) == 1 && volCaps[0].GetAccessMode().GetMode() == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY && p.controllerPublishReadOnly {
+		pvReadOnly = true
+	}
 
 	result.csiPVSource.VolumeHandle = p.volumeIdToHandle(rep.Volume.VolumeId)
 	result.csiPVSource.VolumeAttributes = volumeAttributes
+	result.csiPVSource.ReadOnly = pvReadOnly
 	pv := &v1.PersistentVolume{
 		ObjectMeta: metav1.ObjectMeta{
 			Name: pvName,


Test patch:
diff --git a/pkg/controller/controller_test.go b/pkg/controller/controller_test.go
index e1631e057..363eb2d2e 100644
--- a/pkg/controller/controller_test.go
+++ b/pkg/controller/controller_test.go
@@ -417,7 +417,7 @@ func TestCreateDriverReturnsInvalidCapacityDuringProvision(t *testing.T) {
 
 	pluginCaps, controllerCaps := provisionCapabilities()
 	csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test",
-		5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, nil, nil, false, defaultfsType, nil)
+		5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, nil, nil, false, defaultfsType, nil, true)
 
 	// Requested PVC with requestedBytes storage
 	deletePolicy := v1.PersistentVolumeReclaimDelete
@@ -835,6 +835,7 @@ type provisioningTestcase struct {
 	expectSelectedNode            string // a specific selected-node of the PVC in the apiserver after the test, same as before if empty
 	expectNoProvision             bool   // if true, then ShouldProvision should return false
 	supportsSingleNodeMultiWriter bool   // if true, then provision with single node multi writer capabilities
+	controllerPublishReadOnly     bool
 }
 
 type provisioningFSTypeTestcase struct {
@@ -1216,7 +1217,7 @@ func provisionTestcases() (int64, map[string]provisioningTestcase) {
 			},
 			expectState: controller.ProvisioningFinished,
 		},
-		"provision with access mode multi node multi readonly": {
+		"provision with access mode multi node multi readonly with sidecar arg false": {
 			volOpts: controller.ProvisionOptions{
 				StorageClass: &storagev1.StorageClass{
 					ReclaimPolicy: &deletePolicy,
@@ -1239,6 +1240,7 @@ func provisionTestcases() (int64, map[string]provisioningTestcase) {
 					},
 				},
 			},
+			controllerPublishReadOnly: false,
 			expectedPVSpec: &pvSpec{
 				Name:          "test-testi",
 				ReclaimPolicy: v1.PersistentVolumeReclaimDelete,
@@ -1250,6 +1252,61 @@ func provisionTestcases() (int64, map[string]provisioningTestcase) {
 					Driver:       "test-driver",
 					VolumeHandle: "test-volume-id",
 					FSType:       "ext4",
+					ReadOnly:     false,
+					VolumeAttributes: map[string]string{
+						"storage.kubernetes.io/csiProvisionerIdentity": "test-provisioner",
+					},
+				},
+			},
+			expectCreateVolDo: func(t *testing.T, ctx context.Context, req *csi.CreateVolumeRequest) {
+				if len(req.GetVolumeCapabilities()) != 1 {
+					t.Errorf("Incorrect length in volume capabilities")
+				}
+				if req.GetVolumeCapabilities()[0].GetAccessMode() == nil {
+					t.Errorf("Expected access mode to be set")
+				}
+				if req.GetVolumeCapabilities()[0].GetAccessMode().GetMode() != csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY {
+					t.Errorf("Expected multi_node_reader_only")
+				}
+			},
+			expectState: controller.ProvisioningFinished,
+		},
+		"provision with access mode multi node multi readonly with sidecar arg true": {
+			volOpts: controller.ProvisionOptions{
+				StorageClass: &storagev1.StorageClass{
+					ReclaimPolicy: &deletePolicy,
+					Parameters:    map[string]string{},
+				},
+				PVName: "test-name",
+				PVC: &v1.PersistentVolumeClaim{
+					ObjectMeta: metav1.ObjectMeta{
+						UID:         "testid",
+						Annotations: driverNameAnnotation,
+					},
+					Spec: v1.PersistentVolumeClaimSpec{
+						Selector: nil,
+						Resources: v1.ResourceRequirements{
+							Requests: v1.ResourceList{
+								v1.ResourceName(v1.ResourceStorage): resource.MustParse(strconv.FormatInt(requestedBytes, 10)),
+							},
+						},
+						AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadOnlyMany},
+					},
+				},
+			},
+			controllerPublishReadOnly: true,
+			expectedPVSpec: &pvSpec{
+				Name:          "test-testi",
+				ReclaimPolicy: v1.PersistentVolumeReclaimDelete,
+				AccessModes:   []v1.PersistentVolumeAccessMode{v1.ReadOnlyMany},
+				Capacity: v1.ResourceList{
+					v1.ResourceName(v1.ResourceStorage): bytesToQuantity(requestedBytes),
+				},
+				CSIPVS: &v1.CSIPersistentVolumeSource{
+					Driver:       "test-driver",
+					VolumeHandle: "test-volume-id",
+					FSType:       "ext4",
+					ReadOnly:     true,
 					VolumeAttributes: map[string]string{
 						"storage.kubernetes.io/csiProvisionerIdentity": "test-provisioner",
 					},
@@ -2244,7 +2301,7 @@ func runFSTypeProvisionTest(t *testing.T, k string, tc provisioningFSTypeTestcas
 		myDefaultfsType = ""
 	}
 	csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5, csiConn.conn,
-		nil, provisionDriverName, pluginCaps, controllerCaps, supportsMigrationFromInTreePluginName, false, true, csitrans.New(), nil, nil, nil, nil, nil, false, myDefaultfsType, nil)
+		nil, provisionDriverName, pluginCaps, controllerCaps, supportsMigrationFromInTreePluginName, false, true, csitrans.New(), nil, nil, nil, nil, nil, false, myDefaultfsType, nil, false)
 	out := &csi.CreateVolumeResponse{
 		Volume: &csi.Volume{
 			CapacityBytes: requestedBytes,
@@ -2422,9 +2479,9 @@ func runProvisionTest(t *testing.T, tc provisioningTestcase, requestedBytes int6
 	} else {
 		pluginCaps, controllerCaps = provisionCapabilities()
 	}
-
+	mycontrollerPublishReadOnly := tc.controllerPublishReadOnly
 	csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5, csiConn.conn,
-		nil, provisionDriverName, pluginCaps, controllerCaps, supportsMigrationFromInTreePluginName, false, true, csitrans.New(), scInformer.Lister(), csiNodeInformer.Lister(), nodeInformer.Lister(), nil, nil, tc.withExtraMetadata, defaultfsType, nodeDeployment)
+		nil, provisionDriverName, pluginCaps, controllerCaps, supportsMigrationFromInTreePluginName, false, true, csitrans.New(), scInformer.Lister(), csiNodeInformer.Lister(), nodeInformer.Lister(), nil, nil, tc.withExtraMetadata, defaultfsType, nodeDeployment, mycontrollerPublishReadOnly)
 
 	// Adding objects to the informer ensures that they are consistent with
 	// the fake storage without having to start the informers.
@@ -3167,7 +3224,7 @@ func TestProvisionFromSnapshot(t *testing.T) {
 
 		pluginCaps, controllerCaps := provisionFromSnapshotCapabilities()
 		csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5, csiConn.conn,
-			client, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, nil, nil, false, defaultfsType, nil)
+			client, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, nil, nil, false, defaultfsType, nil, true)
 
 		out := &csi.CreateVolumeResponse{
 			Volume: &csi.Volume{
@@ -3347,7 +3404,7 @@ func TestProvisionWithTopologyEnabled(t *testing.T) {
 			defer close(stopChan)
 
 			csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5,
-				csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), scLister, csiNodeLister, nodeLister, claimLister, vaLister, false, defaultfsType, nil)
+				csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), scLister, csiNodeLister, nodeLister, claimLister, vaLister, false, defaultfsType, nil, true)
 
 			pv, _, err := csiProvisioner.Provision(context.Background(), controller.ProvisionOptions{
 				StorageClass: &storagev1.StorageClass{},
@@ -3441,7 +3498,7 @@ func TestProvisionErrorHandling(t *testing.T) {
 					defer close(stopChan)
 
 					csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5,
-						csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), scLister, csiNodeLister, nodeLister, claimLister, vaLister, false, defaultfsType, nil)
+						csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), scLister, csiNodeLister, nodeLister, claimLister, vaLister, false, defaultfsType, nil, true)
 
 					options := controller.ProvisionOptions{
 						StorageClass: &storagev1.StorageClass{},
@@ -3514,7 +3571,7 @@ func TestProvisionWithTopologyDisabled(t *testing.T) {
 	clientSet := fakeclientset.NewSimpleClientset()
 	pluginCaps, controllerCaps := provisionWithTopologyCapabilities()
 	csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5,
-		csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, nil, nil, false, defaultfsType, nil)
+		csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, nil, nil, false, defaultfsType, nil, true)
 
 	out := &csi.CreateVolumeResponse{
 		Volume: &csi.Volume{
@@ -3962,7 +4019,7 @@ func runDeleteTest(t *testing.T, k string, tc deleteTestcase) {
 	pluginCaps, controllerCaps := provisionCapabilities()
 	scLister, _, _, _, vaLister, _ := listers(clientSet)
 	csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5,
-		csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), scLister, nil, nil, nil, vaLister, false, defaultfsType, nodeDeployment)
+		csiConn.conn, nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), scLister, nil, nil, nil, vaLister, false, defaultfsType, nodeDeployment, true)
 
 	err = csiProvisioner.Delete(context.Background(), tc.persistentVolume)
 	if tc.expectErr && err == nil {
@@ -4383,7 +4440,7 @@ func TestProvisionFromPVC(t *testing.T) {
 
 			// Phase: execute the test
 			csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner", "test", 5, csiConn.conn,
-				nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, claimLister, nil, false, defaultfsType, nil)
+				nil, driverName, pluginCaps, controllerCaps, "", false, true, csitrans.New(), nil, nil, nil, claimLister, nil, false, defaultfsType, nil, true)
 
 			pv, _, err = csiProvisioner.Provision(context.Background(), tc.volOpts)
 			if tc.expectErr && err == nil {
@@ -4501,7 +4558,7 @@ func TestProvisionWithMigration(t *testing.T) {
 			pluginCaps, controllerCaps := provisionCapabilities()
 			csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner",
 				"test", 5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps,
-				inTreePluginName, false, true, mockTranslator, nil, nil, nil, nil, nil, false, defaultfsType, nil)
+				inTreePluginName, false, true, mockTranslator, nil, nil, nil, nil, nil, false, defaultfsType, nil, true)
 
 			// Set up return values (AnyTimes to avoid overfitting on implementation)
 
@@ -4678,7 +4735,7 @@ func TestDeleteMigration(t *testing.T) {
 			defer close(stopCh)
 			csiProvisioner := NewCSIProvisioner(clientSet, 5*time.Second, "test-provisioner",
 				"test", 5, csiConn.conn, nil, driverName, pluginCaps, controllerCaps, inTreePluginName,
-				false, true, mockTranslator, scLister, nil, nil, nil, vaLister, false, defaultfsType, nil)
+				false, true, mockTranslator, scLister, nil, nil, nil, vaLister, false, defaultfsType, nil, true)
 
 			// Set mock return values (AnyTimes to avoid overfitting on implementation details)
 			mockTranslator.EXPECT().IsPVMigratable(gomock.Any()).Return(tc.expectTranslation).AnyTimes()