Merge pull request #11378 from rook/mergify/bp/release-1.9/pr-11373
core: Set env var for ceph msgr to always use random nonce (backport #11373)
This commit is contained in:
2 files changed
+7
-1
No files matched your search
@@ -30,7 +30,7 @@ var requiredEnvVars = []string{
|
||||
"CONTAINER_IMAGE", "POD_NAME", "POD_NAMESPACE", "NODE_NAME",
|
||||
"ROOK_CEPH_MON_HOST", "ROOK_CEPH_MON_INITIAL_MEMBERS",
|
||||
"POD_CPU_LIMIT", "POD_MEMORY_LIMIT", "POD_MEMORY_REQUEST",
|
||||
"POD_CPU_REQUEST",
|
||||
"POD_CPU_REQUEST", "CEPH_USE_RANDOM_NONCE",
|
||||
}
|
||||
|
||||
// A ContainersTester is a helper exposing methods for testing required Ceph specifications common
|
||||
@@ -130,6 +130,9 @@ func (ct *ContainersTester) AssertEnvVarsContainCephRequirements() {
|
||||
case "POD_CPU_REQUEST":
|
||||
assert.Equal(ct.t, "requests.cpu", e.ValueFrom.ResourceFieldRef.Resource,
|
||||
"POD_CPU_REQUEST env var does not have the appropriate source:", e)
|
||||
case "CEPH_USE_RANDOM_NONCE":
|
||||
assert.Equal(ct.t, "true", e.Value,
|
||||
"CEPH_USE_RANDOM_NONCE env var does not have the appropriate source:", e)
|
||||
}
|
||||
}
|
||||
vars := FindDuplicateEnvVars(c)
|
||||
|
||||
@@ -305,6 +305,9 @@ func ClusterDaemonEnvVars(image string) []v1.EnvVar {
|
||||
// If request.cpu is not set in the pod definition, Kubernetes will use the formula "requests.cpu = limits.cpu" during pods's scheduling
|
||||
// Kubernetes will set this variable to 0 or equal to limits.cpu if set
|
||||
{Name: "POD_CPU_REQUEST", ValueFrom: &v1.EnvVarSource{ResourceFieldRef: &v1.ResourceFieldSelector{Resource: "requests.cpu"}}},
|
||||
|
||||
// All ceph daemons using msgr in a containerized environment expect to set a random nonce at startup
|
||||
{Name: "CEPH_USE_RANDOM_NONCE", Value: "true"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user