-
Notifications
You must be signed in to change notification settings - Fork 430
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
tenant and client ID are not used from AzureClusterIdentity object for virtualmachineimages client #3569
Comments
/milestone v1.10 |
This is the behavior of I'll set up an AzureClusterIdentity test locally and see what I can figure out. |
I am wondering if i am hitting this issue. tried multiple service principals and subscriptions. Environment
Message: failed to reconcile cluster services: failed to get availability zones: failed to get zones for location westus2: failed to refresh resource sku cache: could not list resource skus: autorest/Client#Do: Preparing request failed: StatusCode=0 -- Original Error: ManagedIdentityCredential authentication failed
GET http://169.254.169.254/metadata/identity/oauth2/token
--------------------------------------------------------------------------------
RESPONSE 503 Service Unavailable
--------------------------------------------------------------------------------
adal: Failed to execute the refresh request. Error = 'Post "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token?api-version=1.0": dial tcp: lookup login.microsoftonline.com on 10.43.0.10:53: server misbehaving'
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#managed-id
Reason: Failed
Severity: Error
Status: False
Type: Ready
Last Transition Time: 2023-05-18T20:16:47Z
Message: Waiting for control plane provider to indicate the control plane has been initialized
Reason: WaitingForControlPlaneProviderInitialized
Severity: Info
Status: False
Type: ControlPlaneInitialized
Last Transition Time: 2023-05-18T20:16:47Z
Message: Scaling up control plane to 3 replicas (actual 0)
Reason: ScalingUp
Severity: Warning
Status: False
Type: ControlPlaneReady
Last Transition Time: 2023-05-18T20:17:05Z
Message: failed to reconcile cluster services: failed to get availability zones: failed to get zones for location westus2: failed to refresh resource sku cache: could not list resource skus: autorest/Client#Do: Preparing request failed: StatusCode=0 -- Original Error: ManagedIdentityCredential authentication failed
GET http://169.254.169.254/metadata/identity/oauth2/token
--------------------------------------------------------------------------------
RESPONSE 503 Service Unavailable
--------------------------------------------------------------------------------
adal: Failed to execute the refresh request. Error = 'Post "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token?api-version=1.0": dial tcp: lookup login.microsoftonline.com on 10.43.0.10:53: server misbehaving'
--------------------------------------------------------------------------------
To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#managed-id
Reason: Failed
Severity: Error
Status: False
Type: InfrastructureReady
Observed Generation: 1
Phase: Provisioning
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Provisioning 3m53s cluster-controller Cluster arcbox-capi-data-288d is Provisioning |
Circling back on above, issue from @likamrat is unrelated (more on root cause in https://kubernetes.slack.com/archives/CEX9HENG7/p1684340022925319) @sonasingh46, @mboersma and I discussed offline, plan is to revert #3474 if @mboersma can't get to a quick fix by end of week |
[1] So spent some time on this to figure out what is going on here. [2] Couple of experiments that I did:
[3] How I hit this while testing workload identity?
So long story short:
|
/reopen This was inadvertently closed by triggering the |
@mboersma: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind bug
[Before submitting an issue, have you checked the Troubleshooting Guide?]
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
The client at this code
https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/main/azure/services/virtualmachineimages/client.go#L52
does not use the tenant ID and client ID that is passed in AzureClusterIdentity object.
What did you expect to happen:
When tenant ID and cluster ID is passed via AzureClusterIdentity, then the values present on AzureClusterIdentity should be used as a precedence over tenant ID and client ID env variables. Or
There should be a way to create client where we can explicitly pass tenant and client ID.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: