saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.16k stars 5.48k forks source link

[BUG] salt-mount fails to query non-Latin filesystem labels on Linux #59954

Open the-Arioch opened 3 years ago

the-Arioch commented 3 years ago
~# ntfslabel /dev/sdf1 -f
Forced to continue.
D - Дети Samsung 1.5 Тб

# salt-call mount.active extended=yes

.....
    /srv/dev-disk-by-uuid-7AF2EDB0F2ED70B5:
        ----------
        alt_device:
            /dev/sdf1
        device:
            /dev/sdf1
        device_label:
            D - M-PM-^TM-PM-5M-QM-^BM-PM-8 Samsung 1.5 M-PM-\
        device_uuid:
            None
        fstype:
            fuseblk
.....

# apt-cache show salt-common
Package: salt-common
Source: salt
Version: 3002.2+ds-1
Architecture: all
Maintainer: Debian Salt Team <pkg-salt-team@lists.alioth.debian.org>
Installed-Size: 30376
the-Arioch commented 3 years ago

Dunno if this is relevant to how systemd runs salt daemon or not...

# locale
LANG=ru_RU.UTF-8

~# mount -l
....
/dev/sdf1 on /srv/dev-disk-by-uuid-7AF2EDB0F2ED70B5 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096) [D - Дети Samsung 1.5 Тб]

# ls /dev/disk/by-label/
'D\x20-\x20Дети\x20Samsung\x201.5\x20Тб'

# export LANG=C
# export LC_ALL=C
# locale -a
C
C.UTF-8
POSIX
ru_RU.utf8

# mount -l
/dev/sdf1 on /srv/dev-disk-by-uuid-7AF2EDB0F2ED70B5 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096) [D - Дети Samsung 1.5 Тб]

So, i can not repro this mangling in bash.

In general my vacation is runing over and while this itch it still mine my capailities to scratch it will be limited.

Bad luck, i did not stumbled upon it when debugging https://github.com/saltstack/salt/issues/54508

Perhaps some day later...