Skip to content

Commit f9c3b45

Browse files
authored
Merge pull request #85726 from max-cx/OBSDOCS-1126
OBSDOCS-1126: LokistackSchemaUpgradesRequired in the upgrade process to Logging 5.9
2 parents 82de702 + d0995df commit f9c3b45

File tree

6 files changed

+58
-11
lines changed

6 files changed

+58
-11
lines changed

modules/logging-loki-cli-install.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ spec:
160160
size: 1x.small # <3>
161161
storage:
162162
schemas:
163-
- version: v12
164-
effectiveDate: "2022-06-01"
163+
- version: v13
164+
effectiveDate: "<yyyy>-<mm>-<dd>"
165165
secret:
166166
name: logging-loki-s3 # <4>
167167
type: s3 # <5>

modules/logging-loki-gui-install.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ spec:
8686
size: 1x.small # <3>
8787
storage:
8888
schemas:
89-
- version: v12
90-
effectiveDate: "2022-06-01"
89+
- version: v13
90+
effectiveDate: "<yyyy>-<mm>-<dd>"
9191
secret:
9292
name: logging-loki-s3 # <4>
9393
type: s3 # <5>

modules/logging-upgrading-clo.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ To update the {clo} to a new major release version, you must modify the update c
2222

2323
. Click the *Red Hat OpenShift Logging* Operator.
2424

25-
. Click *Subscription*. In the *Subscription details* section, click the *Update channel* link. This link text might be *stable* or *stable-5.y*, depending on your current update channel.
25+
. Click *Subscription*. In the *Subscription details* section, click the *Update channel* link. This link text might be *stable* or *stable-5.9*, depending on your current update channel.
2626

27-
. In the *Change Subscription Update Channel* window, select the latest major version update channel, *stable-5.y*, and click *Save*. Note the `cluster-logging.v5.y.z` version.
27+
. In the *Change Subscription Update Channel* window, select the latest major version update channel, *stable-5.9*, and click *Save*. Note the `cluster-logging.v5.9.<z>` version.
2828

29-
.Verification
30-
31-
. Wait for a few seconds, then click *Operators* -> *Installed Operators*. Verify that the {clo} version matches the latest `cluster-logging.v5.y.z` version.
29+
. Wait for a few seconds, and then go to *Operators* -> *Installed Operators* to verify that the {clo} version matches the latest `cluster-logging.v5.9.<z>` version.
3230

3331
. On the *Operators* -> *Installed Operators* page, wait for the *Status* field to report *Succeeded*.
32+
33+
. Check if the `LokiStack` custom resource contains the `v13` schema version and add it if it is missing. For correctly adding the `v13` schema version, see "Upgrading the LokiStack storage schema".
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * observability/logging/cluster-logging-upgrading.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="logging-upgrading-loki-schema_{context}"]
7+
= Upgrading the LokiStack storage schema
8+
9+
If you are using the {clo} with the {loki-op}, the {clo} 5.9 or later supports the `v13` schema version in the `LokiStack` custom resource. Upgrading to the `v13` schema version is recommended because it is the schema version to be supported going forward.
10+
11+
.Procedure
12+
13+
* Add the `v13` schema version in the `LokiStack` custom resource as follows:
14+
+
15+
[source,yaml]
16+
----
17+
apiVersion: loki.grafana.com/v1
18+
kind: LokiStack
19+
# ...
20+
spec:
21+
# ...
22+
storage:
23+
schemas:
24+
# ...
25+
version: v12 # <1>
26+
- effectiveDate: "<yyyy>-<mm>-<future_dd>" # <2>
27+
version: v13
28+
# ...
29+
----
30+
<1> Do not delete. Data persists in its original schema version. Keep the previous schema versions to avoid data loss.
31+
<2> Set a future date that has not yet started in the Coordinated Universal Time (UTC) time zone.
32+
+
33+
[TIP]
34+
====
35+
To edit the `LokiStack` custom resource, you can run the `oc edit` command:
36+
37+
[source,terminal]
38+
----
39+
$ oc edit lokistack <name> -n openshift-logging
40+
----
41+
====
42+
43+
.Verification
44+
45+
* On or after the specified `effectiveDate` date, check that there is no *LokistackSchemaUpgradesRequired* alert in the web console in *Administrator* -> *Observe* -> *Alerting*.

modules/logging-upgrading-loki.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ To update the {loki-op} to a new major release version, you must modify the upda
2626

2727
. In the *Change Subscription Update Channel* window, select the latest major version update channel, *stable-5.y*, and click *Save*. Note the `loki-operator.v5.y.z` version.
2828

29-
.Verification
30-
3129
. Wait for a few seconds, then click *Operators* -> *Installed Operators*. Verify that the {loki-op} version matches the latest `loki-operator.v5.y.z` version.
3230

3331
. On the *Operators* -> *Installed Operators* page, wait for the *Status* field to report *Succeeded*.
32+
33+
. Check if the `LokiStack` custom resource contains the `v13` schema version and add it if it is missing. For correctly adding the `v13` schema version, see "Upgrading the LokiStack storage schema".

observability/logging/cluster-logging-upgrading.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ include::modules/logging-upgrading-clo.adoc[leveloffset=+1]
2828

2929
include::modules/logging-upgrading-loki.adoc[leveloffset=+1]
3030

31+
include::modules/logging-upgrading-loki-schema.adoc[leveloffset=+1]
32+
3133
include::modules/cluster-logging-upgrading-elasticsearch.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)