Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCM-11855 | test: Create bastion with proxy #77

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jameszwang
Copy link
Contributor

No description provided.

@jameszwang jameszwang force-pushed the ocm-11855 branch 2 times, most recently from 5c8021c to e91f849 Compare November 1, 2024 07:52
return inst, nil
}

func (vpc *VPC) PrepareBastion(zone string) (*types.Instance, error) {
func (vpc *VPC) PrepareBastionProxy(zone string, cidrIp string) (*types.Instance, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you run vpc.Clean? Can the proxy bastion be cleaned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean operation will be done in DestroyBastionProxy func. In DestroyBastionProxy, key pair/security group and public subnet will be destroyed, VPC will not be deleted since it may be depended by cluster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jameszwang Please respond rather than just resolve it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, bastion instance and Key pair will be cleaned in DestroyBastionProxy func.

return err
}

err = vpc.DeleteVPCSecurityGroups(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is already cluster proxy start up, I believe this step will fail. Can you have a try?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, deleting security group operation will be failed due to has a dependent object. In fact, deleting VPC subnet has same issue. DestroyBastionProxy func at here only can destroy resources which created in PrepareBastionProxy, it can not delete other resource not created by PrepareBastionProxy since they have dependent object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no updating here but resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove DeleteVPCSecurityGroup and DeleteVPCSubnets operation from DestroyBastionProxy func because they may be failed when have dependent object.

@jameszwang jameszwang force-pushed the ocm-11855 branch 2 times, most recently from 08249ae to 9ad5419 Compare November 6, 2024 08:24
@xueli181114
Copy link
Contributor

/lgtm

@xueli181114 xueli181114 merged commit 7e27b75 into openshift-online:main Nov 13, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants