Bug 2047255

Summary: alibaba: resourceGroupID not found
Product: OpenShift Container Platform Reporter: Jan Safranek <jsafrane>
Component: InstallerAssignee: aos-install
Installer sub component: openshift-installer QA Contact: Jianli Wei <jiwei>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: husun
Version: 4.10   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:42:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Safranek 2022-01-27 13:22:49 UTC
Version: 4.10.0-0.ci.test-2022-01-27-113354
Platform: Alibaba
IPI

My install-config:

platform:
  alibabacloud:
    region: us-east-1
    resourceGroupID: jsafrane-1-9wxff-rg

The installer says:

DEBUG         Loading Platform...                  
DEBUG       Loading Pull Secret...                 
DEBUG       Loading Platform...                    
FATAL failed to fetch Master Machines: failed to load asset "Install Config": platform.alibabacloud.resourceGroupID: Not found: "jsafrane-1-9wxff-rg" 

The resource group exists and is not being deleted! When I specify rg-acfnxrgr6qtm3mq (="default" group), it works.

I noticed we have larger nr. of resource groups in our account. This lists only the first 10 groups out of 100, without my group:

$ aliyun resourcemanager  ListResourceGroups --endpoint resourcemanager.us-east-1.aliyuncs.com

This lists all of them, incl. my group:
$ aliyun resourcemanager  ListResourceGroups --endpoint resourcemanager.us-east-1.aliyuncs.com --PageSize 100

I wonder if the installer fetches all pages or uses just the first one.

Comment 1 Jan Safranek 2022-01-27 13:51:47 UTC
I tried also resource group ID, with the same result: Not found: "rg-aekzazhpeojxoxy". "jsafrane-1-9wxff-rg" above is resource group name from an experiment when I got desperate.

Comment 2 husun 2022-01-27 14:46:06 UTC
Fix it on the PR https://github.com/openshift/installer/pull/5584

Comment 5 Jianli Wei 2022-01-29 07:28:54 UTC
>(1) to reproduce issue with older version, use a resource group which is after the 10th OK ones (e.g. the 11th)
$ openshift-install version
openshift-install 4.10.0-0.nightly-2022-01-26-234447
built from commit bd0d3e6071f76c84c8e4f0a7b642054fde5f6fe1
release image registry.ci.openshift.org/ocp/release@sha256:694c18617c3ba2d8b9fa2cfd5ddf19919603f6179fe630ccf1a5f25b84d74d1d
release architecture amd64
$ yq e .platform work/install-config.yaml
alibabacloud:
  region: cn-hangzhou
  resourceGroupID: rg-aek2wbixf4ugkqi
$ yq e .credentialsMode work/install-config.yaml 
Manual
$ openshift-install create manifests --dir work
FATAL failed to fetch Master Machines: failed to load asset "Install Config": platform.alibabacloud.resourceGroupID: Not found: "rg-aek2wbixf4ugkqi"
$ 

>(2) tested with 4.10.0-0.nightly-2022-01-29-015515, no the error of resourceGroupID not found
$ aliyun --config-path ${ALI_CN_CONFIG} resourcemanager ListResourceGroups --Status OK --output cols=CreateDate,Name,Id,Status rows=ResourceGroups.ResourceGroup[]
CreateDate                | Name                | Id                 | Status
----------                | ----                | --                 | ------
2018-11-15T17:44:30+08:00 | default             | rg-acfmxbsv4cokgri | OK
2022-01-27T15:18:21+08:00 | preserve-jiwei-rg   | rg-aekzg4dlbv6dajq | OK
2022-01-27T15:38:44+08:00 | preserve-jiwei02-rg | rg-aek2mh6fs4yz25y | OK
2022-01-27T17:23:23+08:00 | preserve-jiwei03-rg | rg-aekzozxc35bz7sa | OK
2022-01-28T16:53:30+08:00 | placeholder01       | rg-aek2qgs3hayvpdi | OK
2022-01-28T16:53:40+08:00 | placeholder02       | rg-aek3cns25mf7q6i | OK
2022-01-28T16:53:51+08:00 | placeholder03       | rg-aekz3pmy7fr76mq | OK
2022-01-28T16:54:01+08:00 | placeholder04       | rg-aek2phf2kesvana | OK
2022-01-28T16:54:10+08:00 | placeholder05       | rg-aek2xfmt6ahdtry | OK
2022-01-28T16:54:21+08:00 | placeholder06       | rg-aek2hbco2t7im4a | OK

$ aliyun --config-path ${ALI_CN_CONFIG} resourcemanager ListResourceGroups --Status OK --PageSize 20 --output cols=CreateDate,Name,Id,Status rows=ResourceGroups.ResourceGroup[]
CreateDate                | Name                | Id                 | Status
----------                | ----                | --                 | ------
2018-11-15T17:44:30+08:00 | default             | rg-acfmxbsv4cokgri | OK
2022-01-27T15:18:21+08:00 | preserve-jiwei-rg   | rg-aekzg4dlbv6dajq | OK
2022-01-27T15:38:44+08:00 | preserve-jiwei02-rg | rg-aek2mh6fs4yz25y | OK
2022-01-27T17:23:23+08:00 | preserve-jiwei03-rg | rg-aekzozxc35bz7sa | OK
2022-01-28T16:53:30+08:00 | placeholder01       | rg-aek2qgs3hayvpdi | OK
2022-01-28T16:53:40+08:00 | placeholder02       | rg-aek3cns25mf7q6i | OK
2022-01-28T16:53:51+08:00 | placeholder03       | rg-aekz3pmy7fr76mq | OK
2022-01-28T16:54:01+08:00 | placeholder04       | rg-aek2phf2kesvana | OK
2022-01-28T16:54:10+08:00 | placeholder05       | rg-aek2xfmt6ahdtry | OK
2022-01-28T16:54:21+08:00 | placeholder06       | rg-aek2hbco2t7im4a | OK
2022-01-28T16:56:00+08:00 | placeholder07       | rg-aek2wbixf4ugkqi | OK

$ 
$ openshift-install version
openshift-install 4.10.0-0.nightly-2022-01-29-015515
built from commit 4fc9fa88c22221b6cede2456b1c33847943b75c9
release image registry.ci.openshift.org/ocp/release@sha256:b6bded497818f2e07401988576f15c62cd6fe45c385d177b50a43d6dabaf4524
release architecture amd64
$ openshift-install create install-config --dir work
? SSH Public Key /home/fedora/.ssh/openshift-qe.pub
? Platform alibabacloud
? Region cn-hangzhou
? Base Domain alicloud-cn.devcluster.openshift.com
? Cluster Name jiwei-610
? Pull Secret [? for help] ****
INFO Install-Config created in: work
$ vim work/install-config.yaml 
$ yq e .platform work/install-config.yaml 
alibabacloud:
  region: cn-hangzhou
  resourceGroupID: rg-aek2wbixf4ugkqi
$ yq e .credentialsMode work/install-config.yaml 
Manual
$ yq e .metadata work/install-config.yaml 
creationTimestamp: null
name: jiwei-610
$ openshift-install create manifests --dir work
INFO Consuming Install Config from target directory 
INFO Manifests created in: work/manifests and work/openshift 
$ tree work
work
├── manifests
│   ├── cloud-provider-config.yaml
│   ├── cluster-config.yaml
│   ├── cluster-dns-02-config.yml
│   ├── cluster-infrastructure-02-config.yml
│   ├── cluster-ingress-02-config.yml
│   ├── cluster-network-01-crd.yml
│   ├── cluster-network-02-config.yml
│   ├── cluster-proxy-01-config.yaml
│   ├── cluster-scheduler-02-config.yml
│   ├── cvo-overrides.yaml
│   ├── kube-cloud-config.yaml
│   ├── kube-system-configmap-root-ca.yaml
│   ├── machine-config-server-tls-secret.yaml
│   └── openshift-config-secret-pull-secret.yaml
└── openshift
    ├── 99_kubeadmin-password-secret.yaml
    ├── 99_openshift-cluster-api_master-machines-0.yaml
    ├── 99_openshift-cluster-api_master-machines-1.yaml
    ├── 99_openshift-cluster-api_master-machines-2.yaml
    ├── 99_openshift-cluster-api_master-user-data-secret.yaml
    ├── 99_openshift-cluster-api_worker-machineset-0.yaml
    ├── 99_openshift-cluster-api_worker-machineset-1.yaml
    ├── 99_openshift-cluster-api_worker-machineset-2.yaml
    ├── 99_openshift-cluster-api_worker-machineset-3.yaml
    ├── 99_openshift-cluster-api_worker-user-data-secret.yaml
    ├── 99_openshift-machineconfig_99-master-ssh.yaml
    ├── 99_openshift-machineconfig_99-worker-ssh.yaml
    └── openshift-install-manifests.yaml

2 directories, 27 files
$

Comment 8 errata-xmlrpc 2022-03-10 16:42:52 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 (Moderate: OpenShift Container Platform 4.10.3 security update), 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/RHSA-2022:0056