Bug 2033382 - MAPO is missing machine annotations
Summary: MAPO is missing machine annotations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: Matthew Booth
QA Contact: rlobillo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-16 16:11 UTC by Martin André
Modified: 2022-03-10 16:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:34:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-api-provider-openstack pull 16 0 None open Bug 2033382: Fix missing machine annotations 2021-12-17 16:46:54 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:34:42 UTC

Description Martin André 2021-12-16 16:11:31 UTC
In it's reconcile loop, CAPO sets some annotations to the machine objects. Looking at a machine, I can see:

psi ❯ oc get machine -n openshift-machine-api mandre-psi-4q7dj-worker-0-vz6gx -o yaml                                                                           
apiVersion: machine.openshift.io/v1beta1                                                                                                                                  
kind: Machine                                                                                                                                                             
metadata:                                                                                                                                                                 
  annotations:                                                                                                                                                            
    machine.openshift.io/instance-state: ACTIVE                                                                                                                           
    openstack-resourceId: b3cf02b5-68db-4b05-b07d-3c9f8dee0bba                                                                                                            
  creationTimestamp: "2021-12-14T13:46:10Z"                                                                                                                               
[snip]


MAPO has removed all of that in commits [1] and [2]. This is problematic as it's breaking compatibility with CAPO, and customer may rely in these annotations.

As an example the "[sig-installer][Feature:openstack] The OpenStack platform on instance creation should follow machineset specs [Suite:openshift/conformance/parallel]" test fails for MAPO. It's expecting `metadata.annotations.openstack-resourceId` to be set on the machine object [3].


[1] https://github.com/openshift/machine-api-provider-openstack/commit/1862c4e6b09c13eacfac86af4b2ef710c4a8ee18
[2] https://github.com/openshift/machine-api-provider-openstack/commit/aa28f447b574705343385897b77d7528a5399f73
[3] https://github.com/openshift/openstack-test/blob/13bb9fd/test/extended/openstack/servers.go#L71

Comment 1 Matthew Booth 2021-12-17 09:55:16 UTC
(In reply to Martin André from comment #0)
> In it's reconcile loop, CAPO sets some annotations to the machine objects.
> Looking at a machine, I can see:
> 
> psi ❯ oc get machine -n openshift-machine-api
> mandre-psi-4q7dj-worker-0-vz6gx -o yaml                                     
> 
> apiVersion: machine.openshift.io/v1beta1                                    
> 
> kind: Machine                                                               
> 
> metadata:                                                                   
> 
>   annotations:                                                              
> 
>     machine.openshift.io/instance-state: ACTIVE                             
> 
>     openstack-resourceId: b3cf02b5-68db-4b05-b07d-3c9f8dee0bba              
> 
>   creationTimestamp: "2021-12-14T13:46:10Z"                                 
> 
> [snip]
> 
> 
> MAPO has removed all of that in commits [1] and [2]. This is problematic as
> it's breaking compatibility with CAPO, and customer may rely in these
> annotations.
> 
> As an example the "[sig-installer][Feature:openstack] The OpenStack platform
> on instance creation should follow machineset specs
> [Suite:openshift/conformance/parallel]" test fails for MAPO. It's expecting
> `metadata.annotations.openstack-resourceId` to be set on the machine object
> [3].
> 
> 
> [1]
> https://github.com/openshift/machine-api-provider-openstack/commit/
> 1862c4e6b09c13eacfac86af4b2ef710c4a8ee18
> [2]
> https://github.com/openshift/machine-api-provider-openstack/commit/
> aa28f447b574705343385897b77d7528a5399f73
> [3]
> https://github.com/openshift/openstack-test/blob/13bb9fd/test/extended/
> openstack/servers.go#L71

Looks like we need to put back openstack-resourceId and machine.openshift.io/instance-state.

However, note that the instance-status annotation is also gone and I would not be in favour of resurrecting it.

Comment 2 Matthew Booth 2021-12-17 11:25:26 UTC
There's another one: 'openstack-ip-address'. I don't want to bring that back either. In fact that one's gone from downstream CAPO, too. We could set it randomly if really required.

Comment 3 Matthew Booth 2021-12-17 14:48:25 UTC
This is not a release blocker because the feature is TechPreview.

Comment 5 ShiftStack Bugwatcher 2021-12-18 07:03:52 UTC
Removing the Triaged keyword because:
* the priority assessment is missing
* the QE automation assessment (flag qe_test_coverage) is missing

Comment 8 rlobillo 2022-01-21 16:44:07 UTC
Verified on 4.10.0-0.nightly-2022-01-20-082726.

Worker includes the expected annotations:

$ oc get machine/ostest-kmrdd-worker-0-hx5zh -n openshift-machine-api -o json | jq .metadata.annotations
{
  "machine.openshift.io/instance-state": "ACTIVE",
  "openstack-resourceId": "7aa06832-0a96-47e4-85cf-c515652d9262"
}

$ openstack server show 7aa06832-0a96-47e4-85cf-c515652d9262
+-----------------------------+-----------------------------------------------------------------------------------------+
| Field                       | Value                                                                                   |
+-----------------------------+-----------------------------------------------------------------------------------------+
| OS-DCF:diskConfig           | MANUAL                                                                                  |
| OS-EXT-AZ:availability_zone | nova                                                                                    |
| OS-EXT-STS:power_state      | Running                                                                                 |
| OS-EXT-STS:task_state       | None                                                                                    |
| OS-EXT-STS:vm_state         | active                                                                                  |
| OS-SRV-USG:launched_at      | 2022-01-20T11:43:22.000000                                                              |
| OS-SRV-USG:terminated_at    | None                                                                                    |
| accessIPv4                  |                                                                                         |
| accessIPv6                  |                                                                                         |
| addresses                   | ostest-kmrdd-openshift=10.196.1.218                                                     |
| config_drive                |                                                                                         |
| created                     | 2022-01-20T11:43:15Z                                                                    |
| description                 | None                                                                                    |
| flavor                      | disk='40', ephemeral='0', , original_name='m4.xlarge', ram='16384', swap='0', vcpus='4' |
| hostId                      | 12c8e6abb676d4f2d815c0912e5e64f233bcadba14df747fc29324bd                                |
| id                          | 7aa06832-0a96-47e4-85cf-c515652d9262                                                    |
| image                       | ostest-kmrdd-rhcos (2f7ea05f-9550-451c-9f3d-137ad4374401)                               |
| key_name                    | None                                                                                    |
| locked                      | False                                                                                   |
| locked_reason               | None                                                                                    |
| name                        | ostest-kmrdd-worker-0-hx5zh                                                             |
| progress                    | 0                                                                                       |
| project_id                  | 8c788d4edd8e42adaade6e424bc63a1b                                                        |
| properties                  | Name='ostest-kmrdd-worker', openshiftClusterID='ostest-kmrdd'                           |
| security_groups             | name='ostest-kmrdd-worker'                                                              |
| server_groups               | []                                                                                      |
| status                      | ACTIVE                                                                                  |
| tags                        | ['openshiftClusterID=ostest-kmrdd']                                                     |
| trusted_image_certificates  | None                                                                                    |
| updated                     | 2022-01-20T11:43:22Z                                                                    |
| user_id                     | 905445629fa546b9b1a536a680e698f9                                                        |
| volumes_attached            |                                                                                         |
+-----------------------------+-----------------------------------------------------------------------------------------+

and the openstack-test is passing:

passed: (6.2s) 2022-01-21T12:12:21 "[sig-installer][Feature:openstack] The OpenStack platform on instance creation should follow machineset specs [Suite:openshift/conformance/parallel]"

Comment 12 errata-xmlrpc 2022-03-10 16:34:29 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


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