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

Failed to add k8sconfiguration #3009

Closed
YurongHe opened this issue Feb 16, 2021 · 6 comments
Closed

Failed to add k8sconfiguration #3009

YurongHe opened this issue Feb 16, 2021 · 6 comments
Assignees
Labels
Kubernetes Configuration Service Attention This issue is responsible by Azure service team.

Comments

@YurongHe
Copy link

  • If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Extension name (the extension in question)

az extension add --name k8sconfiguration --debug

Description of issue (in as much detail as possible)

    =============================DEBUG ASSISTANCE=============================
    If you are seeing a compilation error please try the following steps to
    successfully install cryptography:
    1) Upgrade to the latest pip and try again. This will fix errors for most
       users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
    2) Read https://cryptography.io/en/latest/installation.html for specific
       instructions for your platform.
    3) Check our frequently asked questions for more information:
       https://cryptography.io/en/latest/faq.html
    4) Ensure you have a recent Rust toolchain installed:
       https://cryptography.io/en/latest/installation.html#rust
    5) If you are experiencing issues with Rust for *this release only* you may
       set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
    =============================DEBUG ASSISTANCE=============================

error: Can not find Rust compiler
Running setup.py install for cryptography: finished with status 'error'

Cleaning up...
Removing source in /tmp/pip-install-ioukf_yn/cryptography
Removed build tracker '/tmp/pip-req-tracker-zrk21f8x'
Command "/opt/az/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ioukf_yn/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-3zzg3nmn/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-tu6mwkhh" failed with error code 1 in /tmp/pip-install-ioukf_yn/cryptography/
Exception information:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/opt/az/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 366, in run
use_user_site=options.use_user_site,
File "/opt/az/lib/python3.6/site-packages/pip/_internal/req/init.py", line 49, in install_given_reqs
**kwargs
File "/opt/az/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 791, in install
spinner=spinner,
File "/opt/az/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/opt/az/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ioukf_yn/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-3zzg3nmn/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-tu6mwkhh" failed with error code 1 in /tmp/pip-install-ioukf_yn/cryptography/

Command '['/opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/administrator/.azure/cliextensions/k8sconfiguration', '/tmp/tmpcwtz5e23/k8sconfiguration-0.2.3-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1.
Pip failed so deleting anything we might have installed at /home/administrator/.azure/cliextensions/k8sconfiguration
azure.cli.core.util.handle_exception is called with an exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 659, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 722, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 715, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 693, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 330, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 784, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/extension/custom.py", line 18, in add_extension_cmd
version=version, upgrade=upgrade)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 247, in add_extension
pip_extra_index_urls=pip_extra_index_urls, pip_proxy=pip_proxy, system=system)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 161, in _add_whl_ext
'Use --debug for more information.'.format(pip_status_code))
knack.util.CLIError: An error occurred. Pip failed with status code 1. Use --debug for more information.

cli.azure.cli.core.azclierror : An error occurred. Pip failed with status code 1. Use --debug for more information.
An error occurred. Pip failed with status code 1. Use --debug for more information.
Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7ff0a3e57c80>]
az_command_data_logger : exit code: 1
Command ran in 29.892 seconds (init: 0.367, invoke: 29.525)
telemetry.save : Save telemetry record of length 3041 in cache
telemetry.check : Negative: The /home/administrator/.azure/telemetry.txt was modified at 2021-02-16 11:01:53.292448, which in less than 600.000000 s


@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 16, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 17, 2021
@yonzhan yonzhan added needs-triage This is a new issue that needs to be triaged to the appropriate team. Service Attention This issue is responsible by Azure service team. labels Feb 17, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 17, 2021
@ghost
Copy link

ghost commented Feb 17, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @NarayanThiru.

Issue Details
  • If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Extension name (the extension in question)

az extension add --name k8sconfiguration --debug

Description of issue (in as much detail as possible)

    =============================DEBUG ASSISTANCE=============================
    If you are seeing a compilation error please try the following steps to
    successfully install cryptography:
    1) Upgrade to the latest pip and try again. This will fix errors for most
       users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
    2) Read https://cryptography.io/en/latest/installation.html for specific
       instructions for your platform.
    3) Check our frequently asked questions for more information:
       https://cryptography.io/en/latest/faq.html
    4) Ensure you have a recent Rust toolchain installed:
       https://cryptography.io/en/latest/installation.html#rust
    5) If you are experiencing issues with Rust for *this release only* you may
       set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
    =============================DEBUG ASSISTANCE=============================

error: Can not find Rust compiler
Running setup.py install for cryptography: finished with status 'error'

Cleaning up...
Removing source in /tmp/pip-install-ioukf_yn/cryptography
Removed build tracker '/tmp/pip-req-tracker-zrk21f8x'
Command "/opt/az/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ioukf_yn/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-3zzg3nmn/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-tu6mwkhh" failed with error code 1 in /tmp/pip-install-ioukf_yn/cryptography/
Exception information:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/opt/az/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 366, in run
use_user_site=options.use_user_site,
File "/opt/az/lib/python3.6/site-packages/pip/_internal/req/init.py", line 49, in install_given_reqs
**kwargs
File "/opt/az/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 791, in install
spinner=spinner,
File "/opt/az/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/opt/az/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ioukf_yn/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-3zzg3nmn/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-tu6mwkhh" failed with error code 1 in /tmp/pip-install-ioukf_yn/cryptography/

Command '['/opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/administrator/.azure/cliextensions/k8sconfiguration', '/tmp/tmpcwtz5e23/k8sconfiguration-0.2.3-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1.
Pip failed so deleting anything we might have installed at /home/administrator/.azure/cliextensions/k8sconfiguration
azure.cli.core.util.handle_exception is called with an exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 659, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 722, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 715, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 693, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 330, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 784, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/extension/custom.py", line 18, in add_extension_cmd
version=version, upgrade=upgrade)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 247, in add_extension
pip_extra_index_urls=pip_extra_index_urls, pip_proxy=pip_proxy, system=system)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 161, in _add_whl_ext
'Use --debug for more information.'.format(pip_status_code))
knack.util.CLIError: An error occurred. Pip failed with status code 1. Use --debug for more information.

cli.azure.cli.core.azclierror : An error occurred. Pip failed with status code 1. Use --debug for more information.
An error occurred. Pip failed with status code 1. Use --debug for more information.
Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7ff0a3e57c80>]
az_command_data_logger : exit code: 1
Command ran in 29.892 seconds (init: 0.367, invoke: 29.525)
telemetry.save : Save telemetry record of length 3041 in cache
telemetry.check : Negative: The /home/administrator/.azure/telemetry.txt was modified at 2021-02-16 11:01:53.292448, which in less than 600.000000 s


Author: YurongHe
Assignees: -
Labels:

Kubernetes Configuration, Service Attention, needs-triage

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 17, 2021

k8sconfiguration

@NarayanThiru
Copy link
Member

@YurongHe, this is most likely related to the issue Azure/azure-cli#16858. Can you try the resolution from that issue? Basically,

RUN python3 -m pip install -U pip
RUN python3 -m pip install --upgrade pip --target /usr/lib64/az/lib/python3.6/site-packages/

@YurongHe
Copy link
Author

@YurongHe, this is most likely related to the issue Azure/azure-cli#16858. Can you try the resolution from that issue? Basically,

RUN python3 -m pip install -U pip
RUN python3 -m pip install --upgrade pip --target /usr/lib64/az/lib/python3.6/site-packages/

I tried the above two command to reinstall pip. the run az extension add --name k8sconfiguration --debug. Same error.

error: Can not find Rust compiler
Running setup.py install for cryptography: finished with status 'error'

Cleaning up...
Removing source in /tmp/pip-install-fcb4jr5m/cryptography
Removed build tracker '/tmp/pip-req-tracker-z0cwqxny'
Command "/opt/az/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-fcb4jr5m/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-kv2ma9_n/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-nu6zxsd8" failed with error code 1 in /tmp/pip-install-fcb4jr5m/cryptography/
Exception information:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/opt/az/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 366, in run
use_user_site=options.use_user_site,
File "/opt/az/lib/python3.6/site-packages/pip/_internal/req/init.py", line 49, in install_given_reqs
**kwargs
File "/opt/az/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 791, in install
spinner=spinner,
File "/opt/az/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/opt/az/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-fcb4jr5m/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-kv2ma9_n/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-nu6zxsd8" failed with error code 1 in /tmp/pip-install-fcb4jr5m/cryptography/

Command '['/opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/administrator/.azure/cliextensions/k8sconfiguration', '/tmp/tmpra2p9vfo/k8sconfiguration-0.2.3-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1.
Pip failed so deleting anything we might have installed at /home/administrator/.azure/cliextensions/k8sconfiguration
azure.cli.core.util.handle_exception is called with an exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 659, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 722, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 715, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 693, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 330, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 784, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/extension/custom.py", line 18, in add_extension_cmd
version=version, upgrade=upgrade)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 247, in add_extension
pip_extra_index_urls=pip_extra_index_urls, pip_proxy=pip_proxy, system=system)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 161, in _add_whl_ext
'Use --debug for more information.'.format(pip_status_code))
knack.util.CLIError: An error occurred. Pip failed with status code 1. Use --debug for more information.

cli.azure.cli.core.azclierror : An error occurred. Pip failed with status code 1. Use --debug for more information.
An error occurred. Pip failed with status code 1. Use --debug for more information.
Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f1fddddcc80>]
az_command_data_logger : exit code: 1
Command ran in 24.765 seconds (init: 0.355, invoke: 24.410)
telemetry.save : Save telemetry record of length 3041 in cache

@JaneYan-2016
Copy link

I hit the same issue, and the workaround for me is:
CRYPTOGRAPHY_DONT_BUILD_RUST=1
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py
python3 get-pip.py
python3 -m pip install -U pip
python3 -m pip install --upgrade pip --target /opt/az/lib/python3.6/site-packages/

@RakeshMohanMSFT RakeshMohanMSFT self-assigned this Nov 11, 2022
@RakeshMohanMSFT
Copy link
Contributor

if you are still facing this issue, please reopen the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kubernetes Configuration Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants