New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape the special character in vsphere windows path #98830
Conversation
@liyanhui1228: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @liyanhui1228. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
@@ -86,6 +86,17 @@ func isLinkPath(path string) (bool, error) { | |||
return false, nil | |||
} | |||
|
|||
// Escape the special character in vsphere windows path | |||
func escapeWindowsPath(path string) (string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might be a little complicated considering different system might allow different characters. trying to check information related to this
@andyzhangx do you know whether there is a generic way to process special character in Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion! I checked the doc for the Get-Item
powershell command and found out we can change to use -LiteralPath
instead of using -Path
in order to prevent powershell to interpret the special characters like []
as wildcards, and when using -LiteralPath
, the string will be interpreted as it is. e.g. vsphere path 'C:\var\lib\kubelet\plugins\kubernetes.io\vsphere-volume\mounts\[datastore_name] kubevols'
can be correctly interpreted in this case.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-item?view=powershell-7.1
/ok-to-test |
/test pull-gcp-compute-persistent-disk-csi-driver-e2e-win2019 |
@jingxu97: The specified target(s) for
Use
In response to this:
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. |
/test pull-kubernetes-e2e-windows-gce |
/retest |
/retest |
Manually tested this in GCE Windows and all the GCE PD e2e tests passed. |
@andyzhangx could you confirm this change is ok for azure? One test failed |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jingxu97, liyanhui1228 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 |
/test pull-kubernetes-e2e-azure-disk-windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/priority important-soon
/sig windows
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/test pull-kubernetes-e2e-kind |
3 similar comments
/test pull-kubernetes-e2e-kind |
/test pull-kubernetes-e2e-kind |
/test pull-kubernetes-e2e-kind |
/retest Review the full test history for this PR. Silence the bot with an |
/test pull-kubernetes-e2e-windows-gce |
/test pull-kubernetes-conformance-kind-ga-only-parallel |
@liyanhui1228: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
…30-upstream-release-1.18 Automated cherry pick of #98830 upstream release 1.18
…30-upstream-release-1.19 Automated cherry pick of #98830 upstream release 1.19
…30-upstream-release-1.20 Automated cherry pick of #98830 upstream release 1.20
What type of PR is this?
/kind bug
/kind failing-test
/sig windows
What this PR does / why we need it:
Escape the special characters like
that exist in vsphere windows path, otherwise the powershell command
[
,]
andGet-Item -Path [unescaped_path]
will fail, which caused all the subPath e2e tests on vsphere windows to fail.