Skip to content

[Tencent: SecurityGroup] Clear status if an error occurs after creation. #1476

@powerkimhub

Description

@powerkimhub

@MZC-CSC


  • 상황을 겪지는 않았지만,
  • 다음 2가지 코드 블록의 메시지를 보면 잠재적인 문제가 있습니다.
  • 확인 부탁 드립니다.

if err != nil && err.(*tencentError.TencentCloudSDKError).GetCode() != taglib.RESOURCEINUSE_TAGDUPLICATE {
msg := "createTag error has returned: " + err.Error() + " but, CreateSecurity is success.."
cblogger.Error(msg)
return securityInfo, err
}

if err != nil {
msg := "attachTag error has returned: " + err.Error() + " but, CreateSecurity is success.."
cblogger.Error(msg)
return securityInfo, err
}


[잠재적인 문제]

  • CSP에는 SG가 생성되고, Spider 서버는 에러 처리를 할 것이므로, 등록 되지 않음
  • → CSP에 사용되지 않는 SG가 쌓이게 됨.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions