Skip to content
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

User names cannot be used with escape characters. #214

Closed
qw1mb0 opened this issue Jul 5, 2019 · 2 comments
Closed

User names cannot be used with escape characters. #214

qw1mb0 opened this issue Jul 5, 2019 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@qw1mb0
Copy link

qw1mb0 commented Jul 5, 2019

/kind bug

What happened:
We have a user named user\sa-DevopsProvisioner with which we want to order disks.

What you expected to happen:
If you use the username in vsphere.conf:
user = 'user\sa-DevopsProvisioner' we get the controller error:

time="2019-07-05T11:15:14Z" level=fatal msg="grpc failed" error="2:8: unquoted '\\' must be followed by new line or double quote"

If you use the username
user = 'user\\sa-DevopsProvisioner' we get the controller error:

time="2019-07-05T11:15:14Z" level=fatal msg="grpc failed" error="2:8: unquoted '\\' must be followed by new line or double quote"

If you use the username
user = "user\\sa-DevopsProvisioner" we get the controller error:

E0705 11:17:42.653946       1 connection.go:63] Failed to create govmomi client. err: ServerFaultCode: Cannot complete login due to an incorrect user name or password.
W0705 11:17:42.655611       1 credentialmanager.go:77] Cannot get secret  in namespace . error: "secret \"\" not found"
W0705 11:17:42.655650       1 credentialmanager.go:54] secret "" not found in namespace ""
E0705 11:17:42.655660       1 credentialmanager.go:68] credentials not found for server "p-vc-3.hq.ru.corp.leroymerlin.com"
E0705 11:17:42.655678       1 connectionmanager.go:153] Failed to get credentials from Secret Credential Manager with err:Credentials not found

If you use the username
user = "user\sa-DevopsProvisioner" we get the controller error:

time="2019-07-05T11:18:25Z" level=error msg="Failed to parse config. Err: 2:16: unknown escape sequence"

How can I use a username with escape characters?

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • vsphere-cloud-controller-manager version: gcr.io/cloud-provider-vsphere/vsphere-csi:v0.2.0
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.6 LTS
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 5, 2019
@dvonthenen
Copy link
Contributor

dvonthenen commented Jul 9, 2019

@qw1mb0 How were you able to create a user account user\sa-DevopsProvisioner in the vCenter Server? The \ is an invalid character in a vSphere username/account.

@qw1mb0
Copy link
Author

qw1mb0 commented Jul 12, 2019

In this case, it turned out that user is a domain, corrected the user on sa-DevopsProvisioner@domain.example.com and everything began to work correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants