ceph: enable debug logging in the osd prepare job
All processes created with the exec package will now only have debug logging for the commands and their output. The osd prepare job relies heavily on many of these commands so we can enable debug logging for the entire job. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This commit is contained in:
1 file changed
+11
@@ -823,6 +823,9 @@ func (c *Cluster) provisionOSDContainer(osdProps osdProperties, copyBinariesMoun
|
||||
osdOnPVCMetadata := osdProps.metadataPVC.ClaimName != ""
|
||||
envVars := c.getConfigEnvVars(osdProps, k8sutil.DataDir)
|
||||
|
||||
// enable debug logging in the prepare job
|
||||
envVars = append(envVars, setDebugLogLevelEnvVar(true))
|
||||
|
||||
// only 1 of device list, device filter, device path filter and use all devices can be specified. We prioritize in that order.
|
||||
if len(osdProps.devices) > 0 {
|
||||
deviceNames := make([]string, len(osdProps.devices))
|
||||
@@ -1010,6 +1013,14 @@ func pvcBackedOSDEnvVar(pvcBacked string) v1.EnvVar {
|
||||
return v1.EnvVar{Name: pvcBackedOSDVarName, Value: pvcBacked}
|
||||
}
|
||||
|
||||
func setDebugLogLevelEnvVar(debug bool) v1.EnvVar {
|
||||
level := "INFO"
|
||||
if debug {
|
||||
level = "DEBUG"
|
||||
}
|
||||
return v1.EnvVar{Name: "ROOK_LOG_LEVEL", Value: level}
|
||||
}
|
||||
|
||||
func blockPathEnvVariable(lvPath string) v1.EnvVar {
|
||||
return v1.EnvVar{Name: blockPathVarName, Value: lvPath}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user