Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1746015 - [osp] Machine couldn't be deleted
Summary: [osp] Machine couldn't be deleted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Mike Fedosin
QA Contact: sunzhaohua
URL:
Whiteboard: osp
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-27 13:25 UTC by sunzhaohua
Modified: 2019-10-16 06:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:37:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-api-provider-openstack pull 60 0 None closed Bug 1746015: Return error if instance deletion fails 2020-10-21 18:48:13 UTC
Github openshift cluster-api-provider-openstack pull 61 0 None closed Bug 1746015: provide correct API to machine serialization 2020-10-21 18:48:13 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:38:05 UTC

Description sunzhaohua 2019-08-27 13:25:22 UTC
Description of problem:
Create a machine which couldn't join the cluster, then delete the machine, machine couldn't be deleted. Even add annotation "machine.openshift.io/exclude-node-draining="

Version-Release number of selected component (if applicable):
4.2.0-0.nightly-2019-08-22-153337

How reproducible:
always

Steps to Reproduce:
1. Create a machine, machine created successfully but couldn't join the cluster
apiVersion: machine.openshift.io/v1beta1
kind: Machine
metadata:
  labels:
    machine.openshift.io/cluster-api-cluster: zhsun3-lvlzb
    machine.openshift.io/cluster-api-machine-role: worker
    machine.openshift.io/cluster-api-machine-type: worker
    machine.openshift.io/instance-type: m1.large
    machine.openshift.io/region: regionOne
    machine.openshift.io/zone: nova
  name: zhsun3-lvlzb-worker
  namespace: openshift-machine-api
spec:
  metadata:
    creationTimestamp: null
  providerSpec:
    value:
      apiVersion: openstackproviderconfig.openshift.io/v1alpha1
      cloudName: openstack
      cloudsSecret:
        name: openstack-cloud-credentials
        namespace: openshift-machine-api
      flavor: m1.large
      image: rhcos-42.80.20190815.3
      kind: OpenstackProviderSpec
      metadata:
        creationTimestamp: null
      networks:
      - filter: {}
        subnets:
        - filter:
            name: zhsun3-lvlzb-nodes
            tags: openshiftClusterID=zhsun3-lvlzb
      securityGroups:
      - filter: {}
        name: zhsun3-lvlzb-worker
      serverMetadata:
        Name: zhsun3-lvlzb-worker
        openshiftClusterID: zhsun3-lvlzb
      tags:
      - openshiftClusterID=zhsun3-lvlzb
      trunk: true
      userDataSecret:
        name: worker-user-data

2. Check machine info
$ oc describe machine zhsun3-lvlzb-worker
Status:
  Addresses:
    Address:  192.168.0.50
    Type:     InternalIP
    Address:  zhsun3-lvlzb-worker
    Type:     Hostname
    Address:  zhsun3-lvlzb-worker
    Type:     InternalDNS
Events:       <none>

3. Delete the machine, check machine-controller logs
$ oc delete machine zhsun3-lvlzb-worker
machine.machine.openshift.io "zhsun3-lvlzb-worker" deleted
^C


Actual results:
Macine couldn't be deleted, even add annotation "machine.openshift.io/exclude-node-draining="

I0827 09:06:06.612246       1 controller.go:129] Reconciling Machine "zhsun3-lvlzb-worker"
I0827 09:06:06.612393       1 controller.go:298] Machine "zhsun3-lvlzb-worker" in namespace "openshift-machine-api" doesn't specify "cluster.k8s.io/cluster-name" label, assuming nil cluster
I0827 09:06:06.612422       1 controller.go:193] Reconciling machine "zhsun3-lvlzb-worker" triggers delete
E0827 09:06:08.449162       1 actuator.go:414] Machine error zhsun3-lvlzb-worker: error deleting Openstack instance: Resource not found
E0827 09:06:08.449186       1 controller.go:208] Failed to delete machine "zhsun3-lvlzb-worker": error deleting Openstack instance: Resource not found

Expected results:
Machine could be deleted.

Additional info:

Comment 3 sunzhaohua 2019-09-03 08:41:21 UTC
Verified.

1. Create a machine, machine created successfully but couldn't join the cluster
2. Delete the machine, check machine-controller logs

$ oc delete machine share-0903c-xc62h-worker
machine.machine.openshift.io "share-0903c-xc62h-worker" deleted

I0903 08:38:40.757293       1 controller.go:193] Reconciling machine "share-0903c-xc62h-worker" triggers delete
I0903 08:39:00.168212       1 controller.go:227] Machine "share-0903c-xc62h-worker" deletion successful

Comment 4 errata-xmlrpc 2019-10-16 06:37:54 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-2019:2922


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