After updating to v5: Unable to check update due to a system error: (time data '2023 juli 21.' does not match format '%Y %b %d')

Brief description of the problem

Hi, after updating to v5, and new python3, time data does not match format is showing when checking the update page.

Detailed step by step instructions to reproduce the problem

Software updates

Unable to check update due to a system error: (time data ‘2023 juli 21.’ does not match format ‘%Y %b %d’).
Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/storageadmin/views/command.py”, line 264, in post
return Response(rockstor_pkg_update_check(subscription=subo))
File “/opt/rockstor/src/rockstor/system/pkg_mgmt.py”, line 325, in rockstor_pkg_update_check
version, date = rpm_build_info(pkg)
File “/opt/rockstor/src/rockstor/system/pkg_mgmt.py”, line 135, in rpm_build_info
bdate = datetime.strptime(dstr, “%Y %b %d”)
File “/usr/lib64/python3.6/_strptime.py”, line 565, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File “/usr/lib64/python3.6/_strptime.py”, line 362, in _strptime
(data_string, format))
ValueError: time data ‘2023 juli 21.’ does not match format ‘%Y %b %d’

rockstor:~ # rpm -qi rockstor
Name : rockstor
Version : 5.0.0
Release : 0
Architecture: x86_64
Install Date: Mon Jul 24 12:11:39 2023
Group : Productivity/Networking/File-Sharing
Size : 10055134
License : GPL-3.0-or-later AND (MIT AND Apache-2.0 AND GPL-3.0-or-later AND LGPL-3.0-or-later AND ISC)
Signature : RSA/SHA256, Fri Jul 21 19:42:22 2023, Key ID 1c4262f25f043187
Source RPM : rockstor-5.0.0-0.src.rpm
Build Date : Fri Jul 21 19:42:14 2023
Build Host : rleap15-4.lan
Relocations : /opt
Packager : https://www.suse.com/
Vendor : YewTreeApps
URL : https://rockstor.com/
Summary : Btrfs Network Attached Storage (NAS) Appliance.

Maybe @Mark93 can check for same problem

3 Likes

Hi @eriklysoe

Thanks for another report! This looks like a issue related to locales… Could you confirm yours, please?

locale

as well as what yum is seeing:

yum info installed -v rockstor*
1 Like

Hi, here it is

rockstor:/opt/rockstor # locale
LANG=POSIX
LC_CTYPE=nb_NO.UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

rockstor:/opt/rockstor # yum info installed -v rockstor*
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
YUM version: 4.10.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (openSUSE Leap 15.4; generic; Linux.x86_64)'
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Error: No matching Packages to list
2 Likes

OK, so that confirms an issue with locale, I think. We did make a small change in our tz-related dependencies in Rockstor-5, but I don’t think it’s related.

Now, it is interesting to see that openSUSE Leap’s documentation on locale does single-out the nb_NO locale:

Note that in Norwegian, LC_TIME is also treated differently.

from: SLES 15 SP4 | Administration Guide | Special system features

I’m unsure why yum couldn’t seem to find the rockstor package in your attempt, though. How about another package?

yum info dnf-yum

Returning to the locale issue:
If I set my locale to the same as yours:

rockstable:~ # export LC_ALL="nb_NO.UTF-8"
rockstable:~ # locale
LANG=en_US.UTF-8
LC_CTYPE="nb_NO.UTF-8"
LC_NUMERIC="nb_NO.UTF-8"
LC_TIME="nb_NO.UTF-8"
LC_COLLATE="nb_NO.UTF-8"
LC_MONETARY="nb_NO.UTF-8"
LC_MESSAGES="nb_NO.UTF-8"
LC_PAPER="nb_NO.UTF-8"
LC_NAME="nb_NO.UTF-8"
LC_ADDRESS="nb_NO.UTF-8"
LC_TELEPHONE="nb_NO.UTF-8"
LC_MEASUREMENT="nb_NO.UTF-8"
LC_IDENTIFICATION="nb_NO.UTF-8"
LC_ALL=nb_NO.UTF-8

I now get what I think was the same output as Rockstor did in your hands, or closer, at least (note the “juli” notation for the “Buildtime” setting):

rockstable:~ # yum info installed -v rockstor*
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
YUM version: 4.10.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (openSUSE Leap 15.4; generic; Linux.x86_64)'
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Installed Packages
Name         : rockstor
Version      : 5.0.0
Release      : 0
Architecture : x86_64
Size         : 9.6 M
Source       : rockstor-5.0.0-0.src.rpm
Repository   : @System
Packager     : https://www.suse.com/
Buildtime    : fr. 21. juli 2023 kl. 13.42 -0400
Install time : ma. 24. juli 2023 kl. 11.29 -0400
Summary      : Btrfs Network Attached Storage (NAS) Appliance.
URL          : https://rockstor.com/
License      : GPL-3.0-or-later AND (MIT AND Apache-2.0 AND GPL-3.0-or-later AND LGPL-3.0-or-later AND ISC)
Description  : Software raid, snapshot capable NAS solution with built-in file integrity protection.
             : Allows for file sharing between network attached devices.

Forcing an en_US.UTF-8 or en_GB.UTF-8 locale for yum returns back to what is expected:

rockstable:~ # LC_ALL="en_GB.UTF-8" yum info installed -v rockstor
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
YUM version: 4.10.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (openSUSE Leap 15.4; generic; Linux.x86_64)'
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Installed Packages
Name         : rockstor
Version      : 5.0.0
Release      : 0
Architecture : x86_64
Size         : 9.6 M
Source       : rockstor-5.0.0-0.src.rpm
Repository   : @System
Packager     : https://www.suse.com/
Buildtime    : Fri 21 Jul 2023 13:42:14 EDT
Install time : Mon 24 Jul 2023 11:29:32 EDT
Summary      : Btrfs Network Attached Storage (NAS) Appliance.
URL          : https://rockstor.com/
License      : GPL-3.0-or-later AND (MIT AND Apache-2.0 AND GPL-3.0-or-later AND LGPL-3.0-or-later AND ISC)
Description  : Software raid, snapshot capable NAS solution with built-in file integrity protection.
             : Allows for file sharing between network attached devices.
2 Likes

It finds the rockstor if I remove *

Strangely it shows Jul instead of Juli (that is my locale), so do you think I need to force it into another location?

rockstor:/opt/rockstor # yum info installed -v rockstor
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
YUM version: 4.10.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (openSUSE Leap 15.4; generic; Linux.x86_64)'
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Installed Packages
Name         : rockstor
Version      : 5.0.0
Release      : 0
Architecture : x86_64
Size         : 9.6 M
Source       : rockstor-5.0.0-0.src.rpm
Repository   : @System
Packager     : https://www.suse.com/
Buildtime    : Fri Jul 21 19:42:14 2023
Install time : Mon Jul 24 12:11:39 2023
Summary      : Btrfs Network Attached Storage (NAS) Appliance.
URL          : https://rockstor.com/
License      : GPL-3.0-or-later AND (MIT AND Apache-2.0 AND GPL-3.0-or-later AND LGPL-3.0-or-later AND ISC)
Description  : Software raid, snapshot capable NAS solution with built-in file integrity protection.
             : Allows for file sharing between network attached devices.

rockstor:/opt/rockstor # yum info dnf-yum
Subscription channel for testing updates                                                                                                          2.4 kB/s | 3.0 kB     00:01
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Installed Packages
Name         : dnf-yum
Version      : 4.10.0
Release      : bp154.2.65
Architecture : noarch
Size         : 101 k
Source       : dnf-4.10.0-bp154.2.65.src.rpm
Repository   : @System
Summary      : As a Yum CLI compatibility layer, supplies /usr/bin/yum redirecting to DNF
URL          : https://github.com/rpm-software-management/dnf
License      : GPL-2.0-or-later AND GPL-2.0-only
Description  : As a Yum CLI compatibility layer, it supplies /usr/bin/yum redirecting to DNF.
1 Like

Curious… I’m glad it works, still…

I do have a very good idea as to what is happening and why it is showing up now so I’ll create an issue for it shortly. We used to force a en_US locale so we will probably need to re-instate that.

2 Likes

I have now created an issue in GitHub to track this. We should be able to provide a fix shortly.

2 Likes

@phillxnet was very quick in restoring this feature that should help resolve this issue; see (t) Failure to check for updates in locales other than en_US #2627 by phillxnet · Pull Request #2628 · rockstor/rockstor-core · GitHub

Thanks again for the report, @eriklysoe!

2 Likes

The most recent update to the Testing channel should now include the related change: V5.0+ Testing Channel Changelog - #4 by phillxnet
It should hopefully fix your issue, or at least help us narrow it down.

As mentioned in that post, a reboot may be required.

3 Likes