Bug 1799034 - take into consideration all instance states when deleting a machine
Summary: take into consideration all instance states when deleting a machine
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.2.z
Assignee: Alberto
QA Contact: Milind Yadav
URL:
Whiteboard:
Depends On: 1798596 1798597 1804596
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-06 13:43 UTC by Alberto
Modified: 2020-03-04 04:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1798596
Environment:
Last Closed: 2020-03-04 04:51:02 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift cluster-api-provider-aws pull 294 None closed Bug 1799034: [release-4.2] take into consideration all instance states for deletion 2020-04-23 11:07:40 UTC
Red Hat Product Errata RHBA-2020:0614 None None None 2020-03-04 04:51:12 UTC

Comment 3 Milind Yadav 2020-02-20 09:51:52 UTC
Description of problem:
In aws instances with a provider state different than running might be leaked when deleting.

Version-Release number of selected component (if applicable):
TESTED ON :
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.2.0-0.nightly-2020-02-19-222048   True        False         17m     Cluster version is 4.2.0-0.nightly-2020-02-19-222048




How reproducible:
100%

Steps to Reproduce:
Create a machineSet.

Expected & Actual :
Machineset created successfully 
[miyadav@miyadav bug1799034]$ oc create -f newmachineset.yml 
machineset.machine.openshift.io/miyadav-2020-c6r79-newmachine-worker-us-east-2a created


Delete the machineSet before the instances get to running.

Expected & Actual :
Machine gets terminated 

[miyadav@miyadav bug1799034]$ oc delete machineset.machine.openshift.io/miyadav-2020-c6r79-newmachine-worker-us-east-2a
machineset.machine.openshift.io "miyadav-2020-c6r79-newmachine-worker-us-east-2a" deleted
[miyadav@miyadav bug1799034]$ oc create -f newmachineset.yml 
machineset.machine.openshift.io/miyadav-2020-c6r79-newmachine-worker-us-east-2a created
[miyadav@miyadav bug1799034]$ oc get machines
NAME                                                       STATE     TYPE        REGION      ZONE         AGE
miyadav-2020-c6r79-master-0                                running   m4.xlarge   us-east-2   us-east-2a   42m
miyadav-2020-c6r79-master-1                                running   m4.xlarge   us-east-2   us-east-2b   42m
miyadav-2020-c6r79-master-2                                running   m4.xlarge   us-east-2   us-east-2c   42m
miyadav-2020-c6r79-newmachine-worker-us-east-2a-vz4jz      pending   m4.large    us-east-2   us-east-2a   5s
miyadav-2020-c6r79-worker-us-east-2a-jq9j6                 running   m4.large    us-east-2   us-east-2a   40m
...
[miyadav@miyadav bug1799034]$ oc delete machineset.machine.openshift.io/miyadav-2020-c6r79-newmachine-worker-us-east-2a
machineset.machine.openshift.io "miyadav-2020-c6r79-newmachine-worker-us-east-2a" deleted
[miyadav@miyadav bug1799034]$ oc get machines
NAME                                                       STATE     TYPE        REGION      ZONE         AGE
miyadav-2020-c6r79-master-0                                running   m4.xlarge   us-east-2   us-east-2a   42m
miyadav-2020-c6r79-master-1                                running   m4.xlarge   us-east-2   us-east-2b   42m
miyadav-2020-c6r79-master-2                                running   m4.xlarge   us-east-2   us-east-2c   42m
miyadav-2020-c6r79-worker-us-east-2a-jq9j6                 running   m4.large    us-east-2   us-east-2a   41m
....



Check aws console.
Expected & Actual :
Instance gets terminated

Comment 5 errata-xmlrpc 2020-03-04 04:51:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0614


Note You need to log in before you can comment on or make changes to this bug.