cloudfoundry / bosh-alicloud-cpi-release

BOSH Alibaba CPI
Apache License 2.0
32 stars 20 forks source link

environment_bosh_group should not exceed 128 characters #149

Closed seifertdan closed 2 years ago

seifertdan commented 2 years ago

Hi,

you made the environment_bosh_group a required tag. This introduced some problems because it is not possible to override it (you can add a tag called environment_bosh_group to the bosh manifest but this will result in a Duplicate.TagKey error). There is also no check whether the value of environment_bosh_group exceeds 128 characters. The API Reference for tag Tag.N.Value states that the tag value "must be 1 to 128 characters in length" and it is not flagged as required parameter also.

In our setup we have productive deployments where director-name, deployment-name and job-name together exceed 128 characters and it is impossible to change it. As a workaround we downgraded again to version 31.0.0.

Could you please evaluate the length of registryEnv.Bosh.Group and truncate it or point us in the direction how to set registryEnv.Bosh.Group by ourselves?

Kind regards, Daniel

Errormessages:

Error: CPI error 'Bosh::Clouds::CloudError' with message 'create instance failed with input={"Scheme":"HTTPS","Method":"POST", ... ,"Tag.3.Key":"environment_bosh_group","Tag.3.Value":"XXX-XX-XX-XXXXXXX-XXXX-XXXXX-XXXXXXX-s704f9fea09324269b5d771f138b9ac94-XXX-XX-XX-XXXXXXX-s704f9fea09324269b5d771f138b9ac94-XXXXX-XXXXX", ... } : SDK.ServerError
ErrorCode: InvalidTagValue.Malformed
Recommend: https://error-center.aliyun.com/status/search?Keyword=InvalidTagValue.Malformed&source=PopGw
RequestId: XXXXXXXX-XXXX-XXXX-917B-AF1E5A909F43
Message: The specified Tag.n.Value is not valid.' in 'create_vm' CPI method (CPI request ID: 'cpi-936455')
"Tag": [
    {
        "Value": "XXXXX-XXXXXXXX-XXXXX-danielneedsclusterwith34character",
        "Key": "environment_bosh_group"
    },
    {
        "Value": "XXX-XX-XX-XXXXXXX-XXXX-XXXXX-XXXXXXX-danielneedsclusterwith34character-XXX-XX-XX-XXXXXXX-danielneedsclusterwith34character-XXXXXXXXX",
        "Key": "environment_bosh_group"
    }
],
--> ErrorCode: Duplicate.TagKey
Recommend: https://error-center.aliyun.com/status/search?Keyword=Duplicate.TagKey&source=PopGw
RequestId: XXXXXXXX-XXXX-XXXX-99E0-7B4F7DFBB0AD
Message: The Tag.N.Key contain duplicate key.' in 'create_vm' CPI method (CPI request ID: 'cpi-919803')
xiaozhu36 commented 2 years ago

HI @seifertdan This issue has been fixed by #150 and #151 . A new release v44.0.0 has been released. Please have a check.