huaweicloud / huaweicloud-service-broker

Huawei Cloud Service Broker
Apache License 2.0
18 stars 12 forks source link

Problem with Volume type on RDS Flexible Engine #64

Closed yeplaa closed 5 years ago

yeplaa commented 5 years ago

Hello,

From Openshift Origin, i use huaweicloud-service-broker for provision RDS Mysql 5.7.21 on Flexible Engine OBS.

When I want deploy my ServiceInstance bellow the error generated by the service-broker pod :

{"timestamp":"1543335913.753563881","source":"ServiceBroker","message":"ServiceBroker.provision rds instance opts: {\"name\":\"rdsysqltest\",\"datastore\":{\"type\":\"MySQL\",\"version\":\"5.7.21\"},\"flavorRef\":\"39c59aff-0791-475c-b135-2505c26f9450\",\"volume\":{\"type\":\"SATA\",\"size\":100},\"region\":\"eu-west-0\",\"availabilityZone\":\"eu-west-0a\",\"vpc\":\"5ca053a-194c-4538-8265-0512c691d363\",\"nics\":{\"subnetId\":\"5e52de8f-1641-4525-8f72-d148b87fe0f2\"},\"securityGroup\":{\"id\":\"e37131c1-5464-4fde-991e-b0dd5c8b50e7\"},\"backupStrategy\":{\"startTime\":\"00:00:00\"},\"dbRtPd\":\"Password1234!\",\"ha\":{\"enable\":false,\"replicationMode\":\"\"}}","log_level":0,"data":{}} {"timestamp":"1543335913.804447889","source":"ServiceBroker","message":"ServiceBroker.provision.unknown-error","log_level":2,"data":{"error":"provision rds instance failed. Error: Invalid request due to incorrect syntax or missing required parameters.","instance-details":{"service_id":"275f3e0b-86fd-4303-946c-171374d29150","plan_id":"839f4458-309a-4e05-a069-807e950cf6da","organization_guid":"7d306fb5-ec26-11e8-aea1-0a580a8000b0","space_guid":"28c4800b-ee33-11e8-a51d-fa163ea276c9","context":{"clusterid":"7d306fb5-ec26-11e8-aea1-0a580a8000b0","namespace":"dbms","platform":"kubernetes"},"parameters":{"database_password":"Password1234!","ha_enable":false,"name":"rdsysqltest"}},"instance-id":"cec501c7-f25f-11e8-ad10-0a580a8000af","session":"22"}} {"timestamp":"1543335913.961048603","source":"ServiceBroker","message":"ServiceBroker.Deprovision received. instanceID: cec501c7-f25f-11e8-ad10-0a580a8000af","log_level":0,"data":{}} {"timestamp":"1543335913.962659836","source":"ServiceBroker","message":"ServiceBroker.deprovision.instance-missing","log_level":2,"data":{"error":"instance does not exist","instance-id":"cec501c7-f25f-11e8-ad10-0a580a8000af","session":"23"}}

Bellow my configuration :

mysql-service-instance.yaml :

apiVersion: servicecatalog.k8s.io/v1beta1 kind: ServiceInstance metadata: name: essaiii namespace: dbms spec: clusterServiceClassExternalName: rds-mysql clusterServicePlanExternalName: 5.7.21 parameters: name: "rdsysqltest" database_password: "Password1234!" ha_enable: false

config.json (only part of the file) :

        "cloud_credentials": {
            "auth_url": "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com",
            "user_name": "<myusername>",
            "password": "<mypassword>",
             "domain_name": "OCB0001982",
             "tenant_id": "<mytenant_id>",
             "tenant_name": "<mytetant_name>",
             "region": "eu-west-0",
             "access_key": "<myaccess_key>",
             "secret_key": "<mysecret_key>"

                        "id": "839f4458-309a-4e05-a069-807e950cf6da",
                        "name": "5.7.21",
                        "description": "RDS MySQL 5.7.21",
                        "metadata": {
                            "parameters": {
                                "datastore_type": "MySQL",
                                "datastore_version": "5.7.21",
                                "speccode": "rds.mysql.s1.xlarge",
                                "volume_type": "SATA",
                                "volume_size": 100,
                                "availability_zone": "eu-west-0a",
                                "vpc_id": "<vpc_id>",
                                "subnet_id": "<subnet_id>",
                                "security_group_id": "<security_group>",
                                "database_username": "root"
                            }

On Flexible Engine, i activated "Cloud Trace Service" for debug my problem. It indicates the Volume type is invalid :

deployment_with_huaweicloud-service-broker

For a deployment with the Console that works, the key is "ioType" and not "type" :

deployment_with_console

It's not possible to modify the type on config.json File, Otherwise there is the following error :

{"timestamp":"1543398210.162670135","source":"ServiceBroker","message":"ServiceBroker.provision.unknown-error","log_level":2,"data":{"error":"provision rds instance failed. Error: Missing input for argument [Type]","instance-details":{"service_id":"275f3e0b-86fd-4303-946c-171374d29150","plan_id":"839f4458-309a-4e05-a069-807e950cf6da","organization_guid":"7d306fb5-ec26-11e8-aea1-0a580a8000b0","space_guid":"28c4800b-ee33-11e8-a51d-fa163ea276c9","context":{"clusterid":"7d306fb5-ec26-11e8-aea1-0a580a8000b0","namespace":"dbms","platform":"kubernetes"},"parameters":{"database_password":"Password1234!","ha_enable":false,"name":"rdsysqltest"}},"instance-id":"10b27397-f2f2-11e8-ad10-0a580a8000af","session":"3"}}

Do you have an idea?

Thank's Loïc

edisonxiang commented 5 years ago

hi, thanks for your issue.

Could you try to add the following parameter in the mysql-service-instance.yaml?

volume_type: “SSD”

Or

volume_type: “SAS”

The parameter in yaml will replace the one in the config.json.

Thanks very much.

yeplaa commented 5 years ago

Hi edisonxiang,

Thank's for your reply. With this values of volume_type key, i have the same errors :

From the broker :

  message":"ServiceBroker.provision.unknown-error","log_level":2,"data":{"error":"provision rds instance     failed. Error: Invalid request due to incorrect syntax or missing required parameters.","instance-details"

From the Cloud Trace Service on FE :

"response": {
    "errCode": "RDS.5008",
    "externalMessage": "Invalid Volume type."
},
edisonxiang commented 5 years ago

Hi @yeplaa I am sorry to misdirect you.

edisonxiang commented 5 years ago

Could you try the value of volume_type like below?

volume_type: “COMMON”
or
volume_type: “HIGH”
or
volume_type: “ULTRAHIGH”

Specifies the volume type. Valid value: It must be COMMON (SATA), HIGH (SAS), or ULTRAHIGH (SSD) and is case-sensitive.

https://support.huaweicloud.com/en-us/api-rds/en-us_topic_0032347785.html#en-us_topic_0032347785__table10656503

https://github.com/huaweicloud/huaweicloud-service-broker/blob/master/openshift/deploy/config.json#L74

WayneFromHuawei commented 5 years ago

Hi, yeplaa

the value for the volume_type parameters is defined here in the online help doc: https://docs.prod-cloud-ocb.orange-business.com/en-us/api/rds/en-us_topic_0032347785.html

image

yeplaa commented 5 years ago

Hi Wayne, edisonxiang,

With uppercase "COMMON" or "ULTRAHIGH" values, it's works. Yet I tried the last week with the default value "COMMON" of config.json file, and it did not work.. No doubt I had a concern elsewhere.. Now, it's works.

Thank's for your help. Loïc