Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Christmas and Beyond
-
1
Description
When dac is not enabled, it is possible to create a cluster with logging enabled, and add a server group that does not have a default or logging mount defined. This leads to a nil reference exception in ./pkg/util/k8sutil/pod_util.go Specifically L#1292
mount:=getLoggingMount(container)
|
sidecarConfig:= fbs.Sidecar
|
// Set up the volume containing the Secret contents to configure the sidecar configVolumeMount:= v1.VolumeMount{ Name: fbs.ConfigurationName, MountPath: sidecarConfig.ConfigurationMountPath, ReadOnly: true, }
|
// Ensure we specify the configuration file to use - fixed currently. configFile:= filepath.Join(sidecarConfig.ConfigurationMountPath, LoggingConfigurationFile)
|
// Set up a duplicate volume mount but make sure to set it read-only readonlyLogsMount:= mount.DeepCopy()
|
This is because mount is nil, as there are no mounts defined.
Attachments
Issue Links
- relates to
-
K8S-3354 Cloud Native 2.6.1 - Release Notes
- Closed
For Gerrit Dashboard: K8S-3302 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
202735,11 | K8S-3302 Added nil check for logging mounts | master | couchbase-operator | Status: MERGED | +2 | +1 |