Skip to content

Commit c2bbd84

Browse files
Changing the MTPNC error message
1 parent 6274f99 commit c2bbd84

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cns/middlewares/k8sSwiftV2.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var (
2828
errGetMTPNC = errors.New(NetworkNotReadyErrorMsg + " - failed to get MTPNC")
2929
errInvalidSWIFTv2NICType = errors.New("invalid NIC type for SWIFT v2 scenario")
3030
errInvalidMTPNCPrefixLength = errors.New("invalid prefix length for MTPNC primaryIP, must be 32")
31-
errMTPNCTerminating = errors.New("MTPNC in terminating state")
31+
errMTPNCDeleting = errors.New(NetworkNotReadyErrorMsg + "found mtpnc for previous pod pending deletion, waiting for new mtpnc to be ready")
3232
)
3333

3434
type K8sSWIFTv2Middleware struct {
@@ -55,8 +55,8 @@ func (k *K8sSWIFTv2Middleware) GetPodInfoForIPConfigsRequest(ctx context.Context
5555
if respCode != types.Success {
5656
return nil, respCode, message
5757
}
58-
if mtpnc.IsTerminating() {
59-
return nil, types.UnexpectedError, errMTPNCTerminating.Error()
58+
if mtpnc.IsDeleting() {
59+
return nil, types.UnexpectedError, errMTPNCDeleting.Error()
6060
}
6161
// update ipConfigRequest
6262
respCode, message = k.UpdateIPConfigRequest(mtpnc, req)

crd/multitenancy/api/v1alpha1/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ func (m *MultitenantPodNetworkConfig) IsReady() bool {
1010
return !reflect.DeepEqual(m.Status, MultitenantPodNetworkConfigStatus{})
1111
}
1212

13-
func (m *MultitenantPodNetworkConfig) IsTerminating() bool {
13+
func (m *MultitenantPodNetworkConfig) IsDeleting() bool {
1414
return !m.DeletionTimestamp.IsZero()
1515
}

0 commit comments

Comments
 (0)