Skip to content

Commit

Permalink
core: fail if config dir creation fails
Browse files Browse the repository at this point in the history
If the operator fails to create the operator's configuration directory
then we should fail the Operator.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 10a114a)
  • Loading branch information
leseb authored and mergify-bot committed Nov 8, 2021
1 parent 9148ebf commit 5a05400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/daemon/ceph/client/config.go
Expand Up @@ -115,7 +115,7 @@ func generateConfigFile(context *clusterd.Context, clusterInfo *ClusterInfo, pat

// create the config directory
if err := os.MkdirAll(pathRoot, 0744); err != nil {
logger.Warningf("failed to create config directory at %q. %v", pathRoot, err)
return "", errors.Wrapf(err, "failed to create config directory at %q", pathRoot)
}

configFile, err := createGlobalConfigFileSection(context, clusterInfo, globalConfig)
Expand Down

0 comments on commit 5a05400

Please sign in to comment.