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

Python upgrade from 3.12.2 to 3.12.6 breaks salt-call --local on Fedora 40 #66947

Closed
aspeer opened this issue Oct 6, 2024 · 4 comments
Closed

Comments

@aspeer
Copy link

aspeer commented Oct 6, 2024

Description of Issue

When installing a new version of Fedora 40 or upgrading an existing version to the latest Python version 3.12.6 salt-call --local state.sls <name> commands fail. The same commands work with Python 3.12.2.

Setup

Create a trivial SLS file called true.sls in /srv/salt/debug

do_nothing:
  test.succeed_without_changes:
    - name: "Hello World"

Steps to Reproduce Issue

root@fedora40-e688[172.23.0.1] /srv/salt/debug
$ python --version
Python 3.12.2

root@fedora40-e688[172.23.0.1] /srv/salt/debug
$  salt-call --local state.sls debug.true
local:
----------
          ID: do_nothing
    Function: test.succeed_without_changes
        Name: Hello World
      Result: True
     Comment: Success!
     Started: 19:09:17.092891
    Duration: 0.218 ms
     Changes:   

Summary for local
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   0.218 ms

root@fedora40-e688[172.23.0.1] /srv/salt/debug
$ dnf upgrade -y python
<snip>
  Preparing        :                                                                                                                                                             1/1 
  Upgrading        : python3-libs-3.12.6-1.fc40.aarch64                                                                                                                          1/6 
  Upgrading        : python3-3.12.6-1.fc40.aarch64                                                                                                                               2/6 
  Upgrading        : python-unversioned-command-3.12.6-1.fc40.noarch                                                                                                             3/6 
  Cleanup          : python-unversioned-command-3.12.2-2.fc40.noarch                                                                                                             4/6 
  Cleanup          : python3-3.12.2-2.fc40.aarch64                                                                                                                               5/6 
  Cleanup          : python3-libs-3.12.2-2.fc40.aarch64                                                                                                                          6/6 
  Running scriptlet: python3-libs-3.12.2-2.fc40.aarch64                                                                                                                          6/6 

Upgraded:
  python-unversioned-command-3.12.6-1.fc40.noarch                       python3-3.12.6-1.fc40.aarch64                       python3-libs-3.12.6-1.fc40.aarch64                      

Complete!

root@fedora40-e688[172.23.0.1] /srv/salt/debug
$ python --version
Python 3.12.6

root@fedora40-e688[172.23.0.1] /srv/salt/debug
$  salt-call --local state.sls debug.true
local:
    Data failed to compile:
----------
    No matching sls found for 'debug.true' in env 'base'

Trace output

Relevant section of trace output shows:

[TRACE   ] Lockfile /var/cache/salt/minion/file_lists/roots/.base.w removed
[DEBUG   ] Could not find file 'salt://true.sls' in saltenv 'base'
[DEBUG   ] Could not find file 'salt://true/init.sls' in saltenv 'base'
[DEBUG   ] The functions from module 'highstate' are being loaded by dir() on the loaded module
[DEBUG   ] LazyLoaded highstate.output
[TRACE   ] data = {'local': ["No matching sls found for 'debug.true' in env 'base'"]}

Something seems to be stripping the leading directory from file_roots. Because if with the upgraded Python I do this (literally - foo can be anything) it works

$  salt-call --local state.sls foo.debug.true

local:
----------
          ID: do_nothing
    Function: test.succeed_without_changes
        Name: Hello World
      Result: True
     Comment: Success!
     Started: 19:28:56.383436
    Duration: 0.243 ms
     Changes:   

Summary for local
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   0.243 ms

Versions Report

Salt Version:
          Salt: 3006.8
 
Python Version:
        Python: 3.12.6 (main, Sep  9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)]
 
Dependency Versions:
          cffi: 1.16.0
      cherrypy: Not Installed
      dateutil: 2.8.2
     docker-py: 6.1.3
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.4
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.2
     pycparser: 2.20
      pycrypto: Not Installed
  pycryptodome: 3.20.0
        pygit2: Not Installed
  python-gnupg: Not Installed
        PyYAML: 6.0.1
         PyZMQ: 25.1.1
        relenv: Not Installed
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 6.3.3
           ZMQ: 4.3.5
 
System Versions:
          dist: fedora 40 
        locale: utf-8
       machine: aarch64
       release: 6.8.11-300.fc40.aarch64
        system: Linux
       version: Fedora Linux 40 
 
Copy link

welcome bot commented Oct 6, 2024

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@lkubb
Copy link
Contributor

lkubb commented Oct 6, 2024

This is probably #6689 #66898, the referenced patch was backported to 3.12 as well.

@bdrx312
Copy link
Contributor

bdrx312 commented Oct 6, 2024

This is probably #6689, the referenced patch was backported to 3.12 as well.

I think you linked the wrong issue by leaving out the trailing 8 and probably meant #66898

@aspeer
Copy link
Author

aspeer commented Oct 7, 2024

Thx - looks like it is duplicate of #66898, will close in favour of that one.

@aspeer aspeer closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants