Skip to content

Commit 5aa29a8

Browse files
committed
OSDOCS#14808: HCP updates additions and update
1 parent 5bb0ced commit 5aa29a8

File tree

3 files changed

+137
-117
lines changed

3 files changed

+137
-117
lines changed

hosted_control_planes/hcp-updating.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,20 @@ include::modules/hcp-updating-requirements.adoc[leveloffset=+1]
2121
2222
include::modules/hcp-get-ocp-channel.adoc[leveloffset=+1]
2323

24+
[role="_additional-resources"]
25+
.Additional resources
26+
27+
* xref:../updating/understanding_updates/understanding-update-channels-release.adoc#understanding-update-channels-releases[Understanding update channels and releases]
28+
* xref:../updating/updating_a_cluster/updating-cluster-cli.adoc#update-upgrading-oc-adm-upgrade-status_updating-cluster-cli[Gathering cluster update status using oc adm upgrade status (Technology Preview)]
29+
2430
include::modules/hcp-get-upgrade-versions.adoc[leveloffset=+1]
2531

2632
// Updates for the hosted cluster
2733
include::modules/hcp-updates-hosted-cluster.adoc[leveloffset=+1]
2834

35+
// Setting UpdateService field in a hosted cluster
36+
include::modules/hcp-update-service.adoc[leveloffset=+1]
37+
2938
// Updates for node pools
3039
include::modules/hcp-updates-node-pools.adoc[leveloffset=+1]
3140

modules/hcp-get-ocp-channel.adoc

Lines changed: 65 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -2,134 +2,82 @@
22
//
33
// * hosted_control_planes/hcp-updating.adoc
44

5-
:_mod-docs-content-type: CONCEPT
5+
:_mod-docs-content-type: PROCEDURE
66
[id="hcp-get-ocp-channel_{context}"]
7-
= Setting channels in a hosted cluster
7+
= Updating your hosted cluster
88

9-
You can see available updates in the `HostedCluster.Status` field of the `HostedCluster` custom resource (CR).
9+
You can update the hosted cluster by setting a channel in your `HostedCluster` resource or by using the `oc patch` command.
1010

11-
The available updates are not fetched from the Cluster Version Operator (CVO) of a hosted cluster. The list of the available updates can be different from the available updates from the following fields of the `HostedCluster` custom resource (CR):
11+
The initial `HostedCluster` resource does not have any information in the `status.version.availableUpdates` and `status.version.conditionalUpdates` fields. After you set the `spec.channel` field to the stable {product-title} release version, the HyperShift Operator reconciles the `HostedCluster` resource and updates the `status.version` field with the available and conditional updates.
1212

13-
* `status.version.availableUpdates`
14-
* `status.version.conditionalUpdates`
13+
.Procedure
1514

16-
The initial `HostedCluster` CR does not have any information in the `status.version.availableUpdates` and `status.version.conditionalUpdates` fields. After you set the `spec.channel` field to the stable {product-title} release version, the HyperShift Operator reconciles the `HostedCluster` CR and updates the `status.version` field with the available and conditional updates.
15+
. Check recommended {product-title} channels by running the following command:
16+
+
17+
[source,terminal]
18+
----
19+
$ oc -n <hosted_cluster_namespace> get -o jsonpath='{.status.version.desired.channels}' hostedcluster <hosted_cluster_name>
20+
----
1721

18-
See the following example of the `HostedCluster` CR that contains the channel configuration:
22+
. Set a channel in your hosted cluster that matches with your desired channel semantics. For more information about channels and releases, see "Understanding update channels and releases". Run the following command:
23+
+
24+
[source,terminal]
25+
----
26+
$ oc patch -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> --type=merge -p '{"spec":{"channel":"stable-<4.y>"}}' <1>
27+
----
28+
<1> Replace `<4.y>` with the {product-title} release version that you specified in `spec.release`. For example, if you set the `spec.release` to `ocp-release:4.18.4-multi`, you must set `spec.channel` to `stable-4.18`.
1929

20-
[source,yaml]
21-
----
22-
spec:
23-
autoscaling: {}
24-
channel: stable-4.y <1>
25-
clusterID: d6d42268-7dff-4d37-92cf-691bd2d42f41
26-
configuration: {}
27-
controllerAvailabilityPolicy: SingleReplica
28-
dns:
29-
baseDomain: dev11.red-chesterfield.com
30-
privateZoneID: Z0180092I0DQRKL55LN0
31-
publicZoneID: Z00206462VG6ZP0H2QLWK
32-
----
33-
<1> Replace `<4.y>` with the {product-title} release version you specified in `spec.release`. For example, if you set the `spec.release` to `ocp-release:4.16.4-multi`, you must set `spec.channel` to `stable-4.16`.
30+
. Update the `spec.release` field of the `HostedCluster` to trigger the control plane rollout by running the following command:
31+
+
32+
[source,terminal]
33+
----
34+
$ oc patch -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> --type=merge -p '{"spec":{"release":{"image":"<release_payload>"}}}' <1>
35+
----
36+
<1> Replace `<release_payload>` with the {product-title} release payload that you can find in the `availableUpdates` or `conditionalUpdates` fields.
37+
38+
. Check the list of available updates for your hosted cluster by running the following command:
39+
+
40+
[source,terminal]
41+
----
42+
$ oc get -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> -o jsonpath='{.status.version.availableUpdates}'
43+
----
3444

35-
After you configure the channel in the `HostedCluster` CR, to view the output of the `status.version.availableUpdates` and `status.version.conditionalUpdates` fields, run the following command:
45+
. Monitor the progress of your ongoing update, the update rollout status, timestamps, and issues by using the information retrieved by the Cluster Version Operator (CVO):
3646

47+
.. Check the status of the `ClusterVersionProgressing` and `ClusterVersionSucceeding` conditions in your `HostedCluster` resource by running the following command:
48+
+
3749
[source,terminal]
3850
----
39-
$ oc get -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> -o yaml
51+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.conditions}'
4052
----
4153

42-
.Example output
43-
[source,yaml]
44-
----
45-
version:
46-
availableUpdates:
47-
- channels:
48-
- candidate-4.16
49-
- candidate-4.17
50-
- eus-4.16
51-
- fast-4.16
52-
- stable-4.16
53-
image: quay.io/openshift-release-dev/ocp-release@sha256:b7517d13514c6308ae16c5fd8108133754eb922cd37403ed27c846c129e67a9a
54-
url: https://access.redhat.com/errata/RHBA-2024:6401
55-
version: 4.16.11
56-
- channels:
57-
- candidate-4.16
58-
- candidate-4.17
59-
- eus-4.16
60-
- fast-4.16
61-
- stable-4.16
62-
image: quay.io/openshift-release-dev/ocp-release@sha256:d08e7c8374142c239a07d7b27d1170eae2b0d9f00ccf074c3f13228a1761c162
63-
url: https://access.redhat.com/errata/RHSA-2024:6004
64-
version: 4.16.10
65-
- channels:
66-
- candidate-4.16
67-
- candidate-4.17
68-
- eus-4.16
69-
- fast-4.16
70-
- stable-4.16
71-
image: quay.io/openshift-release-dev/ocp-release@sha256:6a80ac72a60635a313ae511f0959cc267a21a89c7654f1c15ee16657aafa41a0
72-
url: https://access.redhat.com/errata/RHBA-2024:5757
73-
version: 4.16.9
74-
- channels:
75-
- candidate-4.16
76-
- candidate-4.17
77-
- eus-4.16
78-
- fast-4.16
79-
- stable-4.16
80-
image: quay.io/openshift-release-dev/ocp-release@sha256:ea624ae7d91d3f15094e9e15037244679678bdc89e5a29834b2ddb7e1d9b57e6
81-
url: https://access.redhat.com/errata/RHSA-2024:5422
82-
version: 4.16.8
83-
- channels:
84-
- candidate-4.16
85-
- candidate-4.17
86-
- eus-4.16
87-
- fast-4.16
88-
- stable-4.16
89-
image: quay.io/openshift-release-dev/ocp-release@sha256:e4102eb226130117a0775a83769fe8edb029f0a17b6cbca98a682e3f1225d6b7
90-
url: https://access.redhat.com/errata/RHSA-2024:4965
91-
version: 4.16.6
92-
- channels:
93-
- candidate-4.16
94-
- candidate-4.17
95-
- eus-4.16
96-
- fast-4.16
97-
- stable-4.16
98-
image: quay.io/openshift-release-dev/ocp-release@sha256:f828eda3eaac179e9463ec7b1ed6baeba2cd5bd3f1dd56655796c86260db819b
99-
url: https://access.redhat.com/errata/RHBA-2024:4855
100-
version: 4.16.5
101-
conditionalUpdates:
102-
- conditions:
103-
- lastTransitionTime: "2024-09-23T22:33:38Z"
104-
message: |-
105-
Could not evaluate exposure to update risk SRIOVFailedToConfigureVF (creating PromQL round-tripper: unable to load specified CA cert /etc/tls/service-ca/service-ca.crt: open /etc/tls/service-ca/service-ca.crt: no such file or directory)
106-
SRIOVFailedToConfigureVF description: OCP Versions 4.14.34, 4.15.25, 4.16.7 and ALL subsequent versions include kernel datastructure changes which are not compatible with older versions of the SR-IOV operator. Please update SR-IOV operator to versions dated 20240826 or newer before updating OCP.
107-
SRIOVFailedToConfigureVF URL: https://issues.redhat.com/browse/NHE-1171
108-
reason: EvaluationFailed
109-
status: Unknown
110-
type: Recommended
111-
release:
112-
channels:
113-
- candidate-4.16
114-
- candidate-4.17
115-
- eus-4.16
116-
- fast-4.16
117-
- stable-4.16
118-
image: quay.io/openshift-release-dev/ocp-release@sha256:fb321a3f50596b43704dbbed2e51fdefd7a7fd488ee99655d03784d0cd02283f
119-
url: https://access.redhat.com/errata/RHSA-2024:5107
120-
version: 4.16.7
121-
risks:
122-
- matchingRules:
123-
- promql:
124-
promql: |
125-
group(csv_succeeded{_id="d6d42268-7dff-4d37-92cf-691bd2d42f41", name=~"sriov-network-operator[.].*"})
126-
or
127-
0 * group(csv_count{_id="d6d42268-7dff-4d37-92cf-691bd2d42f41"})
128-
type: PromQL
129-
message: OCP Versions 4.14.34, 4.15.25, 4.16.7 and ALL subsequent versions
130-
include kernel datastructure changes which are not compatible with older
131-
versions of the SR-IOV operator. Please update SR-IOV operator to versions
132-
dated 20240826 or newer before updating OCP.
133-
name: SRIOVFailedToConfigureVF
134-
url: https://issues.redhat.com/browse/NHE-1171
54+
.. Optional: To retrieve more detailed information about the status of your update, run the following command:
55+
+
56+
[source,terminal]
57+
----
58+
$ oc adm upgrade status
59+
----
60+
+
61+
For more information about how to use the `oc adm upgrade status` command, see "Gathering cluster update status using oc adm upgrade status (Technology Preview)".
62+
63+
.. Run the following command to check the status of conditions:
64+
+
65+
[source,terminal]
66+
----
67+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.conditions}'
68+
----
69+
+
70+
See the following update rollout status conditions:
71+
72+
* `ClusterVersionSucceeding`: Indicates if the cluster is successfully updating.
73+
* `ClusterVersionProgressing`: Indicates if the update is actively progressing.
74+
* `ClusterVersionAvailable`: Confirms the availability of the updated version.
75+
76+
.Verification
77+
78+
* Verify that the `history` field in the `HostedCluster` resource indicates a status as `Completed`. Run the following command:
79+
+
80+
[source,terminal]
81+
----
82+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.version.history}'
13583
----

modules/hcp-update-service.adoc

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-updating.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-update-service_{context}"]
7+
= Setting the updateService field in HostedCluster
8+
9+
You can configure the update service by using a specific update service URL in the `updateService` field of the `HostedCluster` custom resource (CR). By default, the hosted cluster uses the OpenShift Update Service (OSUS) based on its region and configuration.
10+
11+
Consider the following environments where you can use the update service:
12+
13+
* Private or disconnected: To update your cluster in an environment without access to the public OSUS.
14+
* Regional: To direct the update service to a specific regional server for compliance or performance optimization.
15+
* Custom: For environments that host their own OSUS and need updates to be sourced internally rather than from the default Red{nbsp}Hat services.
16+
17+
.Procedure
18+
19+
* To set a custom update service, add the update service URL to the `updateService` field in the `HostedCluster` CR. Run the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc patch hostedcluster <hosted_cluster_name> --type=merge -p '{"spec":{"updateService":<update_server_url>"}}' <1>
24+
----
25+
<1> Replace `<update_service_url>` with the URL of your desired update service.
26+
+
27+
[TIP]
28+
====
29+
If you face issues, consider the following troubleshooting factors:
30+
31+
* Connection issues: If the cluster is unable to reach the specified update service, confirm that the service URL is accessible from the cluster network.
32+
* Update service compatibility: Ensure that an update information provided by the specified update service is compatible with the {product-title} versions used by the hosted cluster.
33+
* Fallback behavior: If the update service is incorrectly configured or unreachable, update recommendations might not be available. Verify the configuration and network connectivity as necessary.
34+
* `ClusterVersionRetrievedUpdates`: Ensure that the Cluster Version Operator (CVO) retrieved your desired updates by checking the status of the `ClusterVersionRetrievedUpdates` field. Run the following command:
35+
+
36+
[source,terminal]
37+
----
38+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.conditions}'
39+
----
40+
====
41+
42+
43+
.Verification
44+
45+
. Verify that the `channel` field shows the target release information retrieved by the CVO by running the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.version.desired}'
50+
----
51+
52+
. Verify that the update service URL is successfully set in the `updateService` field by running the following command:
53+
+
54+
[source,terminal]
55+
----
56+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.spec.updateService}'
57+
----
58+
+
59+
.Example output
60+
[source,terminal]
61+
----
62+
https://custom-update-service.example.com/api/upgrades_info/v1/graph
63+
----

0 commit comments

Comments
 (0)