@@ -82,16 +82,20 @@ func CheckStatusOrRunProdWorkflow(ctx context.Context,
8282 // 2) we already finished & removed workflow for Instance -> in this case we should never get here
8383 runErr := runProdWorkflow (ctx , kubeClient , deviceInfo , instance )
8484 if runErr != nil {
85+ zlog .Error ().Err (runErr ).Msgf ("Failed to run Prod workflow for host %s and Error is %s" ,
86+ deviceInfo .GUID , runErr .Error ())
8587 return runErr
8688 }
8789
88- // runProdWorkflow returned no error, but we return an error here so that the upper layer can handle it appropriately
90+ // runProdWorkflow returned no error, but we return an error here so that the
91+ // upper layer can handle it appropriately
8992 // and reconcile until the workflow is finished.
9093 return inv_errors .Errorfr (inv_errors .Reason_OPERATION_IN_PROGRESS , "Prod workflow started, waiting for it to complete" )
9194 }
9295
9396 if err != nil {
9497 // some unexpected error, we fail to get workflow status
98+ zlog .Error ().Err (err ).Msgf ("Failed to run Prod workflow for host %s and Error is %s" , deviceInfo .GUID , err .Error ())
9599 return err
96100 }
97101
@@ -116,6 +120,7 @@ func runProdWorkflow(
116120 deviceInfo .AuthClientID = clientID
117121 deviceInfo .AuthClientSecret = clientSecret
118122 deviceInfo .TenantID = instance .GetTenantId ()
123+ deviceInfo .OSTLSCACert = instance .GetOs ().GetTlsCaCert ()
119124
120125 if instance .GetLocalaccount () != nil {
121126 deviceInfo .LocalAccountUserName = instance .GetLocalaccount ().Username
@@ -165,7 +170,7 @@ func getWorkflow(ctx context.Context, k8sCli client.Client, workflowName, hostRe
165170 }
166171
167172 if clientErr != nil {
168- zlog .InfraSec ().InfraErr (clientErr ).Msgf ("" )
173+ zlog .InfraSec ().InfraErr (clientErr ).Msgf ("Failed to get workflow %s status. Error is %s" , workflowName , clientErr . Error () )
169174 // some other error that may need retry
170175 return nil , inv_errors .Errorf ("Failed to get workflow %s status." , workflowName )
171176 }
0 commit comments