csi-driver-smb icon indicating copy to clipboard operation
csi-driver-smb copied to clipboard

Calls RemoveSmbGlobalMapping when it necessary

Open vitaliy-leschenko opened this issue 3 years ago • 9 comments

What type of PR is this? /kind feature

What this PR does / why we need it: This PR implement SMBUnmount method to call RemoveSmbGlobalMapping from csi-proxy

Which issue(s) this PR fixes: Currently no one calls RemoveSmbGlobalMapping

Special notes for your reviewer: Make sense to see together with https://github.com/kubernetes-csi/csi-proxy/pull/210

Release note:

Calls RemoveSmbGlobalMapping when it necessary

vitaliy-leschenko avatar Jun 29 '22 12:06 vitaliy-leschenko

Hi @vitaliy-leschenko. Thanks for your PR.

I'm waiting for a kubernetes-csi 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 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.

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

k8s-ci-robot avatar Jun 29 '22 12:06 k8s-ci-robot

Pull Request Test Coverage Report for Build 2827044432

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 85.445%

Totals Coverage Status
Change from base Build 2802564516: 0.3%
Covered Lines: 816
Relevant Lines: 955

💛 - Coveralls

coveralls avatar Jun 29 '22 12:06 coveralls

/ok-to-test

andyzhangx avatar Jun 29 '22 12:06 andyzhangx

/assign @andyzhangx

vitaliy-leschenko avatar Jun 30 '22 11:06 vitaliy-leschenko

As I see in logs SMBUnmount calls twice:

I0629 21:49:06.107793    8176 safe_mounter_windows.go:117] SMBUnmount: local path: c:\var\lib\kubelet\pods\333c440a-ffc8-421e-9d45-e04aff8a9d34\volumes\kubernetes.io~csi\pv-smb\mount
I0629 21:49:41.004132    8176 safe_mounter_windows.go:148] Remove directory: c:\var\lib\kubelet\pods\dec84d2f-d2e2-4f1e-ab72-1a3a5dd33845\volumes\kubernetes.io~csi\pv-smb\mount

I0629 21:49:43.479884    8176 safe_mounter_windows.go:117] SMBUnmount: local path: \var\lib\kubelet\plugins\kubernetes.io\csi\pv\pv-smb\globalmount
I0629 21:49:43.479884    8176 safe_mounter_windows.go:148] Remove directory: \var\lib\kubelet\plugins\kubernetes.io\csi\pv\pv-smb\globalmount

We need to call RemoveSmbGlobalMapping only for second case. I will do it.


Update: fixed

vitaliy-leschenko avatar Jun 30 '22 14:06 vitaliy-leschenko

@andyzhangx currently we run unit tests with old csi-proxy: https://acs-mirror.azureedge.net/csi-proxy/v1.1.1/binaries/csi-proxy-v1.1.1.tar.gz Can you build new csi-proxy to try run tests on both of proxies?

vitaliy-leschenko avatar Aug 08 '22 13:08 vitaliy-leschenko

@andyzhangx currently we run unit tests with old csi-proxy: https://acs-mirror.azureedge.net/csi-proxy/v1.1.1/binaries/csi-proxy-v1.1.1.tar.gz Can you build new csi-proxy to try run tests on both of proxies?

@vitaliy-leschenko does this PR depend on master branch csi-proxy?

andyzhangx avatar Aug 08 '22 13:08 andyzhangx

@vitaliy-leschenko does this PR depend on master branch csi-proxy?

No, but I want to be 100% sure.

vitaliy-leschenko avatar Aug 08 '22 13:08 vitaliy-leschenko

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, vitaliy-leschenko

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

k8s-ci-robot avatar Aug 13 '22 13:08 k8s-ci-robot