Azure / OpenShift

Azure Red Hat OpenShift
https://docs.microsoft.com/azure/openshift/intro-openshift
MIT License
113 stars 37 forks source link

az aro wait returns "'AzureRedHatOpenShiftClient' object has no attribute 'get'" error after az cli update #311

Open nastacio opened 1 year ago

nastacio commented 1 year ago

After upgrading az CLI to version 2.49 (other users are reporting this as early as of 2.45) there az aro wait CLI is returning an error:

AttributeError: 'AzureRedHatOpenShiftClient' object has no attribute 'get'

The complete error stack is:

+ az aro wait --name ... --resource-group ... --created
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: 'AzureRedHatOpenShiftClient' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 402, in handler
    return self.wait(command_args, cli_ctx=self.cli_ctx, getter=getter)
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 431, in wait
    instance = getter(**command_args)
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "/usr/lib64/az/lib/python3.9/site-packages/azure/mgmt/redhatopenshift/v2022_09_04/operations/_open_shift_clusters_operations.py", line 528, in get
    template_url=self.get.metadata["url"],
AttributeError: 'AzureRedHatOpenShiftClient' object has no attribute 'get'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

AZ version:

az version
{
  "azure-cli": "2.49.0",
  "azure-cli-core": "2.49.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {}
}

I am running the CLI installed with the following the instructions at: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=dnf, subsection "For RHEL 8 or CentOS Stream 8":

rpm --import https://packages.microsoft.com/keys/microsoft.asc \
&& dnf install https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm -y \
&& dnf install azure-cli -y