azure-cli: All az openshift commands fail with a python traceback with 2.0.66
This is autogenerated. Please review and update as needed.
Describe the bug
All az openshift commands fail with a python traceback. This appeared to start with 2.0.66 and I’ve observed it on both Fedora 30 and RHEL 7.6. In both cases az cli was installed from the Microsoft Azure yum repo. Other az sub-commands do not appear to be affected.
Command Name
az openshift -h
commands such as az openshift scale
are also affected and the traceback is similar.
Errors:
The operation 'azure.cli.command_modules.acs.custom#openshift_scale' is invalid.
Traceback (most recent call last):
python2.7/site-packages/knack/cli.py, ln 206, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 507, in execute
parsed_args = self.parser.parse_args(args)
python2.7/site-packages/knack/parser.py, ln 259, in parse_args
return super(CLICommandParser, self).parse_args(args)
usr/lib64/python2.7/argparse.py, ln 1705, in parse_args
args, argv = self.parse_known_args(args, namespace)
...
azure/cli/core/__init__.py, ln 470, in default_description_loader
op = handler or self.get_op_handler(operation, operation_group=kwargs.get('operation_group'))
azure/cli/core/__init__.py, ln 511, in get_op_handler
raise ValueError("The operation '{}' is invalid.".format(operation))
ValueError: The operation 'azure.cli.command_modules.acs.custom#openshift_scale' is invalid.
To Reproduce:
Install latest az-cli on Fedora 30 or RHEL 7.6. I have not confirmed if other Red Hat/Fedora releases are affected but I can test those if needed.
run: (or any other az openshift command)
az openshift -h
Expected Behavior
no traceback, help information is displayed in the case of az openshift -h
Environment Summary
Linux-5.1.8-300.fc30.x86_64-x86_64-with-fedora-30-Thirty
Python 2.7.16
Shell: bash
azure-cli 2.0.66
Additional Context
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 15 (9 by maintainers)
@marstr Thanks for the quick response, it turns out that I installed a number of python2 packages on both my F30 system and the RHEL 7.6VM as they were required for some testing I was doing. One of those packages broke all the azure-cli openshift commands. There were quite a few packages and dependences and once I removed them I was able to get ‘az openshift -h’ working again. I think you are correct in that it is some sort of installation or packaging issue. I saved the list of packages I removed to “fix” the problem, but at the moment I don’t have they cycles to go through each one to find what broke az openshift. In the F30 case it was something from the distro, in the 7.6 case it came from pip. I can share the list of packages here if you want but if you need to close this out as a one-off installation issue then I understand. Prior to removing the python packages the last version of azcli that worked for me on those two environments was 2.0.65.