cloud deploy util fails if minion has none unicode strings
Open
Nobody has claimed this yet.
bug
Confirmed
Salt-Cloud
severity-medium
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue/Question
salt/util/cloud.py line 1170
status = root_cmd('date', tty=False, sudo=False, **kwargs)
fails if the minion has localized locale settings like "de_DE.ISO-8859-1"
Setup
Steps to Reproduce Issue
system is pre bootstrapped with system locale LANG to "de_DE.ISO-8859-1"
[DEBUG ] Using password authentication
[DEBUG ] Attempting to authenticate as root (try 15 of 15)
[DEBUG ] SSH command: 'ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oControlPath=none -oConnectTimeout=15 -p 22 root@192.???.???.??? date'
[DEBUG ] Child Forked! PID: 15966 STDOUT_FD: 14 STDERR_FD: 17
[DEBUG ] Terminal Command: /bin/sh -c ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oControlPath=none -oConnectTimeout=15 -p 22 root@192.???.???.??? date
Warning: Permanently added '???.???.???.???' (RSA) to the list of known hosts.
[DEBUG ] Warning: Permanently added '192.???.??.???' (RSA) to the list of known hosts.
root@???.???.??.???'s password: [DEBUG ] root@192.???.??.???'s password:
[ERROR ] Failed to start Salt on host salt-minion
[INFO ] Created Cloud VM 'salt-minion'
[root@salt-minion~]# echo $LANG
de_DE.ISO-8859-1
[root@salt-minion ~]# date
Mo 11. M�r 17:14:52 CET 2019
[root@salt-minon ~]#
with patched line 1170
status = root_cmd('LANG=en_US.UTF-8 date', tty=False, sudo=False, **kwargs)
deployment works as expected
Versions Report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: Not Installed
gitdb: 2.0.0
gitpython: 2.1.1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1
System Versions:
dist: debian 9.8
locale: UTF-8
machine: x86_64
release: 4.9.0-8-amd64
system: Linux
version: debian 9.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in salt/util/cloud.py at line 1170 and reproduce cloud deployment with the minion locale set to de_DE.ISO-8859-1. Check the command's handling of the localized date output and verify that deployment completes successfully under that locale.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100