Skip to content

Conversation

@bebound
Copy link
Contributor

@bebound bebound commented Nov 30, 2022

Description

Apline 3.17 use openssl3 as default openssl.
Current cryptography or pyOpenSSL is not compatible and fails when run az self-test

https://dev.azure.com/azclitools/public/_build/results?buildId=18477&view=logs&jobId=2003e891-8c42-5a1e-cb34-ddf6a1b22137&j=2003e891-8c42-5a1e-cb34-ddf6a1b22137&t=10ca09a2-a348-579b-c46e-0dae3fc1ef2e

2022-12-01T04:15:45.2366390Z == Test docker image ==
2022-12-01T04:17:33.2215954Z Loaded image: clibuild20221201.15:latest
2022-12-01T04:17:33.3270048Z docker run $IMAGE_NAME /bin/bash -c "time az self-test && time az --version && sleep 5"
2022-12-01T04:17:33.3271504Z + docker run clibuild20221201.15:latest /bin/bash -c 'time az self-test && time az --version && sleep 5'
2022-12-01T04:17:36.4128960Z WARNING: This command has been deprecated and will be removed in a future release.
2022-12-01T04:17:36.9639569Z ERROR: Error occurred loading commands!
2022-12-01T04:17:36.9640667Z 
2022-12-01T04:17:37.0191377Z ERROR: The command failed with an unexpected error. Here is the traceback:
2022-12-01T04:17:37.0204315Z ERROR: Error relocating /usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: FIPS_mode_set: symbol not found
2022-12-01T04:17:37.0205779Z Traceback (most recent call last):
2022-12-01T04:17:37.0207537Z   File "/usr/local/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
2022-12-01T04:17:37.0208669Z     cmd_result = self.invocation.execute(args)
2022-12-01T04:17:37.0210322Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
2022-12-01T04:17:37.0211370Z     raise ex
2022-12-01T04:17:37.0213078Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
2022-12-01T04:17:37.0214225Z     results.append(self._run_job(expanded_arg, cmd_copy))
2022-12-01T04:17:37.0215987Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
2022-12-01T04:17:37.0217189Z     result = cmd_copy(params)
2022-12-01T04:17:37.0218864Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
2022-12-01T04:17:37.0219910Z     return self.handler(*args, **kwargs)
2022-12-01T04:17:37.0222474Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
2022-12-01T04:17:37.0223454Z     return op(**command_args)
2022-12-01T04:17:37.0224944Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/command_modules/profile/custom.py", line 188, in check_cli
2022-12-01T04:17:37.0225764Z     raise ex
2022-12-01T04:17:37.0227559Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/command_modules/profile/custom.py", line 183, in check_cli
2022-12-01T04:17:37.0228681Z     create_invoker_and_load_cmds_and_args(cmd.cli_ctx)
2022-12-01T04:17:37.0230263Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/file_util.py", line 74, in create_invoker_and_load_cmds_and_args
2022-12-01T04:17:37.0231619Z     invoker.commands_loader.load_arguments()
2022-12-01T04:17:37.0233191Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 502, in load_arguments
2022-12-01T04:17:37.0234300Z     cmd.load_arguments()  # this loads the arguments via reflection
2022-12-01T04:17:37.0235900Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 318, in load_arguments
2022-12-01T04:17:37.0236978Z     super(AzCliCommand, self).load_arguments()
2022-12-01T04:17:37.0238281Z   File "/usr/local/lib/python3.10/site-packages/knack/commands.py", line 104, in load_arguments
2022-12-01T04:17:37.0239188Z     cmd_args = self.arguments_loader()
2022-12-01T04:17:37.0240695Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 125, in arguments_loader
2022-12-01T04:17:37.0241629Z     op = self.get_op_handler(self.op_path)
2022-12-01T04:17:37.0243219Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
2022-12-01T04:17:37.0244594Z     handler = import_module(mod_to_import)
2022-12-01T04:17:37.0252717Z   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
2022-12-01T04:17:37.0253975Z     return _bootstrap._gcd_import(name[level:], package, level)
2022-12-01T04:17:37.0254788Z   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
2022-12-01T04:17:37.0255608Z   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
2022-12-01T04:17:37.0256461Z   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
2022-12-01T04:17:37.0257145Z   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
2022-12-01T04:17:37.0257942Z   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
2022-12-01T04:17:37.0258806Z   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2022-12-01T04:17:37.0260111Z   File "/usr/local/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 26, in <module>
2022-12-01T04:17:37.0260817Z     import OpenSSL.crypto
2022-12-01T04:17:37.0263179Z   File "/usr/local/lib/python3.10/site-packages/OpenSSL/__init__.py", line 8, in <module>
2022-12-01T04:17:37.0263860Z     from OpenSSL import crypto, SSL
2022-12-01T04:17:37.0265005Z   File "/usr/local/lib/python3.10/site-packages/OpenSSL/crypto.py", line 16, in <module>
2022-12-01T04:17:37.0265636Z     from OpenSSL._util import (
2022-12-01T04:17:37.0266584Z   File "/usr/local/lib/python3.10/site-packages/OpenSSL/_util.py", line 6, in <module>
2022-12-01T04:17:37.0267232Z     from cryptography.hazmat.bindings.openssl.binding import Binding
2022-12-01T04:17:37.0268272Z   File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
2022-12-01T04:17:37.0268990Z     from cryptography.hazmat.bindings._openssl import ffi, lib
2022-12-01T04:17:37.0270245Z ImportError: Error relocating /usr/local/lib/python3.10/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: FIPS_mode_set: symbol not found

Use 1.1 explicitly.


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost requested review from jiasli, kairu-ms, wangzelin007 and yonzhan November 30, 2022 08:57
@ghost ghost added the Auto-Assign Auto assign by bot label Nov 30, 2022
@ghost ghost assigned jiasli Nov 30, 2022
@ghost ghost added this to the Dec 2022 (2023-01-03) milestone Nov 30, 2022
@ghost ghost added the Packaging label Nov 30, 2022
@bebound bebound marked this pull request as ready for review November 30, 2022 09:21
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 30, 2022

Packaging

@bebound bebound merged commit 7e3152e into Azure:dev Nov 30, 2022
@jiasli
Copy link
Member

jiasli commented Dec 1, 2022

https://alpinelinux.org/posts/Alpine-3.17.0-released.html

OpenSSL 3.0 is now the default OpenSSL version. OpenSSL 1.1 is available via the openssl1.1-compat package.

Also see pyca/cryptography#7039. We need to bump cryptography to the latest verison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants