diff --git a/cmd/cnivpc/rpc.go b/cmd/cnivpc/rpc.go index 8e703d3..c46a830 100644 --- a/cmd/cnivpc/rpc.go +++ b/cmd/cnivpc/rpc.go @@ -228,7 +228,7 @@ func getObjectIDforSecondaryIP() (string, error) { } req := cli.NewDescribeUHostInstanceRequest() - req.UHostIds = []string{} + req.UHostIds = []string{instanceId} resp, err := cli.DescribeUHostInstance(req) if err != nil || len(resp.UHostSet) == 0 { log.Errorf("DescribeUHostInstance for %v failed, %v", instanceId, err) diff --git a/pkg/ipamd/uapi.go b/pkg/ipamd/uapi.go index 97777ed..27b0811 100644 --- a/pkg/ipamd/uapi.go +++ b/pkg/ipamd/uapi.go @@ -157,7 +157,7 @@ func (s *ipamServer) getObjectIDforSecondaryIp() (string, error) { return "", err } req := cli.NewDescribeUHostInstanceRequest() - req.UHostIds = []string{} + req.UHostIds = []string{instanceId} resp, err := cli.DescribeUHostInstance(req) if err != nil || len(resp.UHostSet) == 0 { klog.Errorf("DescribeUHostInstance for %v failed, %v", instanceId, err)