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

INTLY-8162 cleanup rhmi vpc #13

Conversation

austincunningham
Copy link
Member

@austincunningham austincunningham commented Jun 26, 2020

JIRA
https://issues.redhat.com/browse/INTLY-8162

Verification

Using a byoc cluster run cloud-resource-operator to create the new network resources with the following steps.

  • Log into the cluster using ocm_cluster_login <cluster-name>
  • Run `make cluster/prepare NAMESPACE=
  • Run make cluster/seed/managed/postgres
  • Run make cluster/seed/managed/redis
  • Run make run

Verify that the expected resources are created in aws. e.g. (in ec2: vpc, vpcpeering, routetable, 2 subnets, security groups, in rds: subnetgroup, rds, in elasticache: elasticache cluster, subnetgroup) with the tag RHMI Cloud Resource <ResourceType>

  • Stop CRO (this step is required or it will continually reconcile and create new resources as cluster-service deletes them)

  • Run make build/cli for this pr

  • Run ./cluster-service cleanup <clusterid> --dry-run=false --watch

The expected outcome is that the cli will loop on has dependencies and cannot be deleted until the dependencies get deleted. Eventually all dependency resources will be deleted and the vpc will be last resource to be deleted.
E.g.

+-----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+--------+----------+
|                                                    ID                                                     |                           NAME                            | ACTION |  STATUS  |
+-----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+--------+----------+
| arn:aws:rds:eu-west-1:485026278258:db:mwcolabbyocvwm48cloudresourceoperat-snyu                            | mwcolabbyocvwm48cloudresourceoperat-snyu                  | delete | complete |
| arn:aws:rds:eu-west-1:485026278258:subgrp:mwcolabbyocvwm48subnetgroup                                     | mwcolabbyocvwm48subnetgroup                               | delete | complete |
| mwcolabbyocvwm48cloudresourceoperat-lohz                                                                  | elasticache Replication group                             | delete | complete |
| subnetgroup:mwcolabbyocvwm48subnetgroup                                                                   | elasticache subnet group                                  | delete | complete |
| arn:aws:rds:eu-west-1:485026278258:snapshot:mwcolabbyocvwm48cloudresourceoperat-rrq4                      | mwcolabbyocvwm48cloudresourceoperat-rrq4                  | delete | complete |
| arn:aws:rds:eu-west-1:485026278258:snapshot:rds:mwcolabbyocvwm48cloudresourceoperat-snyu-2020-06-30-14-46 | mwcolabbyocvwm48cloudresourceoperat-snyu-2020-06-30-14-46 | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc-peering-connection/pcx-0f8f883bf3cb0df06                           | pcx-0f8f883bf3cb0df06                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc-peering-connection/pcx-0c300547a4c1a4ab2                           | pcx-0c300547a4c1a4ab2                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc-peering-connection/pcx-015fdd2ec9065aa9a                           | pcx-015fdd2ec9065aa9a                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc-peering-connection/pcx-0cb3c1d893da46e3f                           | pcx-0cb3c1d893da46e3f                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc-peering-connection/pcx-09218faea7c9c8005                           | pcx-09218faea7c9c8005                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc-peering-connection/pcx-05bdb4dd1e24ccee0                           | pcx-05bdb4dd1e24ccee0                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc-peering-connection/pcx-0bc25dcadff6cc0eb                           | pcx-0bc25dcadff6cc0eb                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:subnet/subnet-029c73efb1edc8c02                                        | subnet-029c73efb1edc8c02                                  | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:subnet/subnet-06492de38839959b5                                        | subnet-06492de38839959b5                                  | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:security-group/sg-004d2457414c2feaf                                    | sg-004d2457414c2feaf                                      | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:route-table/rtb-0141f4b1eb1d99abe                                      | rtb-0141f4b1eb1d99abe                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:route-table/rtb-099e94a7d8c5ac7da                                      | rtb-099e94a7d8c5ac7da                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:route-table/rtb-0be90165e3db9786f                                      | rtb-0be90165e3db9786f                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:route-table/rtb-0bd8e571705310954                                      | rtb-0bd8e571705310954                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:route-table/rtb-065a2136d4ea51ca0                                      | rtb-065a2136d4ea51ca0                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:route-table/rtb-0f7bd08b6396ab2fd                                      | rtb-0f7bd08b6396ab2fd                                     | delete | complete |
| arn:aws:ec2:eu-west-1:485026278258:vpc/vpc-0fe57927411acf86c                                              | vpc-0fe57927411acf86c                                     | delete | complete |
+-----------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+--------+----------+

@laurafitzgerald laurafitzgerald force-pushed the INTLY-8162-cleanup-rhmi-vpc branch from 1b44a35 to ba6ab1d Compare July 1, 2020 12:52
@laurafitzgerald laurafitzgerald changed the title WIP:INTLY-8162 cleanup rhmi vpc INTLY-8162 cleanup rhmi vpc Jul 1, 2020
@austincunningham austincunningham marked this pull request as ready for review July 1, 2020 12:57
@laurafitzgerald laurafitzgerald force-pushed the INTLY-8162-cleanup-rhmi-vpc branch from ba6ab1d to 7957be0 Compare July 1, 2020 13:01
Copy link

@dimitraz dimitraz left a comment

Choose a reason for hiding this comment

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

Looks good just a few small comments!

@laurafitzgerald laurafitzgerald force-pushed the INTLY-8162-cleanup-rhmi-vpc branch from 40ca439 to 2409219 Compare July 2, 2020 09:52
Copy link
Member

@ciaranRoche ciaranRoche left a comment

Choose a reason for hiding this comment

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

Few comments inline

@laurafitzgerald laurafitzgerald force-pushed the INTLY-8162-cleanup-rhmi-vpc branch 5 times, most recently from 2234e45 to a6b5b01 Compare July 2, 2020 15:50
Copy link
Member

@ciaranRoche ciaranRoche left a comment

Choose a reason for hiding this comment

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

Just one comment in line, also out of curiosity what was changed to cause so many changes to the vendor files?

Copy link
Contributor

@aidenkeating aidenkeating left a comment

Choose a reason for hiding this comment

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

Small comments

@laurafitzgerald laurafitzgerald force-pushed the INTLY-8162-cleanup-rhmi-vpc branch from a6b5b01 to 659453c Compare July 3, 2020 07:40
- adding tests for those
- update the readme run section

Co-authored-by: laurafitzgerald <[email protected]>
@laurafitzgerald laurafitzgerald force-pushed the INTLY-8162-cleanup-rhmi-vpc branch from 659453c to 50786c7 Compare July 3, 2020 07:50
@laurafitzgerald
Copy link
Contributor

Just one comment in line, also out of curiosity what was changed to cause so many changes to the vendor files?

Answered above. We should be good now. 👍

Copy link
Contributor

@aidenkeating aidenkeating left a comment

Choose a reason for hiding this comment

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

Looks good 👍 Just trying to find somewhere to verify now

@aidenkeating
Copy link
Contributor

Verifying against vpc-testing

Copy link
Member

@ciaranRoche ciaranRoche left a comment

Choose a reason for hiding this comment

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

👍

@laurafitzgerald laurafitzgerald merged commit 1704305 into integr8ly:master Jul 6, 2020
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.

5 participants