diff --git a/base/api/client.go b/base/api/client.go index 6bab2de53..5aeb3d470 100644 --- a/base/api/client.go +++ b/base/api/client.go @@ -44,6 +44,7 @@ func (o *Client) Request(ctx *context.Context, method, url string, return httpResp, errors.Wrap(err, "Response body reading failed") } + utils.LogDebug("bodyBytes", bodyBytes, "client.Request()") if len(bodyBytes) > 0 { err = json.Unmarshal(bodyBytes, responseOutPtr) if err != nil { diff --git a/manager/controllers/template_systems_update.go b/manager/controllers/template_systems_update.go index 25e0d7b47..b56e66e6f 100644 --- a/manager/controllers/template_systems_update.go +++ b/manager/controllers/template_systems_update.go @@ -69,6 +69,7 @@ func TemplateSystemsUpdateHandler(c *gin.Context) { if err != nil { return } + utils.LogDebug("TemplateSystemsUpdateHandler env assigned") // re-evaluate systems added/removed from templates if config.EnableTemplateChangeEval { @@ -172,16 +173,19 @@ func templateArchVersionMatch( func callCandlepin(ctx context.Context, consumer string, request *candlepin.ConsumersUpdateRequest) ( *candlepin.ConsumersUpdateResponse, error) { candlepinEnvConsumersURL := utils.CoreCfg.CandlepinAddress + "/consumers/" + consumer + utils.LogDebug("candlepinEnvConsumersURL ", candlepinEnvConsumersURL) candlepinFunc := func() (interface{}, *http.Response, error) { utils.LogTrace("request", *request, "candlepin /consumers request") candlepinResp := candlepin.ConsumersUpdateResponse{} resp, err := candlepinClient.Request(&ctx, http.MethodPut, candlepinEnvConsumersURL, request, &candlepinResp) + utils.LogDebug("resp", resp.Body, "err", err, "candlepinClient.Request()") statusCode := utils.TryGetStatusCode(resp) utils.LogDebug("status_code", statusCode, "candlepin /consumers call") utils.LogTrace("response", resp, "candlepin /consumers response") if err != nil && statusCode == 400 { err = errors.Wrap(errCandlepin, err.Error()) } + utils.LogDebug("return callCandlepin") return &candlepinResp, resp, err } @@ -225,6 +229,7 @@ func assignCandlepinEnvironment(db *gorm.DB, accountID int, env *string, invento err = errors2.Join(err, apiErr, errors.New(resp.Message)) } } + utils.LogDebug("return assignCandlepinEnvironment") return err }