Skip to content

Commit 1871d25

Browse files
Add more logs around invalid phase and downloadPending (#1528)
1 parent f346d14 commit 1871d25

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/splunk/enterprise/afwscheduler.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ downloadWork:
565565
// create the sub-directories on the volume for downloading scoped apps
566566
localPath, err := downloadWorker.createDownloadDirOnOperator(ctx)
567567
if err != nil {
568+
scopedLog.Error(err, "unable to create download directory on operator", "appSrcName", downloadWorker.appSrcName, "appName", appDeployInfo.AppName)
568569

569570
// increment the retry count and mark this app as download pending
570571
updatePplnWorkerPhaseInfo(ctx, appDeployInfo, appDeployInfo.PhaseInfo.FailCount+1, enterpriseApi.AppPkgDownloadPending)
@@ -1385,12 +1386,12 @@ func validatePhaseInfo(ctx context.Context, phaseInfo *enterpriseApi.PhaseInfo)
13851386
enterpriseApi.PhaseInstall)
13861387

13871388
if !strings.Contains(phases, string(phaseInfo.Phase)) {
1388-
scopedLog.Error(nil, "Invalid phase in PhaseInfo")
1389+
scopedLog.Error(nil, "Invalid phase in PhaseInfo", "phase", string(phaseInfo.Phase))
13891390
return false
13901391
}
13911392

13921393
if ok := appPhaseInfoStatuses[phaseInfo.Status]; !ok {
1393-
scopedLog.Error(nil, "Invalid status in PhaseInfo")
1394+
scopedLog.Error(nil, "Invalid status in PhaseInfo", "phase", string(phaseInfo.Phase), "status", phaseInfo.Status)
13941395
return false
13951396
}
13961397
return true

0 commit comments

Comments
 (0)