-
Notifications
You must be signed in to change notification settings - Fork 22
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
Conversation
5c8021c
to
e91f849
Compare
pkg/test/vpc_client/bastion.go
Outdated
return inst, nil | ||
} | ||
|
||
func (vpc *VPC) PrepareBastion(zone string) (*types.Instance, error) { | ||
func (vpc *VPC) PrepareBastionProxy(zone string, cidrIp string) (*types.Instance, error) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
pkg/test/vpc_client/bastion.go
Outdated
return err | ||
} | ||
|
||
err = vpc.DeleteVPCSecurityGroups(true) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
08249ae
to
9ad5419
Compare
1de4d66
to
8f3bfde
Compare
/lgtm |
No description provided.