From 8e70ba984f5a53639f515ba0e4c35f1020e2a4ba Mon Sep 17 00:00:00 2001 From: rkthtrifork Date: Fri, 14 Jun 2024 10:18:08 +0200 Subject: [PATCH] debug --- .../opensearch-gateway/services/http_request.go | 2 ++ .../opensearch-gateway/services/os_ism_service.go | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opensearch-operator/opensearch-gateway/services/http_request.go b/opensearch-operator/opensearch-gateway/services/http_request.go index 88b6e5644..653988ed6 100644 --- a/opensearch-operator/opensearch-gateway/services/http_request.go +++ b/opensearch-operator/opensearch-gateway/services/http_request.go @@ -6,6 +6,7 @@ import ( "net/http" "strings" + "github.com/davecgh/go-spew/spew" "github.com/opensearch-project/opensearch-go" "github.com/opensearch-project/opensearch-go/opensearchapi" "sigs.k8s.io/controller-runtime/pkg/log" @@ -56,6 +57,7 @@ func doHTTPPut(ctx context.Context, client *opensearch.Client, path strings.Buil lg := log.FromContext(ctx).WithValues("os_service", "policy") lg.Info("rkth request body: " + buf.String()) req, err := http.NewRequest(http.MethodPut, path.String(), body) + lg.Info("rkth request: " + spew.Sdump(req)) if err != nil { return nil, err } diff --git a/opensearch-operator/opensearch-gateway/services/os_ism_service.go b/opensearch-operator/opensearch-gateway/services/os_ism_service.go index 5158394fa..2290cc71d 100644 --- a/opensearch-operator/opensearch-gateway/services/os_ism_service.go +++ b/opensearch-operator/opensearch-gateway/services/os_ism_service.go @@ -98,8 +98,7 @@ func UpdateISMPolicy(ctx context.Context, service *OsClusterClient, ismpolicy re } defer resp.Body.Close() if resp.IsError() { - lg.Info("rkth os_ism_service.go 2") - return fmt.Errorf("failed to create ism policy: %s", resp.String()) + return fmt.Errorf("failed to update ism policy: %s", resp.String()) } return nil }