Bug 2239817

Summary: Fedora match_hostname.patch patch breaks salt-ssh
Product: [Fedora] Fedora Reporter: Marek Marczykowski <marmarek>
Component: saltAssignee: Kirill Ponomarev <kp>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: david-dm.murphy, derek, gwync, kp, rcallicotte
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: salt-3006.3-2.fc39 salt-3006.3-2.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-29 00:19:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch none

Description Marek Marczykowski 2023-09-20 10:50:41 UTC
The patch at https://src.fedoraproject.org/rpms/salt/blob/rawhide/f/match_hostname.patch breaks salt-ssh when managing other distributions with older Python version (like Debian stable with Python 3.11).

Reproducible: Always

Steps to Reproduce:
1. Configure salt-ssh to manage Debian stable system over ssh
2. Call `salt-ssh $REMOTE_HOSTNAME state.highstate` (with $REMOTE_HOSTNAME replaced with the actual hostname. Probably simpler commands like `salt-ssh grains.items` are affected too.
Actual Results:  
```
Traceback (most recent call last):
            File "/var/tmp/.root_dd8a91_salt/salt-call", line 27, in <module>
              salt_call()
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/scripts.py", line 438, in salt_call
              import salt.cli.call
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/cli/call.py", line 3, in <module>
              import salt.cli.caller
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/cli/caller.py", line 12, in <module>
              import salt.channel.client
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/channel/client.py", line 13, in <module>
              import salt.crypt
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/crypt.py", line 26, in <module>
              import salt.payload
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/payload.py", line 12, in <module>
              import salt.loader.context
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/__init__.py", line 23, in <module>
              import salt.utils.event
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/utils/event.py", line 67, in <module>
              import salt.ext.tornado.iostream
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/ext/tornado/iostream.py", line 42, in <module>
              import urllib3.util.ssl_match_hostname
          ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname'
          [ERROR   ] An un-handled exception was caught by Salt's global exception handler:
          ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname'
          Traceback (most recent call last):
            File "/var/tmp/.root_dd8a91_salt/salt-call", line 27, in <module>
              salt_call()
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/scripts.py", line 438, in salt_call
              import salt.cli.call
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/cli/call.py", line 3, in <module>
              import salt.cli.caller
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/cli/caller.py", line 12, in <module>
              import salt.channel.client
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/channel/client.py", line 13, in <module>
              import salt.crypt
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/crypt.py", line 26, in <module>
              import salt.payload
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/payload.py", line 12, in <module>
              import salt.loader.context
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/__init__.py", line 23, in <module>
              import salt.utils.event
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/utils/event.py", line 67, in <module>
              import salt.ext.tornado.iostream
            File "/var/tmp/.root_dd8a91_salt/pyall/salt/ext/tornado/iostream.py", line 42, in <module>
              import urllib3.util.ssl_match_hostname
          ModuleNotFoundError: No module named 'urllib3.util.ssl_match_hostname'
```

Expected Results:  
No exception

Removing the patch fixes the issue. It worked correctly in 3006.1-2.

Comment 1 Gwyn Ciesla 2023-09-20 16:18:29 UTC
Created attachment 1989723 [details]
Patch

Does this modified patch help?

Comment 2 Marek Marczykowski 2023-09-20 21:30:09 UTC
Yes, it helps, thanks for quick response!

Comment 3 Gwyn Ciesla 2023-09-20 21:31:40 UTC
Excellent, I'll get out an update ASAP. Anytime!

Comment 4 Fedora Update System 2023-09-20 21:44:51 UTC
FEDORA-2023-e5b9511c5a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e5b9511c5a

Comment 5 Fedora Update System 2023-09-20 21:44:52 UTC
FEDORA-2023-cd02b95c02 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-cd02b95c02

Comment 6 Fedora Update System 2023-09-21 01:12:53 UTC
FEDORA-2023-e5b9511c5a has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-e5b9511c5a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-e5b9511c5a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-09-21 02:22:43 UTC
FEDORA-2023-cd02b95c02 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-cd02b95c02`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-cd02b95c02

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-09-29 00:19:25 UTC
FEDORA-2023-e5b9511c5a has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-09-29 01:27:45 UTC
FEDORA-2023-cd02b95c02 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.