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

[BUG]run bkr command failed with 'AttributeError: module 'ssl' has no attribute 'wrap_socket'' #188

Closed
HouMinXi opened this issue Nov 17, 2023 · 0 comments · Fixed by #189
Labels
Milestone

Comments

@HouMinXi
Copy link

Describe the bug
update system from fedora38 to fedora39 and run bkr failed

Version-Release number
kernel version: 6.5.11-300.fc39.x86_64
bkr package: beaker-client-28.4-1.fc39eng.noarch

To Reproduce
Steps to reproduce the behavior:

  1. run bkr whoami

Actual behavior
$ bkr whoami
Traceback (most recent call last):
File "/usr/bin/bkr", line 33, in
sys.exit(load_entry_point('beaker-client==28.4', 'console_scripts', 'bkr')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/bkr/client/main.py", line 113, in main
return cmd.run(*cmd_args, **cmd_opts.dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/bkr/client/commands/cmd_whoami.py", line 57, in run
self.set_hub(**kwargs)
File "/usr/lib/python3.12/site-packages/bkr/client/init.py", line 84, in set_hub
self.container.set_hub(username, password, auto_login=self.requires_login,
File "/usr/lib/python3.12/site-packages/bkr/client/command.py", line 328, in set_hub
self.hub = HubProxy(conf=self.conf, auto_login=auto_login)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/bkr/common/hub.py", line 87, in init
self._login()
File "/usr/lib/python3.12/site-packages/bkr/common/hub.py", line 114, in _login
login_method()
File "/usr/lib/python3.12/site-packages/bkr/common/hub.py", line 214, in _login_krbv
self._hub.auth.login_krbv(req_enc, proxyuser)
File "/usr/lib64/python3.12/xmlrpc/client.py", line 1122, in call
return self.__send(self.__name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/xmlrpc/client.py", line 1461, in __request
response = self.__transport.request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/bkr/common/xmlrpc3.py", line 470, in request
result = transport_class.request(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/xmlrpc/client.py", line 1166, in request
return self.single_request(host, handler, request_body, verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/bkr/common/xmlrpc3.py", line 368, in single_request
http_con = self.send_request(host, handler, request_body, False) # pylint: disable=too-many-function-args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/xmlrpc/client.py", line 1279, in send_request
connection = self.make_connection(host)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/bkr/common/xmlrpc3.py", line 436, in make_connection
conn = TimeoutProxyHTTPS(host, **self.proxy_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/bkr/common/xmlrpc3.py", line 144, in init
TimeoutHTTPSProxyConnection.init(self, host, proxy, port, proxy_user, proxy_password,
File "/usr/lib/python3.12/site-packages/bkr/common/xmlrpc3.py", line 96, in init
self.connect()
File "/usr/lib/python3.12/site-packages/bkr/common/xmlrpc3.py", line 119, in connect
self.sock = ssl.wrap_socket(self.sock, keyfile=self.key_file, certfile=self.cert_file)
^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'

Expected behavior
show username as well

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
https://docs.python.org/3.12/whatsnew/3.12.html#ssl
python3.12 remove the ssl.wrap_socket() function.

@HouMinXi HouMinXi added the bug label Nov 17, 2023
mh21 added a commit to mh21/beaker that referenced this issue Nov 17, 2023
Fixes beaker-project#188

Signed-off-by: Michael Hofmann <mhofmann@redhat.com>
@StykMartin StykMartin added this to the 29.0 milestone Nov 17, 2023
StykMartin pushed a commit that referenced this issue Nov 17, 2023
Fixes #188

Signed-off-by: Michael Hofmann <mhofmann@redhat.com>
StykMartin pushed a commit to StykMartin/beaker that referenced this issue Nov 17, 2023
Fixes beaker-project#188

Signed-off-by: Michael Hofmann <mhofmann@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants