SAP / sap-btp-service-operator

SAP BTP service operator enables developers to connect Kubernetes clusters to SAP BTP accounts and to consume SAP BTP services within the clusters by using Kubernetes native tools.
Apache License 2.0
125 stars 51 forks source link

Can not get the UpdateFailed status #310

Closed lin1161 closed 1 year ago

lin1161 commented 1 year ago

I installed BTPSO in my cluster, and created a hana cloud instance via BTPSO, then I tried to update it with an invalid parameter(set memory to 35), I expected to get a status like UpdateFailed, but it is always in UpdateInProgress status. I don't think it is a expected behavior, can somebody help to take a look?

ko8 get serviceinstances             
NAME      OFFERING         PLAN   SHARED   DATACENTER   STATUS             READY   AGE
myhana1   hana-cloud-***   hana                         UpdateInProgress   True    80m

The serviceinstance CR can show an obvious error from service broker Status/Conditions/Message, but the status is always UpdateInProgress (unexpected).

Status:
  Conditions:
    Last Transition Time:  2023-07-26T09:35:52Z
    Message:               request PATCH https://service-manager.cfapps.****.hana.ondemand.com/v1/service_instances/********-****-****-****-************ failed: StatusCode: 502 Body: {"error":"BrokerError","description":"Failed update instance request context: map[clusterid:********-****-****-****-************ global_account_id:********-****-****-****-************ instance_name:myhana1 license_type:SAPDEV namespace:default origin:kubernetes platform:sapcp region:cf-**** service_instance_id:********-****-****-****-************ signature:**********C3YnUFoiHkZFLxtEVvdo5jTtmFLnoLZS/adlAFytBjiQqg+yciRNnPdJYcEUms7bwSvp6wuDswOVyGMG8eFEKt3WDARuJtqjAKz4rwBBPVXLilysHWvqiifcClAQZO0uPTC693NLGHvvFhQJvxAj2WchwaWwvfcRtwpOHbfJmPRM2/Mike8t3tRFHi5etJDsRdUDCfAmByYW1FbxNZqmbls/2W2Me0w3H+m1LdAAd3fY9Jrr00vG/2wrvnMB4S8KX/Fb68FC7h5DuwNgufLkoXbdZdk1nJAmlLN82sOhTFXdG3xnE1MHzRn7BuweB0VarVc0CTfVvxukrSdpMb2wlhWG3S0UVJ78i8qa2Cqnw6b0NW83CahbTVbbhQVSMwy1zVtmqcZICPNZbn/nalATb653zrURIdp7GqmBpO1O7WM2Ml8p5s/yjjpIKsYADpcBAKkPL3P+BDc57pNx5nJGsbdSWN1zZ9Ez3ccrj8d2AeE3NluKi18sbhcmjK4a2SpDLdgyjdfL1WVJYYEV5rq0K5WBBYDv0IE91WoNUtL+b9BDib8SZ/XU/RPDc09Z+/+wvvkXmfveKEilb82TxaY4XORk+UG2vcK4es71yCA38kWCfjNufAmX5MUaqECmkRsOnx4g8y2dTotoT/fmkdKbDF8**********= subaccount_id:********-****-****-****-************ subdomain:i*******-test zone_id:********-****-****-****-************], instanceID: ********-****-****-****-************, planID: ********-****-****-****-************, serviceID: ********-****-****-****-************, acceptsIncomplete: true: Status: 422; ErrorMessage: \u003cnil\u003e; Description: invalid Parameter (memory): Memory 35 for HANA service not valid [ref **********hqIrvZiqBIDcLGlGq]; ResponseError: \u003cnil\u003e","broker_error":{"StatusCode":422,"ErrorMessage":null,"Description":"invalid Parameter (memory): Memory 35 for HANA service not valid [ref **********hqIrvZiqBIDcLGlGq]","ResponseError":null}}

    Observed Generation:   3
    Reason:                UpdateInProgress
    Status:                False
    Type:                  Succeeded
    Last Transition Time:  2023-07-26T09:00:55Z
    Message:               
    Observed Generation:   3
    Reason:                Provisioned
    Status:                True
    Type:                  Ready
  Hashed Spec:             **********dd36c414a5e5ca0147d91d
  Instance ID:             ********-****-****-****-************
  Ready:                   True
TalShorSap commented 1 year ago

Hi, This issue is a known issue and we are just at the end of finishing handling it

The reason you keep getting updateInProgress is that service-manager forward the request to the broker and gets an error - after that service-manager returns a status code 502 and the operator interprets this as a transient error (which means in other words temporary error, and keep trying to update the service instance)

This issue will be fixed in the following days.

lin1161 commented 1 year ago

Hello Tal, Thanks for your quick reply, I remember the known issue you mentioned, but there's something different about the behavior right now, in the past, when this problem occurred, if the operator keeps trying to update the instance, soon it would reach the service manager api request limit: "The allowed request limit of 100 requests has been reached please try again later". But now, seems the sm api request limit is not reached, it still reports the service broker error after 30 mins.

TalShorSap commented 1 year ago

It depends on the environment and the configuration of sm. Any way - in the new solution a better operator rate limit is added

lin1161 commented 1 year ago

Hello Tal, Thanks.