Bug 2060697 - [AWS] partitionNumber cannot work for specifying Partition number
Summary: [AWS] partitionNumber cannot work for specifying Partition number
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.11
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Joel Speed
QA Contact: Huali Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-04 02:22 UTC by Huali Liu
Modified: 2022-08-10 10:52 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:52:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Partition number incorrect (132.12 KB, image/png)
2022-03-04 02:22 UTC, Huali Liu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift api pull 1131 0 None open Bug 2060697: Correct json tag on AWS Placement PartitionNumber 2022-03-04 09:57:51 UTC
Github openshift machine-api-operator pull 994 0 None open Bug 2060697: Update openshift/api dependency 2022-03-07 15:43:03 UTC
Github openshift machine-api-provider-aws pull 27 0 None open Bug 2060697: Update openshift/api dependency 2022-03-07 15:43:34 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:52:30 UTC

Description Huali Liu 2022-03-04 02:22:44 UTC
Created attachment 1864098 [details]
Partition number incorrect

Description of problem:
partitionNumber cannot work for specifying Partition number

Version-Release number of selected component (if applicable):
4.11.0-0.nightly-2022-02-27-122819

How reproducible:
Always

Steps to Reproduce:
1.access to the AWS console to manually create a partition Placement Group with 5 Number of partitions

2. create awsplacementgroup
liuhuali@Lius-MacBook-Pro huali-test % oc get awsplacementgroup partitionpg -o yaml
apiVersion: machine.openshift.io/v1
kind: AWSPlacementGroup
metadata:
  creationTimestamp: "2022-03-02T09:27:56Z"
  generation: 1
  name: partitionpg
  namespace: openshift-machine-api
  resourceVersion: "143098"
  uid: b8ae149a-d20f-4a59-8abc-9a61ad50e31a
spec:
  credentialsSecret:
    name: aws-cloud-credentials
  managementSpec:
    managed:
      groupType: Partition
    managementState: Unmanaged 

3.reference the awsplacementgroup in the MachineSet.

           placement:
            availabilityZone: us-east-2a
            region: us-east-2
            group:
              name: partitionpg
              partitionNumber: 3 

liuhuali@Lius-MacBook-Pro huali-test % oc get machine
NAME                                         PHASE     TYPE         REGION      ZONE         AGE
huliu-aws012-77472-6-pmvsc                   Running   m5.large     us-east-2   us-east-2a   56m

Actual results:
machine created successfully but Partition number shows 1.

Expected results:
machine created successfully and Partition number should be 3.

Additional info:
https://issues.redhat.com/browse/OCPCLOUD-1381

Comment 1 Joel Speed 2022-03-04 16:48:13 UTC
More to do here before this is able to go through QE, need to update vendor directories in MAPA and MAO

Comment 3 Huali Liu 2022-03-09 02:39:43 UTC
Waiting for available nightly build to verify bug.

Comment 5 Huali Liu 2022-03-10 05:43:48 UTC
Hi Joel, 
I tried to verify this bug on 4.11.0-0.nightly-2022-03-08-191358, but there are two problems about it. Please help to take a look. Thanks!

1. "partitionNumber" will be removed, I need to:

Disable CVO: oc scale deployment -n openshift-cluster-version cluster-version-operator --replicas 0
Disable MAO: oc scale deployment -n openshift-machine-api machine-api-operator --replicas 0
Delete the mutatingwebhookconfiguration: oc delete mutatingwebhookconfiguration machine-api

then "partitionNumber" will not be removed, but other fields, for example 
            group:
              name: partitionpg
don't need to do this.

2. "partitionNumber" still cannot work, I create 3 machineset:
first time

          placement:
            availabilityZone: us-east-2b
            region: us-east-2
            group:
              name: partitionpg
              partitionNumber: 3
machine created successfully, check on AWS console "Partition number" shows 1. But it should be 3.

second time

          placement:
            availabilityZone: us-east-2b
            region: us-east-2
            group:
              name: partitionpg
              partitionNumber: 3
machine created successfully, check on AWS console "Partition number" shows 2. But it should be 3.

third time 
          placement:
            availabilityZone: us-east-2b
            region: us-east-2
            group:
              name: partitionpg
              partitionNumber: 8
machine created successfully, check on AWS console "Partition number" shows 3. But the machine should create failed, as the Partition of partitionpg is 7.

Comment 10 Joel Speed 2022-03-10 10:10:49 UTC
I just tested this with cluster bot and the partitionNumber field is working for me with the latest nightly.

The partition number in your example is not on the right level, it needs to be on the same level as group, not within the group :) 

The other validations you've mentioned haven't been implemented yet.

Comment 11 Huali Liu 2022-03-10 11:09:32 UTC
Hi Joel,
I'm very sorry for my mistake. Yes, I just changed the partitionNumber to be on the same level as group, and it worked. The other validations are not within the scope of this bug, so move this to Verified.

liuhuali@Lius-MacBook-Pro huali-test % oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.11.0-0.nightly-2022-03-08-191358   True        False         9h      Cluster version is 4.11.0-0.nightly-2022-03-08-191358

Steps:
1.access to the AWS console to manually create a partition Placement Group with 5 Number of partitions

2. create awsplacementgroup
liuhuali@Lius-MacBook-Pro huali-test % oc get awsplacementgroup partitionpg2 -o yaml
apiVersion: machine.openshift.io/v1
kind: AWSPlacementGroup
metadata:
  creationTimestamp: "2022-03-10T05:30:46Z"
  generation: 1
  name: partitionpg2
  namespace: openshift-machine-api
  resourceVersion: "113597"
  uid: d98ea863-7493-4750-bea2-d56a4ef11492
spec:
  credentialsSecret:
    name: aws-cloud-credentials
  managementSpec:
    managed:
      groupType: Partition
      partition:
        count: 5
    managementState: Unmanaged

3.reference the awsplacementgroup in the MachineSet.

          placement:
            availabilityZone: us-east-2b
            region: us-east-2
            group:
              name: partitionpg2
            partitionNumber: 3

liuhuali@Lius-MacBook-Pro huali-test % oc get machine
NAME                                                 PHASE     TYPE         REGION      ZONE         AGE
huliu-aws411-k2t9g-a2-9ngvp                          Running   m6i.large    us-east-2   us-east-2b   11m

4.check on AWS console "Partition number" shows 3.

Comment 14 errata-xmlrpc 2022-08-10 10:52:11 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 (Important: OpenShift Container Platform 4.11.0 bug fix and 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:5069


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