New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ceph-csi-detect-version pod not following node affinity, getting schedule in other node #10435
Comments
What i have observed only toleration policy is getting applied for rook-ceph-csi-detect-version pod apiVersion: v1 kind: Pod metadata: creationTimestamp: "2022-06-10T09:05:42Z" generateName: rook-ceph-csi-detect-version- labels: app: rook-ceph-csi-detect-version controller-uid: af80d1a5-6706-4e8a-b9f9-aa61f7c79fe5 job-name: rook-ceph-csi-detect-version rook-version: v1.6.5 managedFields: - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:generateName: {} f:labels: .: {} f:app: {} f:controller-uid: {} f:job-name: {} f:rook-version: {} f:ownerReferences: .: {} k:{"uid":"af80d1a5-6706-4e8a-b9f9-aa61f7c79fe5"}: .: {} f:apiVersion: {} f:blockOwnerDeletion: {} f:controller: {} f:kind: {} f:name: {} f:uid: {} f:spec: f:containers: k:{"name":"cmd-reporter"}: .: {} f:args: {} f:command: {} f:image: {} f:imagePullPolicy: {} f:name: {} f:resources: {} f:terminationMessagePath: {} f:terminationMessagePolicy: {} f:volumeMounts: .: {} k:{"mountPath":"/rook/copied-binaries"}: .: {} f:mountPath: {} f:name: {} f:dnsPolicy: {} f:enableServiceLinks: {} f:initContainers: .: {} k:{"name":"init-copy-binaries"}: .: {} f:args: {} f:image: {} f:imagePullPolicy: {} f:name: {} f:resources: {} f:terminationMessagePath: {} f:terminationMessagePolicy: {} f:volumeMounts: .: {} k:{"mountPath":"/rook/copied-binaries"}: .: {} f:mountPath: {} f:name: {} f:restartPolicy: {} f:schedulerName: {} f:securityContext: {} f:serviceAccount: {} f:serviceAccountName: {} f:terminationGracePeriodSeconds: {} f:tolerations: {} f:volumes: .: {} k:{"name":"rook-copied-binaries"}: .: {} f:emptyDir: {} f:name: {} manager: kube-controller-manager operation: Update time: "2022-06-10T09:05:42Z" - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:status: f:conditions: k:{"type":"ContainersReady"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:message: {} f:reason: {} f:status: {} f:type: {} k:{"type":"Initialized"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:message: {} f:reason: {} f:status: {} f:type: {} k:{"type":"Ready"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:message: {} f:reason: {} f:status: {} f:type: {} f:containerStatuses: {} f:hostIP: {} f:initContainerStatuses: {} f:startTime: {} manager: kubelet operation: Update time: "2022-06-10T09:05:42Z" name: rook-ceph-csi-detect-version-f4x2g namespace: rook-ceph ownerReferences: - apiVersion: batch/v1 blockOwnerDeletion: true controller: true kind: Job name: rook-ceph-csi-detect-version uid: af80d1a5-6706-4e8a-b9f9-aa61f7c79fe5 resourceVersion: "4242044" selfLink: /api/v1/namespaces/rook-ceph/pods/rook-ceph-csi-detect-version-f4x2g uid: d215ae08-69a9-420f-b85e-eb73e71ec1f1 spec: containers: - args: - cmd-reporter - --command - '{"cmd":["cephcsi"],"args":["--version"]}' - --config-map-name - rook-ceph-csi-detect-version - --namespace - rook-ceph command: - /rook/copied-binaries/tini - -- - /rook/copied-binaries/rook image: rt-monitoring_cephcsi:v3.3.1 imagePullPolicy: IfNotPresent name: cmd-reporter resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /rook/copied-binaries name: rook-copied-binaries - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: rook-ceph-system-token-7xc9w readOnly: true dnsPolicy: ClusterFirst enableServiceLinks: true initContainers: - args: - copy-binaries - --copy-to-dir - /rook/copied-binaries image: rt-monitoring_rook_ceph:v1.6.5 imagePullPolicy: IfNotPresent name: init-copy-binaries resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /rook/copied-binaries name: rook-copied-binaries - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: rook-ceph-system-token-7xc9w readOnly: true nodeName: pwconfig-k8s-iond-worker2 priority: 0 restartPolicy: OnFailure schedulerName: default-scheduler securityContext: {} serviceAccount: rook-ceph-system serviceAccountName: rook-ceph-system terminationGracePeriodSeconds: 30 tolerations: - effect: NoSchedule key: iond operator: Exists - effect: NoExecute key: node.kubernetes.io/not-ready operator: Exists tolerationSeconds: 300 - effect: NoExecute key: node.kubernetes.io/unreachable operator: Exists tolerationSeconds: 300 volumes: - emptyDir: {} name: rook-copied-binaries - name: rook-ceph-system-token-7xc9w secret: defaultMode: 420 secretName: rook-ceph-system-token-7xc9w status: conditions: - lastProbeTime: null lastTransitionTime: "2022-06-10T09:05:42Z" message: 'containers with incomplete status: [init-copy-binaries]' reason: ContainersNotInitialized status: "False" type: Initialized - lastProbeTime: null lastTransitionTime: "2022-06-10T09:05:42Z" message: 'containers with unready status: [cmd-reporter]' reason: ContainersNotReady status: "False" type: Ready - lastProbeTime: null lastTransitionTime: "2022-06-10T09:05:42Z" message: 'containers with unready status: [cmd-reporter]' reason: ContainersNotReady status: "False" type: ContainersReady - lastProbeTime: null lastTransitionTime: "2022-06-10T09:05:42Z" status: "True" type: PodScheduled containerStatuses: - image: rt-monitoring_cephcsi:v3.3.1 imageID: "" lastState: {} name: cmd-reporter ready: false restartCount: 0 started: false state: waiting: reason: PodInitializing hostIP: 10.120.0.159 initContainerStatuses: - image: rt-monitoring_rook_ceph:v1.6.5 imageID: "" lastState: {} name: init-copy-binaries ready: false restartCount: 0 state: waiting: reason: PodInitializing phase: Pending qosClass: BestEffort startTime: "2022-06-10T09:05:42Z" |
@hackaholic what version of Rook is used? |
If you are using Rook 1.6.5 it supports only toleration, not the affinity. rook/pkg/operator/ceph/csi/spec.go Lines 721 to 726 in 2c0d8f5
|
@hackaholic Please use later versions of Rook for this feature. Closing this issue, since the fix is already available from rook v1.8.0+ |
Is this a bug report or feature request?
ceph-csi-detect-version pod not following node affinity, getting schedule in other node
Deviation from expected behavior:
ceph-csi-detect-version pod not following node affinity, getting schedule in other node
Expected behavior:
Rook-csi-detect version pod should respect node affinity rule applied in operator.yaml
How to reproduce it (minimal and precise):
Add node affinity in operator.yaml and rollout restart operator, it will schedule pod to other node.
File(s) to submit:
Environment:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
uname -a
): Linux pwconfig-k8s-master0 3.10.0-1160.42.2.el7.x86_64 Monitor bootstrapping with libcephd #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxrook version
inside of a Rook Pod):ceph version 15.2.13 (c44bc49e7a57a87d84dfff2a077a2058aa2172e2) octopus (stable)
kubectl version
): Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.1", GitCommit:"7879fc12a63337efff607952a323df90cdc7a335", GitTreeState:"clean", BuildDate:"2020-04-08T17:38:50Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.15", GitCommit:"73dd5c840662bb066a146d0871216333181f4b64", GitTreeState:"clean", BuildDate:"2021-01-13T13:14:05Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
The text was updated successfully, but these errors were encountered: