Hey everyone I'm trying out Pulumi first time and ...
# general
m
Hey everyone I'm trying out Pulumi first time and is running into some issues. Wrote a simple go program to provision an ARO cluster following this article as a reference. https://www.pulumi.com/registry/packages/azure-native/api-docs/redhatopenshift/openshiftcluster/ I am creating resource group, vnet, subnets etc. before creating the aro cluster resource. Issue I'm having is cluster provisioning just happens partially. I see the resource created in azure portal but dont see any infra resources. I have tested the steps in my go program with az cli commands and I'm able to provision the ARO cluster. So am sure its an issue with the provider. Here is the error. Can anyone help?
Copy code
Diagnostics:
  pulumi:pulumi:Stack (create-aro-cluster-dev):
    error: update failed
    error: an unhandled error occurred: program failed:
    waiting for RPCs: rpc error: code = Unknown desc = invocation of azure-native:redhatopenshift:listOpenShiftClusterAdminCredentials returned an error: error reading from server: read tcp 127.0.0.1:54443->127.0.0.1:54440: use of closed network connection

  azure-native:redhatopenshift:OpenShiftCluster (aro-demo):
    error: 1 error occurred:
    	* Code="InternalServerError" Message="Internal server error."
Looking at the docs API version shows 2020-04-30 that seems like a date? If there is another channel for aro specific issues let me know. Can definitely use your help. Working with a customer who is in the middle of infra as code journey so it would be great to have this working end to end. I've tried granting
error message itself seems misleading IMO, i would expect the credential retrieval happening after cluster itself is provisioned and I can tell by looking in Azure portal its not
also I'm testing everything locally with pulumi cli
b
hey, this looks to be an error being returned from the Azure API. I’m not sure what we could do here, there’s an issue open on the azure API spec that looks similar: https://github.com/Azure/azure-rest-api-specs/issues/22514
you might also read this that mentions sometimes ARO clusters fail to create if you hit limits: https://learn.microsoft.com/en-us/answers/questions/602565/aro-creation-fails-with-internal-server-error-and
m
Yeah I got the quota limits increased. As I mentioned in the thread the steps in the go program I can do the same with az cli commands and can provision the cluster with no issues
also another follow up question I have is when I run az aro create it will create an additional resource group and all infra resources (compute, network, storage) are provisioned and command also seem to grant contributor permission on that resource group. But when I provision the cluster with pulumi SDK it seem to expect the ResourceGroup specified so I ended up including provisioning of that and granting contributor permission on that resource group to service principal. I even tried granting it at subscription scope but still no luck
b
I can do the same with az cli commands and can provision the cluster with no issues
If you could open an issue with the code you’re using to provision we can take a look
m
This is the repo where you can find the code https://github.com/rprakashg-redhat/create-aro-cluster
you'll need to update the stack file before trying it
b
Could you file a GitHub issue in the azure native repo
m
I basically tried to convert steps i take today to create aro cluster using az cli. Few changes are around creation of cluster resource group and assigning contributor permission to service principal because the NewOpenShiftCluster method was requiring me to pass the ResourceGroupId with ClusterProfileArgs. With az aro create this was something that the command itself took care of it
Sorry there is not much documentation also needs some cleanup but just been trying to get this working end to end
I had already done that before I joined the slack https://github.com/pulumi/pulumi-azure-native/issues/2252