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

svn checkout encoding error #55850

Open
muscraziest opened this issue Jan 13, 2020 · 6 comments
Open

svn checkout encoding error #55850

muscraziest opened this issue Jan 13, 2020 · 6 comments
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@muscraziest
Copy link

Description of Issue

When trying to checkout or update a svn repository and a filename with utf-8 encoding exists then the salt master fails with the following message:

svn: E000022: Can't convert string from 'UTF-8' to native encoding:

Steps to Reproduce Issue

$> git clone https://github.com/muscraziest/error_svn_server_encoding
$> cd error_svn_server_encoding
$> docker-compose up salt-master
Creating network "errorsvnserverencoding_default" with the default driver
Creating errorsvnserverencoding_svn-server_1 ...
Creating errorsvnserverencoding_svn-server_1 ... done
Creating errorsvnserverencoding_salt-master_1 ...
Creating errorsvnserverencoding_salt-master_1 ... done
Attaching to errorsvnserverencoding_salt-master_1
salt-master_1  | [ERROR   ] Command '['svn', '--non-interactive', 'checkout', 'svn://svn-server/testrepo']' failed with return code: 1
salt-master_1  | [ERROR   ] stdout: A    testrepo/t{U+03B5}st
salt-master_1  | [ERROR   ] stderr: svn: E155009: Failed to run the WC DB work queue associated with '/tmp/testrepo', work item 1 (file-install t{U+03B5}st 1 0 1 1)
salt-master_1  | svn: E000022: Can't convert string from 'UTF-8' to native encoding:
salt-master_1  | svn: E000022: /tmp/testrepo/t{U+03B5}st
salt-master_1  | [ERROR   ] retcode: 1
salt-master_1  | Exception occurred in runner salt.cmd: Traceback (most recent call last):
salt-master_1  |   File "/usr/lib/python3/dist-packages/salt/client/mixins.py", line 387, in _low
salt-master_1  |     data['return'] = self.functions[fun](*args, **kwargs)
salt-master_1  |   File "/usr/lib/python3/dist-packages/salt/runners/salt.py", line 106, in cmd
salt-master_1  |     if fun in functions \
salt-master_1  |   File "/usr/lib/python3/dist-packages/salt/modules/svn.py", line 174, in checkout
salt-master_1  |     return _run_svn('checkout', cwd, user, username, password, opts)
salt-master_1  |   File "/usr/lib/python3/dist-packages/salt/modules/svn.py", line 73, in _run_svn
salt-master_1  |     raise CommandExecutionError(result['stderr'] + '\n\n' + ' '.join(cmd))
salt-master_1  | salt.exceptions.CommandExecutionError: svn: E155009: Failed to run the WC DB work queue associated with '/tmp/testrepo', work item 1 (file-install t{U+03B5}st 1 0 1 1)
salt-master_1  | svn: E000022: Can't convert string from 'UTF-8' to native encoding:
salt-master_1  | svn: E000022: /tmp/testrepo/t{U+03B5}st
salt-master_1  |
salt-master_1  | svn --non-interactive checkout svn://svn-server/testrepo

Versions Report

Salt Version:
Salt: 2018.3.4

Dependency Versions:
cffi: 1.12.1
cherrypy: unknown
dateutil: Not Installed
docker-py: 1.10.6
gitdb: 2.0.5
gitpython: 2.1.11
ioflo: 1.7.5
Jinja2: 2.8
libgit2: 0.27.7
libnacl: 1.6.1
M2Crypto: 0.31.0
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 3.7.2
pycryptodome: Not Installed
pygit2: 0.27.2
Python: 3.5.2 (default, Nov 12 2018, 13:43:14)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: 0.6.8
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: Ubuntu 16.04 xenial
locale: ANSI_X3.4-1968
machine: x86_64
release: 5.4.7-100.fc30.x86_64
system: Linux
version: Ubuntu 16.04 xenial

@muscraziest
Copy link
Author

It seems the issue comes from cmd.run invocation with a clean enviroment (missing locale information)

@Ch3LL
Copy link
Contributor

Ch3LL commented Jan 14, 2020

can you share the state or execution module command you are using when you see this?

@Ch3LL Ch3LL added the info-needed waiting for more info label Jan 14, 2020
@Ch3LL Ch3LL added this to the Blocked milestone Jan 14, 2020
@muscraziest
Copy link
Author

the command is salt-run salt.cmd svn.checkout /tmp svn://svn-server/testrepo

@stale
Copy link

stale bot commented Feb 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Feb 13, 2020
@Ch3LL
Copy link
Contributor

Ch3LL commented Feb 20, 2020

thanks for clarifying the command. looks like we need to handle the encoding here better. thanks

@stale
Copy link

stale bot commented Feb 20, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Feb 20, 2020
@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists P4 Priority 4 and removed info-needed waiting for more info labels Feb 20, 2020
@Ch3LL Ch3LL modified the milestones: Blocked, Approved Feb 20, 2020
@sagetherage sagetherage removed the P4 Priority 4 label Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

3 participants