From 0f5f2a81d74d5f02ac176816de2d16b84751ca8c Mon Sep 17 00:00:00 2001 From: travisn Date: Tue, 24 Sep 2019 17:12:38 -0600 Subject: [PATCH] ceph: allow setting affinity on the ceph version job A job is started to detect the Ceph version. This job now allows setting the node affinity and tolerations with the same setting that is specified for the mon placement. No new placement spec is required, but we will simply use the same spec that the mons use. Signed-off-by: travisn --- PendingReleaseNotes.md | 1 + pkg/operator/ceph/cluster/cluster.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/PendingReleaseNotes.md b/PendingReleaseNotes.md index 65659bc16..43d5e1b30 100644 --- a/PendingReleaseNotes.md +++ b/PendingReleaseNotes.md @@ -7,6 +7,7 @@ ### Ceph +- The job for detecting the Ceph version can be started with node affinity or tolerations according to the same settings in the Cluster CR as the mons. - A new CR property `skipUpgradeChecks` has been added, which allows you force an upgrade by skipping daemon checks. Use this at **YOUR OWN RISK**, only if you know what you're doing. To understand Rook's upgrade process of Ceph, read the [upgrade doc](Documentation/ceph-upgrade.html#ceph-version-upgrades). - Ceph OSD's admin socket is now placed under Ceph's default system location `/run/ceph`. diff --git a/pkg/operator/ceph/cluster/cluster.go b/pkg/operator/ceph/cluster/cluster.go index 33583910f..3ec5bf25b 100755 --- a/pkg/operator/ceph/cluster/cluster.go +++ b/pkg/operator/ceph/cluster/cluster.go @@ -104,6 +104,9 @@ func (c *cluster) detectCephVersion(rookImage, cephImage string, timeout time.Du job := versionReporter.Job() job.Spec.Template.Spec.ServiceAccountName = "rook-ceph-cmd-reporter" + // Apply the same node selector and tolerations for the ceph version detection as the mon daemons + cephv1.GetMonPlacement(c.Spec.Placement).ApplyToPodSpec(&job.Spec.Template.Spec) + stdout, stderr, retcode, err := versionReporter.Run(timeout) if err != nil { return nil, fmt.Errorf("failed to complete ceph version job. %+v", err)