Azure / open-service-broker-azure

The Open Service Broker API Server for Azure Services
https://osba.sh
MIT License
248 stars 100 forks source link

Child (azure-mysql-5-7-database) stuck in Provisioning if deployed with parent (azure-mysql-5-7-dbms). #727

Closed kyschouv closed 5 years ago

kyschouv commented 5 years ago

I'm trying to deploy a mysql dbms and database at the same time, and while the dbms eventually reaches "Ready", the database is stuck in "Provisioning". Is this a supported operation? Have I misunderstood something?

apiVersion: v1
kind: Namespace
metadata:
  name: test-db
---
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
  namespace: test-db
  name: test-db-server
spec:
  clusterServiceClassExternalName: "azure-mysql-5-7-dbms"
  clusterServicePlanExternalName: "general-purpose"
  parameters:
    serverName: "testdbserver"
    location: centralus
    resourceGroup: "my_rg"
    alias: test-db
    cores: 2
    storage: 5
    backupRetention: 10
    backupRedundancy: local
---
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
  namespace: test-db
  name: test-db
spec:
  clusterServiceClassExternalName: "azure-mysql-5-7-database"
  clusterServicePlanExternalName: "database"
  parameters:
    parentAlias: test-db-server
---
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceBinding
metadata:
  namespace: test-db
  name: test-db
spec:
  instanceRef:
    name: test-db
  secretName: test-db

Here's all I'm seeing in logs (in catalog controller):

I1030 01:21:18.755033       1 controller_instance.go:158] ServiceInstance "test-db/test-db" v1853: Received UPDATE event: {"metadata":{"name":"test-db","namespace":"test-db","selfLink":"/apis/servicecatalog.k8s.io/v1beta1/namespaces/test-db/serviceinstances/test-db","uid":"e6c2ea3a-faac-11e9-b088-662e11c10a96","resourceVersion":"1853","generation":1,"creationTimestamp":"2019-10-30T00:33:32Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"servicecatalog.k8s.io/v1beta1\",\"kind\":\"ServiceInstance\",\"metadata\":{\"annotations\":{},\"name\":\"test-db\",\"namespace\":\"test-db\"},\"spec\":{\"clusterServiceClassExternalName\":\"azure-mysql-5-7-database\",\"clusterServicePlanExternalName\":\"database\",\"parameters\":{\"parentAlias\":\"test-db-server\"}}}\n"},"finalizers":["kubernetes-incubator/service-catalog"]},"spec":{"clusterServiceClassExternalName":"azure-mysql-5-7-database","clusterServicePlanExternalName":"database","clusterServiceClassRef":{"name":"6704ae59-3eae-49e9-82b4-4cbcc00edf08"},"clusterServicePlanRef":{"name":"ec77bd04-2107-408e-8fde-8100c1ce1f46"},"parameters":{"parentAlias":"test-db-server"},"...updateRequests":0},"status":{"conditions":[{"type":"Ready","status":"False","lastTransitionTime":"2019-10-30T00:33:33Z","reason":"Provisioning","message":"The instance is being provisioned asynchronously"}],"asyncOpInProgress":true,"orphanMitigationInProgress":false,"lastOperation":"provisioning","currentOperation":"Provision","reconciledGeneration":0,"observedGeneration":1,"operationStartTime":"2019-10-30T00:33:33Z","inProgressProperties":{"clusterServicePlanExternalName":"database","clusterServicePlanExternalID":"ec77bd04-2107-408e-8fde-8100c1ce1f46","parameters":{"parentAlias":"test-db-server"},"parameterChecksum":"c2c375c2b58805e61d33f519e1ab3729ecc60dd8896eff0698ea49e3b872a372","userInfo":...,"provisionStatus":"","deprovisionStatus":"Required"}}
I1030 01:21:18.755573       1 controller_instance.go:165] ServiceInstance "test-db/test-db" v1853: NOT enqueueing instance because an async operation is in progress

OSBA version: 1.8.3 Kubernetes version: 1.15.4

kyschouv commented 5 years ago

My parentAlias in the child did not match the alias in the parent. A better error message would have been helpful here, but it works fine if I fix that.