Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rkthtrifork committed Jun 14, 2024
1 parent 0c0d8d1 commit 8e70ba9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 8e70ba9

Please sign in to comment.