Bug 1664595 - [cloud] Create a machine set availabilityZone to a non-existent zone, logs show subnet not exist
Summary: [cloud] Create a machine set availabilityZone to a non-existent zone, logs sh...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.1.0
Assignee: Jan Chaloupka
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-09 09:17 UTC by sunzhaohua
Modified: 2019-06-04 10:41 UTC (History)
1 user (show)

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


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 None None None 2019-06-04 10:41:43 UTC

Description sunzhaohua 2019-01-09 09:17:06 UTC
Description of problem:
Create a machine set availabilityZone to a not exist zone, logs show subnet not exist 

Version-Release number of selected component (if applicable):
$ oc get clusterversion
NAME      VERSION                           AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-0.alpha-2019-01-09-005354   True        False         3h        Cluster version is 4.0.0-0.alpha-2019-01-09-005354

How reproducible:
Always


Steps to Reproduce:
1. Create a machine set availabilityZone to a non-existent zone
apiVersion: cluster.k8s.io/v1alpha1
kind: Machine
metadata:
  finalizers:
  - machine.cluster.k8s.io
  labels:
    sigs.k8s.io/cluster-api-cluster: zhsun
    sigs.k8s.io/cluster-api-machine-role: worker
    sigs.k8s.io/cluster-api-machine-type: worker
  name: zhsun-worker-us-east-2a-zone-not
  namespace: openshift-cluster-api
spec:
  metadata:
    creationTimestamp: null
  providerConfig:
    value:
      ami:
        arn: null
        filters: null
        id: ami-064936a7bd92922ca
      apiVersion: awsproviderconfig.k8s.io/v1alpha1
      credentialsSecret: null
      deviceIndex: 0
      iamInstanceProfile:
        arn: null
        filters: null
        id: zhsun-worker-profile
      instanceType: m4.large
      keyName: null
      kind: AWSMachineProviderConfig
      loadBalancers: null
      metadata:
        creationTimestamp: null
      placement:
        availabilityZone: us-east-2alllll
        region: us-east-2
      publicIp: null
      securityGroups:
      - arn: null
        filters:
        - name: tag:Name
          values:
          - zhsun_worker_sg
        id: null
      subnet:
        arn: null
        filters:
        - name: tag:Name
          values:
          - zhsun-worker-us-east-2a
        id: null
      tags:
      - name: openshiftClusterID
        value: 5cbc3a6b-5641-4638-b8ee-2bdc52d84d73
      - name: kubernetes.io/cluster/zhsun
        value: owned
      userDataSecret:
        name: worker-user-data
  providerSpec: {}
  versions:
    kubelet: ""
2. Check machine-controller logs
$ oc logs -f clusterapi-manager-controllers-7d56dd5857-zvc6r -c machine-controller
I0107 09:29:40.317055       1 actuator.go:109] creating machine
I0107 09:29:40.317065       1 utils.go:151] Falling to providerConfig
I0107 09:29:40.335110       1 instances.go:44] no stopped instances found for machine zhsun-worker-us-east-2a-zone-not
I0107 09:29:40.347964       1 instances.go:131] Using AMI ami-064936a7bd92922ca
I0107 09:29:40.347982       1 instances.go:73] Describing security groups based on filters
I0107 09:29:40.382091       1 instances.go:108] Describing subnets based on filters
E0107 09:29:40.436996       1 actuator.go:103] Machine error: error launching instance: error getting subnet IDs: no subnet IDs were found,
E0107 09:29:40.437011       1 actuator.go:112] error creating machine: error launching instance: error getting subnet IDs: no subnet IDs were found,
I0107 09:29:40.437020       1 actuator.go:161] updating machine conditions
I0107 09:29:40.437245       1 actuator.go:152] status unchanged


Actual results:
Logs show no subnet IDs were found.

Expected results:
Logs show no availabilityZone found.

Additional info:

Comment 1 Jan Chaloupka 2019-01-15 12:01:57 UTC
Upstream PR: https://github.com/openshift/cluster-api-provider-aws/pull/143

Comment 2 sunzhaohua 2019-01-18 07:06:10 UTC
Tested in the new version, still will output like "error getting subnet IDs"

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-0.nightly-2019-01-17-185315   True        False         35m       Cluster version is 4.0.0-0.nightly-2019-01-17-185315


$ oc logs -f clusterapi-manager-controllers-64584db79-d2hq5 -c machine-controller
E0118 06:53:22.126414       1 instances.go:112] error describing availability zones: InvalidParameterValue: Invalid availability zone: [us-east-2all]
	status code: 400, request id: c7686a85-5905-4334-ab8c-3db30f57a76a
E0118 06:33:39.051366       1 actuator.go:104] Machine error: error launching instance: error getting subnet IDs: error describing availability zones: InvalidParameterValue: Invalid availability zone: [us-east-2all]
	status code: 400, request id: 050f3c30-e876-46ae-b89b-1b2c6c29ef20,
E0118 06:33:39.051376       1 actuator.go:113] error creating machine: error launching instance: error getting subnet IDs: error describing availability zones: InvalidParameterValue: Invalid availability zone: [us-east-2all]
	status code: 400, request id: 050f3c30-e876-46ae-b89b-1b2c6c29ef20,

Comment 3 Jan Chaloupka 2019-01-18 11:16:15 UTC
> error creating machine: error launching instance: error getting subnet IDs: error describing availability zones: InvalidParameterValue: Invalid availability zone: [us-east-2all]

That's expected. The error message now contains the reason why the subnet can not be found (due to invalid availability zone).

Comment 5 sunzhaohua 2019-01-25 07:23:12 UTC
Verified per Comment 2 & 3.

Comment 8 errata-xmlrpc 2019-06-04 10:41:38 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:0758


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