Skip to content

Commit 1f8bfef

Browse files
committed
WIP - MIG-1542: Document skipping SELinux relabelling
Signed-off-by: A.Arnold <[email protected]>
1 parent 726edaa commit 1f8bfef

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

migration_toolkit_for_containers/mtc-direct-migration-requirements.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,11 @@ include::modules/migration-rsync-mig-migration-root-non-root.adoc[leveloffset=+3
5656

5757
include::modules/mtc-mig-cluster-configuration.adoc[leveloffset=+2]
5858

59+
60+
[id="mtc-direct-migration-known-issues_{context}"]
61+
== Direct migration known issues
62+
63+
include::modules/relabeling-selinux-workaround.adoc[leveloffset=+2]
64+
65+
5966
:!mtc-direct-migration-requirements:

migration_toolkit_for_containers/troubleshooting-mtc.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[id="troubleshooting-mtc"]
33
= Troubleshooting
44
include::_attributes/common-attributes.adoc[]
5+
include::_attributes/attributes-openshift-dedicated.adoc[]
56
:context: troubleshooting-mtc
67
:troubleshooting-mtc:
78
:namespace: openshift-migration
@@ -43,6 +44,7 @@ This section describes common issues and concerns that can cause issues during m
4344

4445
include::modules/migration-dvm-error-node-selectors.adoc[leveloffset=+2]
4546
include::modules/migration-error-messages.adoc[leveloffset=+2]
47+
include::modules/relabeling-selinux-workaround.adoc[leveloffset=+2]
4648

4749
[id="rolling-back-migration_{context}"]
4850
== Rolling back a migration
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Module included in the following assemblies:
2+
//
3+
// migration_toolkit_for_containers/troubleshooting-mtc.adoc
4+
// migration_toolkit_for_containers/mtc-direct-migration-requirements.adoc
5+
6+
:_mod-docs-content-type: CONCEPT
7+
[id="relabeling-selinux-workaround_{context}"]
8+
= Applying the Skip SELinux relabel workaround with `spc_t` automatically on workloads running on {OCP}
9+
10+
When attempting to migrate a namespace with {mtc-full} ({mtc-short}) and a substantial volume associated with it, the `rsync-server` may become frozen without any further information to troubleshoot the issue.
11+
12+
[id="diagnosis-selinux-workaround_{context}"]
13+
== Diagnosing the need for the Skip SELinux relabel workaround
14+
15+
Search for an error of `Unable to attach or mount volumes for pod...timed out waiting for the condition` in the kubelet logs from the node where the `rsync-server` for the Direct Volume Migration (DVM) runs.
16+
17+
.Example kubelet log
18+
[source,yaml]
19+
----
20+
kubenswrapper[3879]: W0326 16:30:36.749224 3879 volume_linux.go:49] Setting volume ownership for /var/lib/kubelet/pods/8905d88e-6531-4d65-9c2a-eff11dc7eb29/volumes/kubernetes.io~csi/pvc-287d1988-3fd9-4517-a0c7-22539acd31e6/mount and fsGroup set. If the volume has a lot of files then setting volume ownership could be slow, see https://github.com/kubernetes/kubernetes/issues/69699
21+
22+
kubenswrapper[3879]: E0326 16:32:02.706363 3879 kubelet.go:1841] "Unable to attach or mount volumes for pod; skipping pod" err="unmounted volumes=[8db9d5b032dab17d4ea9495af12e085a], unattached volumes=[crane2-rsync-server-secret 8db9d5b032dab17d4ea9495af12e085a kube-api-access-dlbd2 crane2-stunnel-server-config crane2-stunnel-server-secret crane2-rsync-server-config]: timed out waiting for the condition" pod="caboodle-preprod/rsync-server"
23+
24+
kubenswrapper[3879]: E0326 16:32:02.706496 3879 pod_workers.go:965] "Error syncing pod, skipping" err="unmounted volumes=[8db9d5b032dab17d4ea9495af12e085a], unattached volumes=[crane2-rsync-server-secret 8db9d5b032dab17d4ea9495af12e085a kube-api-access-dlbd2 crane2-stunnel-server-config crane2-stunnel-server-secret crane2-rsync-server-config]: timed out waiting for the condition" pod="caboodle-preprod/rsync-server" podUID=8905d88e-6531-4d65-9c2a-eff11dc7eb29
25+
----
26+
27+
[id="resolving-selinux-workaround_{context}"]
28+
== Resolving using the Skip SELinux relabel workaround
29+
30+
To resolve this issue, set the `migration_rsync_super_privileged` parameter to `true` in both the source and destination `MigClusters` using the `MigrationController` custom resource (CR).
31+
32+
.Example MigrationController CR
33+
34+
[source,yaml]
35+
----
36+
apiVersion: migration.openshift.io/v1alpha1
37+
kind: MigrationController
38+
metadata:
39+
name: migration-controller
40+
namespace: openshift-migration
41+
spec:
42+
migration_rsync_super_privileged: true # <1>
43+
azure_resource_group: ""
44+
cluster_name: host
45+
mig_namespace_limit: "10"
46+
mig_pod_limit: "100"
47+
mig_pv_limit: "100"
48+
migration_controller: true
49+
migration_log_reader: true
50+
migration_ui: true
51+
migration_velero: true
52+
olm_managed: true
53+
restic_timeout: 1h
54+
version: 1.8.3
55+
----
56+
57+
<1> The value of the `migration_rsync_super_privileged` parameter indicates whether or not to run Rsync Pods as _super privileged_ containers (`spc_t selinux context`). Valid settings are `true` or `false`.

0 commit comments

Comments
 (0)