question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible conflict between azure-cli package and fence-agents-azure-arm package

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

when installing the fence-agents-azure-arm package to configure azure fence agent on RHEL cluster as per the document: https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/high-availability-guide-rhel-pacemaker#cluster-installation and then trying to install the azure cli on the same machine, the azure cli commands is failing , a below is an example “az login”.

the installtion of fence-agents-azure-arm package is installing the python3-azure-sdk package, but I am not sure how this would affect the use of the azure cli. if the python3-azure-sdk package is removed, the azure cli commands works fine.

note : trying the older versions of azure-cli would not help too. would you please help us to understand how they are correlated ? and if there is any solution to have both of them on the same machine ?

Command Name az login

Errors:

The command failed with an unexpected error. Here is the traceback:
__init__() got an unexpected keyword argument 'user_agent'
Traceback (most recent call last):
  File "/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/profile/custom.py", line 158, in login
    use_cert_sn_issuer=use_cert_sn_issuer)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 175, in login
    subscriptions = subscription_finder.find_using_specific_tenant(tenant, credential)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 815, in find_using_specific_tenant
    client = self._create_subscription_client(credential)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 839, in _create_subscription_client
    **client_kwargs)
TypeError: __init__() got an unexpected keyword argument 'user_agent'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. it can be tested also on centos 8 machines with HA repos enabled, and azure cli repos enabled.

  • Put any pre-requisite steps here…
  • yum install fence-agents-azure-arm
  • yum install azure-cli
  • az login --service-principal --allow-no-subscriptions -u {} -p {} -t {}

Expected Behavior

to be able to login successfully

Environment Summary

Linux-4.18.0-269.el8.x86_64-x86_64-with-centos-8, CentOS Stream 8
Python 3.6.8
Installer: RPM

azure-cli 2.31.0

Additional Context

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jiaslicommented, Dec 28, 2021

would you please elaborate more about the solution (as far as I understood, it would be something similar to the workaround) ?

Ah. “We” here means us, Microsoft. If you check our DEB packages, it actually contains its own python. I am not really sure why the same is not done for the RPM package (it was developed by the previous team years ago), but I will definitely work on this in the future.

Actually, you don’t need to activate the venv for az to work. You can simply launch az in the venv:

docker run -it --rm --workdir /root python bash

python -m venv az-env
az-env/bin/pip install azure-cli
az-env/bin/az --version

You may also add az-env/bin/ to PATH so that az is available everywhere:

export PATH="/root/az-env/bin:$PATH"
az --version
0reactions
imabedalghafercommented, Dec 29, 2021

@jiasli Thank you so much for your help on the case. The tests now are working fine with the provided workaround. please feel free to close the issue or if you would like to keep it open for future reference it is up to you 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot common Azure deployment errors
Error code Mitigation More inform... AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro... AccountPropertyCannotBeSet Check available storage account properties. storageAcco... AnotherOperationInProgress Wait for concurrent operation...
Read more >
What's New - Oracle Linux Yum Server
Oracle Linux with Oracle enterprise-class support is the best Linux operating system (OS) for your enterprise computing needs.
Read more >
fence_azure_arm man page - fence-agents-azure-arm | ManKier
When using network fencing the reboot-action will cause a quick-return once the network has been fenced (instead of waiting for the off-action to...
Read more >
7.9 Release Notes Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7 is available on the following architectures: ... The compat-unixODBC234 package conflicts with the base RHEL 7 unixODBC package....
Read more >
RPM shipped by CentOS BuildSystem <http://bugs.centos.org>
abrt-cli-2.1.11-60.el7.centos.x86_64, Virtual package to make easy default ... fence-agents-azure-arm-4.2.1-41.el7.x86_64, Fence agent for Azure Resource ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found