cmd/initContainer: Sprinkle some debug logs

https://github.com/containers/toolbox/pull/1631
This commit is contained in:
Debarshi Ray 2025-04-30 17:33:59 +02:00
parent ee182260b7
commit 63309e4666
1 changed files with 9 additions and 4 deletions

View File

@ -538,16 +538,21 @@ func applyCDISpecForNvidiaHookUpdateLDCache(hookArgs []string) error {
}
func configureKerberos() error {
if !utils.PathExists("/etc/krb5.conf.d") {
const logPrefix = "Configuring Kerberos to use KCM as the default credential cache"
logrus.Debugf("%s", logPrefix)
if path := "/etc/krb5.conf.d"; !utils.PathExists(path) {
logrus.Debugf("%s: directory %s not found", logPrefix, path)
logrus.Debugf("%s: skipping", logPrefix)
return nil
}
if utils.PathExists("/etc/krb5.conf.d/kcm_default_ccache") {
if path := "/etc/krb5.conf.d/kcm_default_ccache"; utils.PathExists(path) {
logrus.Debugf("%s: file %s already exists", logPrefix, path)
logrus.Debugf("%s: skipping", logPrefix)
return nil
}
logrus.Debug("Configuring Kerberos to use KCM as the default credential cache")
kcmConfigString := `# Written by Toolbx
# https://github.com/containers/toolbox
#