File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
28
28
"github.com/aws/aws-sdk-go-v2/service/ec2/types"
29
29
"github.com/haproxytech/client-native/v5/configuration"
30
30
"github.com/haproxytech/client-native/v5/models"
31
+
31
32
"github.com/haproxytech/dataplaneapi/haproxy"
32
33
"github.com/haproxytech/dataplaneapi/log"
33
34
)
@@ -255,6 +256,8 @@ func (a *awsInstance) updateServices(api *ec2.Client) (err error) {
255
256
var sn string
256
257
sn , err = a .serviceNameFromEC2 (i )
257
258
if err != nil {
259
+ a .logErrorf ("unable to retrieve service name for the instance %s" , * i .InstanceId )
260
+
258
261
continue
259
262
}
260
263
// creating empty service in case it isn't there
@@ -268,6 +271,13 @@ func (a *awsInstance) updateServices(api *ec2.Client) (err error) {
268
271
}
269
272
}
270
273
instanceID := aws .ToString (i .InstanceId )
274
+
275
+ if _ , portErr := mapService [sn ].instancePortFromEC2 (i ); portErr != nil {
276
+ a .logErrorf ("unable to retrieve service port for the instance %s" , * i .InstanceId )
277
+
278
+ continue
279
+ }
280
+
271
281
mapService [sn ].instances [instanceID ] = i
272
282
}
273
283
}
You can’t perform that action at this time.
0 commit comments