Skip to content

Commit d2622a4

Browse files
authored
Merge pull request #73364 from aravipra/OSDOCS-9433
OSDOCS-9433: getting cluster id section is added to microshift support
2 parents 9350360 + 4569dfe commit d2622a4

File tree

5 files changed

+98
-1
lines changed

5 files changed

+98
-1
lines changed

_topic_maps/_topic_map_ms.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Topics:
8585
File: microshift-etcd
8686
- Name: The sos report tool
8787
File: microshift-sos-report
88+
- Name: Getting your cluster ID
89+
File: microshift-getting-cluster-id
8890
- Name: Getting support
8991
File: microshift-getting-support
9092
---
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="microshift-getting-cluster-id"]
3+
= Getting your cluster ID
4+
include::_attributes/attributes-microshift.adoc[]
5+
:context: microshift-getting-cluster-id
6+
7+
toc::[]
8+
9+
When opening a support case, you can give information about your cluster to Red Hat Support by providing the unique identifier (UID) of your cluster. To uniquely identify a {microshift-short} cluster, use the `kube-system` namespace metadata UID.
10+
11+
[NOTE]
12+
====
13+
The cluster ID for a cluster gets created only after the {microshift-short} service runs for the first time after its installation.
14+
====
15+
16+
include::modules/microshift-get-cluster-id-kubesystem.adoc[leveloffset=+1]
17+
include::modules/microshift-get-nonrunning-cluster-id-kubesystem.adoc[leveloffset=+1]

modules/microshift-gathering-sos-report.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ Your sosreport has been generated and saved in:
7676
sha256 922e5ff2db25014585b7c6c749d2c44c8492756d619df5e9838ce863f83d4269
7777
7878
Please send this file to your support representative.
79-
----
79+
----
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Module included in the following assemblies:
2+
//
3+
// microshift_support/microshift-getting-cluster-id.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="microshift-get-cluster-id-kubesystem_{context}"]
7+
= Getting the cluster ID of a running cluster
8+
9+
For a cluster that is running, you can use either step1 or step2 to get the cluster ID.
10+
11+
.Procedure
12+
13+
. Get the cluster ID of the cluster that is running by entering the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc get namespaces kube-system -o jsonpath={.metadata.uid}
18+
----
19+
.Example output
20+
+
21+
[source,terminal]
22+
----
23+
7cf13853-68f4-454e-8f5c-1af748cbfb1a
24+
----
25+
. Optional. Get the cluster ID of the cluster that is running by entering the following command:
26+
+
27+
[source,terminal]
28+
----
29+
$ sudo cat /var/lib/microshift/cluster-id
30+
----
31+
.Example output
32+
+
33+
[source,terminal]
34+
----
35+
7cf13853-68f4-454e-8f5c-1af748cbfb1a
36+
----
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
//
3+
// microshift_support/microshift-getting-cluster-id.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="microshift-get-nonrunning-cluster-id-kubesystem_{context}"]
7+
= Getting the cluster ID of a nonrunning cluster
8+
9+
For a cluster that is not running, you can get the cluster ID from the `cluster-id` file found in `/var/lib/microshift` directory.
10+
11+
.Procedure
12+
13+
. Get the cluster ID of the cluster that is not running by entering the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ sudo cat /var/lib/microshift/cluster-id
18+
----
19+
.Example output
20+
+
21+
[source,terminal]
22+
----
23+
7cf13853-68f4-454e-8f5c-1af748cbfb1a
24+
----
25+
+
26+
[NOTE]
27+
====
28+
The {microshift-short} service copies the `kube-system` namespace metadata UID to the `cluster-id` file so that the UID is accessible when the cluster is not running. You can find the `cluster-id` file in the `/var/lib/microshift` directory.
29+
====
30+
31+
. You can view the {microshift-short} database files in the `/var/lib/microshift` directory by entering the following command:
32+
+
33+
[source,terminal]
34+
----
35+
$ sudo ls -l /var/lib/microshift
36+
----
37+
.Example output
38+
+
39+
[source,terminal]
40+
----
41+
-r-------- 1 root root 36 Mar 7 11:49 /var/lib/microshift/cluster-id
42+
----

0 commit comments

Comments
 (0)