From d63c000b787e845a65762c6eb2b488c4eec7a44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Fri, 15 Mar 2019 14:32:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E8=85=BE=E8=AE=AF=E4=BA=91ei?= =?UTF-8?q?p=E9=95=BF=E5=BA=A6=E8=B6=85=E8=BF=87=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/util/qcloud/eip.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/util/qcloud/eip.go b/pkg/util/qcloud/eip.go index 8334eaaaa2..520c88503a 100644 --- a/pkg/util/qcloud/eip.go +++ b/pkg/util/qcloud/eip.go @@ -249,6 +249,9 @@ func (region *SRegion) AllocateEIP(name string, bwMbps int, chargeType TInternet if err != nil { return nil, err } + if len(name) > 20 { + name = name[:20] + } if len(addRessSet) > 0 { params["AddressId"] = addRessSet[0] params["AddressName"] = name