Skip to content

Commit 9b7b417

Browse files
authored
Merge pull request #93656 from jeana-redhat/OSDOCS-14739-MAPI-CAPI-conversion-ts
OSDOCS-14739: Troubleshooting MAPI-CAPI migration
2 parents ab32351 + 74612b6 commit 9b7b417

12 files changed

+311
-11
lines changed

machine_management/cluster_api_machine_management/cluster-api-disabling.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ To stop using the Cluster API to automate the management of infrastructure resou
1212
include::snippets/technology-preview.adoc[]
1313

1414
//Migrating Cluster API resources to Machine API resources
15-
include::modules/mapi-capi-migration-overview.adoc[leveloffset=+1]
15+
include::modules/capi-to-mapi-migration-overview.adoc[leveloffset=+1]
1616

1717
//Migrating a Cluster API resource to use the Machine API
1818
include::modules/migrating-between-capi-mapi.adoc[leveloffset=+2]
1919

20+
//Authoritative API types of compute machines
21+
include::modules/machine-set-authoritative-api-machines.adoc[leveloffset=+2]
22+
2023
[role="_additional-resources"]
2124
.Additional resources
22-
// * xr3f:../../machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc#ts-capi-resource-migration_cluster-api-troubleshooting[Troubleshooting resource migration]
23-
* xref:../../machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc#capi-mapi-migration-overview_cluster-api-getting-started[Migrating Machine API resources to Cluster API resources]
25+
* xref:../../machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc#ts-capi-resource-migration_cluster-api-troubleshooting[Troubleshooting resource migration]
26+
* xref:../../machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc#mapi-to-capi-migration-overview_cluster-api-getting-started[Migrating Machine API resources to Cluster API resources]

machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ When you install a cluster that supports managing infrastructure resources with
2424
* One provider-specific infrastructure cluster resource.
2525
2626
On clusters that support migrating Machine API resources to Cluster API resources, a two-way synchronization controller creates these primary resources automatically.
27-
For more information, see xref:../../machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc#capi-mapi-migration-overview_cluster-api-getting-started[Migrating Machine API resources to Cluster API resources].
27+
For more information, see xref:../../machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc#mapi-to-capi-migration-overview_cluster-api-getting-started[Migrating Machine API resources to Cluster API resources].
2828

2929
[id="creating-primary-resources_{context}"]
3030
== Creating the Cluster API primary resources
@@ -57,7 +57,10 @@ include::modules/capi-creating-machine-set.adoc[leveloffset=+2]
5757
* xref:../../machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-bare-metal.adoc#capi-yaml-machine-set-bare-metal_cluster-api-config-options-bare-metal[Sample YAML for a Cluster API compute machine set resource on bare metal]
5858

5959
//Migrating Machine API resources to Cluster API resources
60-
include::modules/capi-mapi-migration-overview.adoc[leveloffset=+1]
60+
include::modules/mapi-to-capi-migration-overview.adoc[leveloffset=+1]
61+
62+
//Authoritative API types of compute machines
63+
include::modules/machine-set-authoritative-api-machines.adoc[leveloffset=+2]
6164

6265
//Migrating a Machine API resource to use the Cluster API
6366
include::modules/migrating-between-capi-mapi.adoc[leveloffset=+2]
@@ -67,5 +70,5 @@ include::modules/deploying-capi-machines-via-mapi-machine-sets.adoc[leveloffset=
6770

6871
[role="_additional-resources"]
6972
.Additional resources
70-
//* xr3f:../../machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc#ts-capi-resource-migration_cluster-api-troubleshooting[Troubleshooting resource migration]
71-
* xref:../../machine_management/cluster_api_machine_management/cluster-api-disabling.adoc#mapi-capi-migration-overview_cluster-api-disabling[Migrating Cluster API resources to Machine API resources]
73+
* xref:../../machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc#ts-capi-resource-migration_cluster-api-troubleshooting[Troubleshooting resource migration]
74+
* xref:../../machine_management/cluster_api_machine_management/cluster-api-disabling.adoc#capi-to-mapi-migration-overview_cluster-api-disabling[Migrating Cluster API resources to Machine API resources]

machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,33 @@ Generally, troubleshooting steps for problems with the Cluster API are similar t
1515
The {cluster-capi-operator} and its operands are provisioned in the `openshift-cluster-api` namespace, whereas the Machine API uses the `openshift-machine-api` namespace. When using `oc` commands that reference a namespace, be sure to reference the correct one.
1616

1717
//Returning the intended machines when using the CLI
18-
include::modules/ts-capi-cli-reference-intended-objects.adoc[leveloffset=+1]
18+
include::modules/ts-capi-cli-reference-intended-objects.adoc[leveloffset=+1]
19+
20+
//Duplicated machine set and machine resources
21+
include::modules/ts-capi-sync-list-duplicate-resources.adoc[leveloffset=+1]
22+
23+
//Unexpected resource deletion behavior
24+
//Draft to be completed
25+
//include::modules/ts-capi-migrate-unexpected-deletion-behavior.adoc[leveloffset=+1]
26+
27+
[id="ts-capi-resource-migration_{context}"]
28+
== Troubleshooting resource migration
29+
30+
When you migrate a resource to use a different authoritative API, you might encounter issues during the migration process.
31+
You might also notice unexpected behavior due to differences between the Cluster API and the Machine API.
32+
33+
//Authoritative API types of compute machines
34+
include::modules/machine-set-authoritative-api-machines.adoc[leveloffset=+2]
35+
36+
//Unexpected machine counts after scaling
37+
include::modules/ts-capi-migrate-unexpected-machine-counts-scaling.adoc[leveloffset=+2]
38+
39+
//Incomplete synchronization of labels and annotations
40+
include::modules/ts-capi-migrate-sync-label-annotation.adoc[leveloffset=+2]
41+
42+
//Migrating {aws-short} cloud credentials
43+
//KCS draft not ready for publication
44+
//include::modules/ts-capi-migrate-aws-creds.adoc[leveloffset=+2]
45+
46+
//Unsupported configuration options
47+
include::modules/ts-capi-migrate-unsupported-features.adoc[leveloffset=+2]

modules/mapi-capi-migration-overview.adoc renamed to modules/capi-to-mapi-migration-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// * machine_management/cluster_api_machine_management/cluster-api-disabling.adoc
44

55
:_mod-docs-content-type: CONCEPT
6-
[id="mapi-capi-migration-overview_{context}"]
6+
[id="capi-to-mapi-migration-overview_{context}"]
77
= Migrating Cluster API resources to Machine API resources
88

99
On clusters that support migrating between Machine API and Cluster API resources, the two-way synchronization controller supports converting a Cluster API resource to a Machine API resource.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/cluster_api_machine_management/cluster-api-disabling.adoc
4+
// * machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc
5+
// * machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc
6+
7+
:_mod-docs-content-type: REFERENCE
8+
[id="machine-set-authoritative-api-machines_{context}"]
9+
= Authoritative API types of compute machines
10+
11+
The authoritative API of a compute machine depends on the values of the `.spec.authoritativeAPI` and `.spec.template.spec.authoritativeAPI` fields in the Machine API compute machine set that creates it.
12+
13+
.Interaction of `authoritativeAPI` fields when creating compute machines
14+
[cols="h,1,1,1,1"]
15+
|===
16+
|`.spec.authoritativeAPI` value
17+
|`ClusterAPI`
18+
|`ClusterAPI`
19+
|`MachineAPI`
20+
|`MachineAPI`
21+
22+
|`.spec.template.spec.authoritativeAPI` value
23+
|`ClusterAPI`
24+
|`MachineAPI`
25+
|`MachineAPI`
26+
|`ClusterAPI`
27+
28+
|`authoritativeAPI` value for new compute machines
29+
|`ClusterAPI`
30+
|`ClusterAPI`
31+
|`MachineAPI`
32+
|`ClusterAPI`
33+
|===
34+
35+
[NOTE]
36+
====
37+
When the `.spec.authoritativeAPI` value is `ClusterAPI`, the Machine API machine set is not authoritative and the `.spec.template.spec.authoritativeAPI` value is not used.
38+
As a result, the only combination that creates a compute machine with the Machine API as authoritative is where the `.spec.authoritativeAPI` and `.spec.template.spec.authoritativeAPI` values are `MachineAPI`.
39+
====

modules/capi-mapi-migration-overview.adoc renamed to modules/mapi-to-capi-migration-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// * machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc
44

55
:_mod-docs-content-type: CONCEPT
6-
[id="capi-mapi-migration-overview_{context}"]
6+
[id="mapi-to-capi-migration-overview_{context}"]
77
= Migrating Machine API resources to Cluster API resources
88

99
On clusters that support migrating Machine API resources to Cluster API resources, a two-way synchronization controller creates the following Cluster API resources in the `openshift-cluster-api` namespace:

modules/migrating-between-capi-mapi.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ ifdef::cluster-to-machine[]
147147
Do not delete any nonauthoritative resource that does not use the current authoritative API unless you want to delete the corresponding resource that does use the current authoritative API.
148148

149149
When you delete a nonauthoritative resource that does not use the current authoritative API, the synchronization controller deletes the corresponding resource that does use the current authoritative API.
150-
//For more information, see "Unexpected resource deletion behavior" in the _Troubleshooting resource conversion_ content.
150+
For more information, see "Unexpected resource deletion behavior" in the _Troubleshooting resource migration_ content.
151151
====
152152
endif::[]
153153

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="ts-capi-migrate-aws-creds_{context}"]
7+
= Migrating {aws-short} cloud credentials
8+
9+
//KCS draft not ready for publication
10+
11+
The two-way synchronization controller that maintains changes between Machine API and Cluster API resources does not automatically copy {aws-first} credential secrets.
12+
For more information, see the Red{nbsp}Hat Knowledgebase article link:https://access.redhat.com/articles/7116313[Migrate AWS cloud credentials between Machine API and Cluster API].
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="ts-capi-migrate-sync-label-annotation_{context}"]
7+
= Incomplete synchronization of labels and annotations
8+
9+
The label and annotation synchronization behavior differs between the Machine API and the Cluster API.
10+
In some cases, these differences cause the two-way synchronization controller to overwrite labels on a Cluster API machine during migration.
11+
12+
Cause::
13+
14+
With the Machine API, changes to machine set labels and annotations do not propagate to existing machines and nodes.
15+
These changes only apply to machines deployed after the update.
16+
+
17+
With the Cluster API, changes to machine set labels and annotations propagate to existing machines and nodes.
18+
When the authoritative API for a machine set changes from Machine API to Cluster API, its labels propagate to the Cluster API machines that it manages.
19+
The propagation happens before the Cluster API machine is marked as authoritative.
20+
21+
Consequence::
22+
23+
The two-way synchronization controller overwrites any propagated labels and annotations with the earlier value, leading to an inconsistency.
24+
This outcome only occurs when removing a label or annotation.
25+
Updates and additional labels or annotations do not cause this inconsistency.
26+
27+
Workaround::
28+
29+
There is no workaround for this issue.
30+
For more information, see link:https://issues.redhat.com/browse/OCPBUGS-54333[OCPBUGS-54333].
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/cluster_api_machine_management/cluster-api-troubleshooting.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="ts-capi-migrate-unexpected-machine-counts-scaling_{context}"]
7+
= Unexpected machine counts after scaling
8+
9+
On clusters that support migrating resources between the Machine API and the Cluster API, users might experience unexpected behavior when scaling the number of compute machines.
10+
The output of the `oc get` command for a compute machine set that does not use the authoritative API might contain inaccurate values in the `CURRENT`, `READY`, and `AVAILABLE` columns.
11+
12+
Cause::
13+
14+
The values that populate the `CURRENT`, `READY`, and `AVAILABLE` columns originate in the `.status` stanza of a compute machine set.
15+
The two-way synchronization controller that handles resource conversion between authoritative API types does not currently synchronize values in the `.status` stanza.
16+
+
17+
The value in the `DESIRED` column reflects the `.spec.replicas` value of a compute machine set.
18+
The two-way synchronization controller synchronizes values in the `.spec` stanza.
19+
20+
Consequence::
21+
22+
Users can expect to see the following behavior when scaling migrated machine sets:
23+
+
24+
--
25+
. Start with a compute machine set with existing machines.
26+
. Migrate the machine set to use a different authoritative API.
27+
. Scale the now authoritative machine set up by setting a larger value in the `.spec.replicas` field.
28+
. The machine set creates machines with the current authoritative API to satisfy the number of requested replicas.
29+
. Scale the authoritative machine set down such that one of the following conditions causes the deletion of machines that do not use the current authoritative API:
30+
** The total number of replicas requested is fewer than the number of machines that do not use the current authoritative API.
31+
** The machine deletion policy for the machine set selects machines that do not use the current authoritative API.
32+
. Check the status of the nonauthoritative compute machine set by running the `oc get` command.
33+
** The value in the `DESIRED` column in the output reflects the `.spec.replicas` value.
34+
** The values in the `CURRENT`, `READY`, and `AVAILABLE` columns reflect the original number of replicas that existed before scaling the machine set.
35+
--
36+
37+
Workaround::
38+
39+
To verify that a scale-down operation successfully deleted the compute machines that do not use the current authoritative API, run the `oc get` command that lists the nonauthoritative compute machines.
40+
41+
Result::
42+
43+
If the scale-down operation succeeded, the count in the output of the `oc get` command for the nonauthoritative compute machines reflects the `.spec.replicas` value of the machine set.
44+
45+
//OCPCLOUD-2994
46+
//OCPCLOUD-2995

0 commit comments

Comments
 (0)