diff --git a/.golangci.yml b/.golangci.yml index 2be99c4a8..a8bf88650 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -43,7 +43,6 @@ linters: - sloglint - staticcheck - stylecheck - - tenv - testableexamples - testifylint - thelper diff --git a/.harvest.env b/.harvest.env index b7624931c..008fab13f 100644 --- a/.harvest.env +++ b/.harvest.env @@ -1 +1 @@ -GO_VERSION=1.23.6 \ No newline at end of file +GO_VERSION=1.24.0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b23a3e2b0..9aa0cb0c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,161 @@ # Change Log ## [Releases](https://github.com/NetApp/harvest/releases) +## 25.02.0 / 2025-02-11 Release +:pushpin: Highlights of this major release include: +## :star: New Features + +- :star: The Volume dashboard was updated to clarify that volume latencies are missing some latencies from NAS protocols. Use the workload volume metrics in the QoS row for a more detailed breakdown. Thanks to MatthiasS for reporting. + +- All Harvest dashboards default to Datacenter=All instead of the first datacenter in the list. Thanks to @roybatty2019 for reporting. + +- Harvest provides a [FIPS 140-3 compliant](https://go.dev/doc/security/fips140) container image, available as a separate image at `ghcr.io/netapp/harvest:25.02.0-1-fips`. + +- :ear_of_rice: Harvest `bin/grafana import` + - Supports nested Grafana folders. Thanks to @IvanZenger for reporting. + - Supports setting variables' default values during import. See [#3384](https://github.com/NetApp/harvest/issues/3384) for details. Thanks to @mamoep for reporting. + +- Harvest collects shelf firmware versions and shows them in the Shelf dashboard, Module row. Thanks to @summertony15 for reporting. + +- :star: Several of the existing dashboards include new panels in this release: + - The `Disk` dashboard includes a `Top Disk and Tape Drives Throughput by Host Adapter` panel. Thanks to Amir for reporting. + - The `Datacenter` and `Data Protection` dashboards were updated with data protection buckets and policy rows. + +- The volumes templates exclude transient volumes by default. Thanks to Yann for reporting. + +- Harvest collects rewind context (rwctx) metrics for ONTAP 9.16.0 and later. Thanks to @shawnahall71 for reporting. + +- :closed_book: Documentation additions + - Document [Podman Quadlet](https://netapp.github.io/harvest/nightly/install/quadlet/) as a deployment option. Thanks to ttlexceeded for reporting. + - Describe how to use a [Go binary as a credential script](https://github.com/NetApp/harvest/discussions/3380) for Harvest. Thanks to AdiZ for reporting. + +## :rocket: Performance Improvements + +- RestPerf collector uses less memory by streaming results. + +In case you missed the previous `24.11.1` dot release, here are the features included in it: + +## :rocket: Performance Improvements in 24.11.1 + +- Significant memory footprint improvements for the REST collector. More details [here](https://github.com/NetApp/harvest/pull/3310#issue-2676698124). Thanks to @Ryan for reporting it. +- Reduced memory footprint by using streaming in the REST collector. + +## :star: New Features in 24.11.1 + +- Harvest supports Top files metrics collection. More details [here](https://github.com/NetApp/harvest/discussions/3130). +- Volume and Cluster tags are supported via Volume and Cluster dashboards. +- Field Replaceable Unit (FRU) details have been added to the power dashboard. +- Track ONTAP image update progress for a cluster via the Cluster dashboard. Thanks to @knappmi for reporting it. +- `prom_port` is now supported within the poller. More details [here](https://netapp.github.io/harvest/nightly/prometheus-exporter/#per-poller-prom_port). +- We've fixed an intermittent latency/operations spike issue in the plugin-generated Harvest performance metrics. Thanks to @wooyoungAhn for reporting it. + +## Announcements + +:bangbang: **IMPORTANT** Harvest version 25.02.0 disables the out-of-the-box `Qtree` templates because of reported ONTAP slowdowns when collecting a large number of qtree objects. If you want to enable the Qtree templates, please see these [instructions](https://github.com/NetApp/harvest/discussions/3446). + +:bangbang: **IMPORTANT** Harvest version 25.02.0 removes the `WorkloadDetail` and `WorkloadDetailVolume` templates and all dashboard panels that use them. These templates are removed because they are expensive to collect and currently there is no way to collect them from ONTAP without introducing an unacceptable amount of skew in the results. See [#3423](https://github.com/NetApp/harvest/issues/3423) for details. + +:bangbang: **IMPORTANT** If using Docker Compose and you want to keep your historical Prometheus data, please read [how to migrate your Prometheus volume](https://github.com/NetApp/harvest/blob/main/docs/MigratePrometheusDocker.md) + +:bulb: **IMPORTANT** After upgrade, don't forget to re-import your dashboards, so you get all the new enhancements and fixes. You can import them via the 'bin/harvest grafana import' CLI, from the Grafana UI, or from the 'Maintenance > Reset Harvest Dashboards' button in NAbox3. For NAbox4, this step is not needed. + +## Known Issues + +:bulb: **IMPORTANT** FSx ZapiPerf workload collector fails to collect metrics, please use RestPerf instead. + +## Thanks to all the awesome contributors + +:metal: Thanks to all the people who've opened issues, asked questions on Discord, and contributed code or dashboards this release: + +@Falcon667, @IvanZenger, @cheese1, @embusalacchi, @mamoep, @roybatty2019, @summertony15, AdiZ, Amir, MatthiasS, Yann, ttlexceeded + +:seedling: This release includes 18 features, 23 bug fixes, 8 documentation, 1 performance, 1 refactoring, 6 miscellaneous, and 12 ci pull requests. + +### :rocket: Features +- Hide Transient Volumes ([#3337](https://github.com/NetApp/harvest/pull/3337)) +- Adding Ifgrp Api To Fetch Ifgrp Labels In Net_port ([#3342](https://github.com/NetApp/harvest/pull/3342)) +- Adding Rwctx Template For Restperf In 9.16.0 ([#3349](https://github.com/NetApp/harvest/pull/3349)) +- Add Disk And Tape Drives Throughput By Host Adapter ([#3372](https://github.com/NetApp/harvest/pull/3372)) +- Adding The Bucket And Policy Rest Template ([#3374](https://github.com/NetApp/harvest/pull/3374)) +- Include Lun And Namespace Templates In Keyperf ([#3379](https://github.com/NetApp/harvest/pull/3379)) +- Dashboard Variables Set Default Value On Import ([#3399](https://github.com/NetApp/harvest/pull/3399)) +- Optimize Workload_detail And Workload_detail_volume Through Delay Center Filter ([#3406](https://github.com/NetApp/harvest/pull/3406)) +- Handled Empty Admin Svm In Plugin Call ([#3410](https://github.com/NetApp/harvest/pull/3410)) +- Support Metric For Module Type In Frus ([#3411](https://github.com/NetApp/harvest/pull/3411)) +- Harvest Grafana Import Should Support Nested Grafana Folders ([#3417](https://github.com/NetApp/harvest/pull/3417)) +- Remove Workload Detail Templates ([#3433](https://github.com/NetApp/harvest/pull/3433)) +- Add Streaming To Keyperf Collector ([#3435](https://github.com/NetApp/harvest/pull/3435)) +- Negative Metrics Spike Handling ([#3439](https://github.com/NetApp/harvest/pull/3439)) +- Disabled Qtree Perf Template And Update Docs ([#3445](https://github.com/NetApp/harvest/pull/3445)) +- Harvest Dashboards Should Default To Datacenter=All ([#3448](https://github.com/NetApp/harvest/pull/3448)) +- Update Qos Row In Volume Dashboard ([#3453](https://github.com/NetApp/harvest/pull/3453)) +- Improve Cp Summary In Disk Dashboard ([#3456](https://github.com/NetApp/harvest/pull/3456)) + +### :bug: Bug Fixes +- Include Instances Generated By Inbuilt Plugins In Plugininstances Log ([#3343](https://github.com/NetApp/harvest/pull/3343)) +- Handled Duplicate Key In Securityauditdestination ([#3348](https://github.com/NetApp/harvest/pull/3348)) +- Harvest Permissions Should Include Fru ([#3354](https://github.com/NetApp/harvest/pull/3354)) +- No Instances Handling In Rest Collector ([#3358](https://github.com/NetApp/harvest/pull/3358)) +- Rest No Instance Handling ([#3360](https://github.com/NetApp/harvest/pull/3360)) +- Don't Clear Performance Volume Cache When There Is An Error ([#3361](https://github.com/NetApp/harvest/pull/3361)) +- Failed To Find Scanner Instance In Cache Zapiperf ([#3366](https://github.com/NetApp/harvest/pull/3366)) +- Installation Broken On Debian 11 Bullseye ([#3368](https://github.com/NetApp/harvest/pull/3368)) +- Changed Var Label To Ne Null From Empty ([#3385](https://github.com/NetApp/harvest/pull/3385)) +- Update Snapshot Policy Endpoint ([#3391](https://github.com/NetApp/harvest/pull/3391)) +- Update Export Rule Endpoint ([#3392](https://github.com/NetApp/harvest/pull/3392)) +- Upgrade Golang.org/X/Net Due To Dependabot Alert ([#3395](https://github.com/NetApp/harvest/pull/3395)) +- Update Export Rule Endpoint ([#3396](https://github.com/NetApp/harvest/pull/3396)) +- Remove Redundant Label From Node Template ([#3404](https://github.com/NetApp/harvest/pull/3404)) +- Enable Request/Response Logging For Restperf ([#3408](https://github.com/NetApp/harvest/pull/3408)) +- Disable Cache To Avoid Cache Poisoning Attack ([#3409](https://github.com/NetApp/harvest/pull/3409)) +- Duplicate Time Series In Volume Dashboard ([#3418](https://github.com/NetApp/harvest/pull/3418)) +- Update Tr Link In Security Dashboard ([#3419](https://github.com/NetApp/harvest/pull/3419)) +- Typo ([#3425](https://github.com/NetApp/harvest/pull/3425)) +- Handle Only Labels In Zapi Snapshotpolicy ([#3444](https://github.com/NetApp/harvest/pull/3444)) +- "Top Ethernet Ports By Utilization %" Panel Legend Should Not In… ([#3451](https://github.com/NetApp/harvest/pull/3451)) +- Handle Cp Labels In Dashboard ([#3455](https://github.com/NetApp/harvest/pull/3455)) +- Cloud Target Template Should Not Export Access_Key ([#3470](https://github.com/NetApp/harvest/pull/3470)) + +### :closed_book: Documentation +- Fix Release Announcements ([#3330](https://github.com/NetApp/harvest/pull/3330)) +- Keyperf Documentation ([#3345](https://github.com/NetApp/harvest/pull/3345)) +- Updating Doc For Custom.yaml ([#3352](https://github.com/NetApp/harvest/pull/3352)) +- Rest Endpoint Permissions ([#3359](https://github.com/NetApp/harvest/pull/3359)) +- Add Go Binary Steps For Credential Script ([#3381](https://github.com/NetApp/harvest/pull/3381)) +- Fix Alignment Of Template ([#3421](https://github.com/NetApp/harvest/pull/3421)) +- Document Podman Quadlet As A Deployment Option ([#3442](https://github.com/NetApp/harvest/pull/3442)) +- Add Description About Cp In Disk Dashboard ([#3454](https://github.com/NetApp/harvest/pull/3454)) + +### :zap: Performance +- Restperf Should Stream Results While Parsing ([#3356](https://github.com/NetApp/harvest/pull/3356)) + +### Refactoring +- Remove Openapi Dependency ([#3436](https://github.com/NetApp/harvest/pull/3436)) + +### Miscellaneous +- Merge 24.11.1 To Main ([#3328](https://github.com/NetApp/harvest/pull/3328)) +- Update Module Github.com/Shirou/Gopsutil/V4 To V4.24.11 ([#3347](https://github.com/NetApp/harvest/pull/3347)) +- Update All Dependencies ([#3365](https://github.com/NetApp/harvest/pull/3365)) +- Update All Dependencies ([#3407](https://github.com/NetApp/harvest/pull/3407)) +- Update All Dependencies ([#3450](https://github.com/NetApp/harvest/pull/3450)) +- Update All Dependencies ([#3457](https://github.com/NetApp/harvest/pull/3457)) + +### :hammer: CI +- Fix Go Vet Errors ([#3331](https://github.com/NetApp/harvest/pull/3331)) +- Add Misspell, Nakedret, And Predeclared Linter ([#3350](https://github.com/NetApp/harvest/pull/3350)) +- Bump Go ([#3351](https://github.com/NetApp/harvest/pull/3351)) +- Add Role Permissions Validation ([#3375](https://github.com/NetApp/harvest/pull/3375)) +- Enable More Linters ([#3413](https://github.com/NetApp/harvest/pull/3413)) +- Add Workflow Permissions At Codeql Recommendation ([#3426](https://github.com/NetApp/harvest/pull/3426)) +- Add Workflow Permissions At Codeql Recommendation ([#3427](https://github.com/NetApp/harvest/pull/3427)) +- Pin Actions To Sha ([#3428](https://github.com/NetApp/harvest/pull/3428)) +- Cheese1 Has Signed The Ccla ([#3429](https://github.com/NetApp/harvest/pull/3429)) +- Bump Go ([#3430](https://github.com/NetApp/harvest/pull/3430)) +- Ci-Local Requires Passing Admin Argument ([#3431](https://github.com/NetApp/harvest/pull/3431)) +- Bump Go ([#3452](https://github.com/NetApp/harvest/pull/3452)) + +--- + ## 24.11.1 / 2024-11-25 Release :pushpin: Highlights of this major release include: ## :rocket: Performance Improvements diff --git a/Makefile b/Makefile index b5502584a..0abc28588 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ .PHONY: help deps clean build test fmt lint package asup dev fetch-asup ci SHELL := /bin/bash -REQUIRED_GO_VERSION := 1.23 +REQUIRED_GO_VERSION := 1.24 GOLANGCI_LINT_VERSION := latest GOVULNCHECK_VERSION := latest ifneq (, $(shell which go)) @@ -40,9 +40,6 @@ ifneq (,$(wildcard $(HARVEST_ENV))) export $(shell sed '/^\#/d; s/=.*//' $(HARVEST_ENV)) endif -# FIPS flag -FIPS ?= 0 - help: ## Display this help @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-11s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) @@ -103,13 +100,8 @@ all: package ## Build, Test, Package harvest: deps @mkdir -p bin @# Build the harvest and poller cli -ifeq ($(FIPS), 1) - @echo "Building with BoringCrypto (FIPS compliance)" - GOEXPERIMENT=boringcrypto GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=1 go build -trimpath -tags boringcrypto -o bin -ldflags=$(LD_FLAGS) ./cmd/harvest ./cmd/poller -else @echo "Building" @GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=$(CGO_ENABLED) go build -trimpath -o bin -ldflags=$(LD_FLAGS) ./cmd/harvest ./cmd/poller -endif @cp service/contrib/grafana bin; chmod +x bin/grafana ############################################################################### @@ -138,7 +130,7 @@ asup: else\ git clone -b ${BRANCH} https://${GIT_TOKEN}@github.com/NetApp/harvest-private.git ${ASUP_TMP};\ fi - @cd ${ASUP_TMP}/harvest-asup && make ${ASUP_MAKE_TARGET} VERSION=${VERSION} RELEASE=${RELEASE} FIPS=${FIPS} + @cd ${ASUP_TMP}/harvest-asup && make ${ASUP_MAKE_TARGET} VERSION=${VERSION} RELEASE=${RELEASE} @mkdir -p ${CURRENT_DIR}/autosupport @cp ${ASUP_TMP}/harvest-asup/bin/asup ${CURRENT_DIR}/autosupport diff --git a/autosupport/README.md b/autosupport/README.md index 49d9f17c1..19f9df086 100644 --- a/autosupport/README.md +++ b/autosupport/README.md @@ -2221,7 +2221,6 @@ An example payload sent by Harvest looks like this. You can see exactly what Har "ipspace.name", "scope", "ssl_enabled", - "access_key", "port", "provider_type", "server", diff --git a/cmd/collectors/rest/plugins/clustersoftware/clustersoftware.go b/cmd/collectors/rest/plugins/clustersoftware/clustersoftware.go index c18d96e52..a19b682a3 100644 --- a/cmd/collectors/rest/plugins/clustersoftware/clustersoftware.go +++ b/cmd/collectors/rest/plugins/clustersoftware/clustersoftware.go @@ -150,6 +150,12 @@ func (c *ClusterSoftware) handleUpdateDetails(updateDetailsJSON gjson.Result, gl state := updateDetail.Get("state").ClonedString() elapsedDuration := updateDetail.Get("elapsed_duration").ClonedString() nodeName := updateDetail.Get("node.name").ClonedString() + + // If nodeName is empty then skip further processing + if nodeName == "" { + continue + } + key = phase + state + nodeName if clusterUpdateInstance, err = c.data[updateMatrix].NewInstance(key); err != nil { diff --git a/cmd/harvest/fips.go b/cmd/harvest/fips.go deleted file mode 100644 index 0635063dc..000000000 --- a/cmd/harvest/fips.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build boringcrypto - -package main - -import ( - _ "crypto/tls/fipsonly" -) diff --git a/cmd/poller/fips.go b/cmd/poller/fips.go deleted file mode 100644 index 0635063dc..000000000 --- a/cmd/poller/fips.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build boringcrypto - -package main - -import ( - _ "crypto/tls/fipsonly" -) diff --git a/cmd/poller/poller.go b/cmd/poller/poller.go index 5d3731db5..495d6077b 100644 --- a/cmd/poller/poller.go +++ b/cmd/poller/poller.go @@ -26,6 +26,7 @@ package main import ( "bytes" "context" + "crypto/fips140" "crypto/tls" "crypto/x509" "encoding/json" @@ -233,6 +234,7 @@ func (p *Poller) Init() error { slog.String("configPath", configPath), slog.String("cwd", getwd), slog.String("version", strings.TrimSpace(version.String())), + slog.Bool("fips", fips140.Enabled()), slog.Any("options", p.options), ) diff --git a/conf/rest/9.11.0/cloud_target.yaml b/conf/rest/9.11.0/cloud_target.yaml index dfdaef423..7e3e2a6de 100644 --- a/conf/rest/9.11.0/cloud_target.yaml +++ b/conf/rest/9.11.0/cloud_target.yaml @@ -5,7 +5,6 @@ object: cloud_target counters: - ^^uuid => uuid - - ^access_key => access_key - ^authentication_type => authentication_type - ^certificate_validation_enabled => certificate_validation_enabled - ^container => container @@ -24,7 +23,6 @@ export_options: - name - server instance_labels: - - access_key - authentication_type - certificate_validation_enabled - ipspace diff --git a/conf/rest/9.12.0/cloud_target.yaml b/conf/rest/9.12.0/cloud_target.yaml index 86c985095..1d8ce7a92 100644 --- a/conf/rest/9.12.0/cloud_target.yaml +++ b/conf/rest/9.12.0/cloud_target.yaml @@ -5,7 +5,6 @@ object: cloud_target counters: - ^^uuid => uuid - - ^access_key => access_key - ^authentication_type => authentication_type - ^certificate_validation_enabled => certificate_validation_enabled - ^container => container @@ -25,7 +24,6 @@ export_options: - name - server instance_labels: - - access_key - authentication_type - certificate_validation_enabled - ipspace diff --git a/conf/zapi/cdot/9.10.0/aggr_object_store_config.yaml b/conf/zapi/cdot/9.10.0/aggr_object_store_config.yaml index 7365b7595..209708419 100644 --- a/conf/zapi/cdot/9.10.0/aggr_object_store_config.yaml +++ b/conf/zapi/cdot/9.10.0/aggr_object_store_config.yaml @@ -6,7 +6,6 @@ object: cloud_target counters: aggr-object-store-config-info: - ^^object-store-uuid => uuid - - ^access-key => access_key - ^auth-type => authentication_type - ^ipspace => ipspace - ^is-certificate-validation-enabled => certificate_validation_enabled @@ -24,7 +23,6 @@ export_options: - name - server instance_labels: - - access_key - authentication_type - certificate_validation_enabled - ipspace diff --git a/container/onePollerPerContainer/Dockerfile b/container/onePollerPerContainer/Dockerfile index b75554b18..5541c9e09 100644 --- a/container/onePollerPerContainer/Dockerfile +++ b/container/onePollerPerContainer/Dockerfile @@ -9,7 +9,6 @@ ARG BUILD_DIR=/opt/home ARG VERSION=2.0 ARG RELEASE=nightly ARG ASUP_MAKE_TARGET=build -ARG FIPS=0 # Set the Current Working Directory inside the container WORKDIR $BUILD_DIR @@ -20,9 +19,9 @@ COPY . . RUN --mount=type=secret,id=git_token \ if [[ -n "$ASUP_MAKE_TARGET" && -f "/run/secrets/git_token" ]]; then \ - make build asup VERSION=$VERSION RELEASE=$RELEASE ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET GIT_TOKEN=$(cat /run/secrets/git_token) FIPS=$FIPS ; \ + make build asup VERSION=$VERSION RELEASE=$RELEASE ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET GIT_TOKEN=$(cat /run/secrets/git_token); \ else \ - make build VERSION=$VERSION RELEASE=$RELEASE BIN_PLATFORM=linux FIPS=$FIPS ;\ + make build VERSION=$VERSION RELEASE=$RELEASE BIN_PLATFORM=linux; \ fi RUN cp -a $BUILD_DIR/harvest.yml $INSTALL_DIR/harvest.yml.example \ @@ -30,25 +29,17 @@ RUN cp -a $BUILD_DIR/harvest.yml $INSTALL_DIR/harvest.yml.example \ && cp -a $BUILD_DIR/container/onePollerPerContainer/docker-compose.tmpl $INSTALL_DIR/container/onePollerPerContainer \ && cp -aR $BUILD_DIR/container/prometheus $INSTALL_DIR/container/ -# Create directories and conditionally copy .so files if FIPS is enabled -RUN mkdir -p /temp_libs/x86_64-linux-gnu /temp_libs/lib64 && \ - if [ "$FIPS" -eq "1" ]; then \ - cp /lib/x86_64-linux-gnu/libresolv.so.2 /temp_libs/x86_64-linux-gnu/ && \ - cp /lib/x86_64-linux-gnu/libpthread.so.0 /temp_libs/x86_64-linux-gnu/ && \ - cp /lib/x86_64-linux-gnu/libc.so.6 /temp_libs/x86_64-linux-gnu/ && \ - cp /lib64/ld-linux-x86-64.so.2 /temp_libs/lib64/; \ - fi - FROM gcr.io/distroless/static-debian12:debug ARG INSTALL_DIR=/opt/harvest ENV HARVEST_DOCKER=yes -COPY --from=builder $INSTALL_DIR $INSTALL_DIR -# Conditionally copy .so files from builder stage if they exist -COPY --from=builder /temp_libs/x86_64-linux-gnu/ /lib/x86_64-linux-gnu/ -COPY --from=builder /temp_libs/lib64/ /lib64/ +COPY --from=builder $INSTALL_DIR $INSTALL_DIR WORKDIR $INSTALL_DIR +# Set GODEBUG environment variable based on build argument +ARG GODEBUG +ENV GODEBUG=${GODEBUG} + ENTRYPOINT ["bin/poller"] \ No newline at end of file diff --git a/docs/ontap-metrics.md b/docs/ontap-metrics.md index 4c623ea2c..20aea031d 100644 --- a/docs/ontap-metrics.md +++ b/docs/ontap-metrics.md @@ -7,7 +7,7 @@ These can be generated on demand by running `bin/harvest grafana metrics`. See - More information about ONTAP REST performance counters can be found [here](https://docs.netapp.com/us-en/ontap-pcmap-9121/index.html). ``` -Creation Date : 2025-Jan-29 +Creation Date : 2025-Feb-12 ONTAP Version: 9.16.1 ``` ## Understanding the structure diff --git a/integration/certer/main.go b/integration/certer/main.go index c36a407e7..bd31a4ee1 100644 --- a/integration/certer/main.go +++ b/integration/certer/main.go @@ -337,7 +337,6 @@ func newRequest() *requests.Builder { AddValidator(func(response *http.Response) error { if response.StatusCode >= 400 { var ontapErr models.OntapError - //nolint:bodyclose err := requests.ToJSON(&ontapErr)(response) if err != nil { return err diff --git a/integration/go.mod b/integration/go.mod index 347947837..66957977b 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -9,7 +9,7 @@ replace github.com/netapp/harvest/v2 => ../ require ( github.com/carlmjohnson/requests v0.24.3 github.com/netapp/harvest/v2 v2.0.0-20250123144738-8a798a1dbc9b - golang.org/x/text v0.21.0 + golang.org/x/text v0.22.0 ) require ( @@ -21,7 +21,7 @@ require ( github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/shirou/gopsutil/v4 v4.24.12 // indirect + github.com/shirou/gopsutil/v4 v4.25.1 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tidwall/match v1.1.1 // indirect @@ -30,8 +30,8 @@ require ( github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect golang.org/x/net v0.34.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/term v0.28.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/term v0.29.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/integration/go.sum b/integration/go.sum index b7e143ecb..d3e78bfea 100644 --- a/integration/go.sum +++ b/integration/go.sum @@ -33,8 +33,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v4 v4.24.12 h1:qvePBOk20e0IKA1QXrIIU+jmk+zEiYVVx06WjBRlZo4= -github.com/shirou/gopsutil/v4 v4.24.12/go.mod h1:DCtMPAad2XceTeIAbGyVfycbYQNBGk2P8cvDi7/VN9o= +github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs= +github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -56,12 +56,12 @@ golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/jenkins/artifacts/jenkinsfile b/jenkins/artifacts/jenkinsfile index 325cdb258..d6cd66370 100644 --- a/jenkins/artifacts/jenkinsfile +++ b/jenkins/artifacts/jenkinsfile @@ -182,8 +182,8 @@ pipeline { sh ''' targetLocation=$targetParentLocation$VERSION-$RELEASE-$BRANCH docker login - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg FIPS=0 -t ${imageName}:latest -t ${imageName}:$VERSION-$RELEASE -t ${jfrogImagePrefix}:latest -t ${jfrogImagePrefix}:$VERSION-$RELEASE -t ${ghcrImage}:latest -t ${ghcrImage}:$VERSION-$RELEASE . --no-cache - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg FIPS=1 -t ${imageName}:latest-fips -t ${imageName}:$VERSION-$RELEASE-fips -t ${jfrogImagePrefix}:latest-fips -t ${jfrogImagePrefix}:$VERSION-$RELEASE-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:$VERSION-$RELEASE-fips . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET -t ${imageName}:latest -t ${imageName}:$VERSION-$RELEASE -t ${jfrogImagePrefix}:latest -t ${jfrogImagePrefix}:$VERSION-$RELEASE -t ${ghcrImage}:latest -t ${ghcrImage}:$VERSION-$RELEASE . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg GODEBUG=fips140=on -t ${imageName}:latest-fips -t ${imageName}:$VERSION-$RELEASE-fips -t ${jfrogImagePrefix}:latest-fips -t ${jfrogImagePrefix}:$VERSION-$RELEASE-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:$VERSION-$RELEASE-fips . --no-cache docker save -o ${targetLocation}/docker_harvest.tar ${ghcrImage}:latest docker save -o ${targetLocation}/docker_harvest_fips.tar ${ghcrImage}:latest-fips ''' @@ -334,8 +334,8 @@ pipeline { git push https://$GIT_TOKEN@github.com/NetApp/harvest.git --delete nightly fi /opt/home/gh_2.8.0_linux_386/bin/gh release create nightly $targetLocation/*.rpm $targetLocation/*.deb $targetLocation/*.gz --notes "Nightly builds may include bugs and other issues. You might want to use the stable releases instead." --title "Harvest Nightly Release" --prerelease --target main - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg FIPS=0 -t ${imageName}:latest -t ${imageName}:nightly -t ${jfrogImagePrefix}:latest -t ${jfrogImagePrefix}:nightly -t ${ghcrImage}:latest -t ${ghcrImage}:nightly . --no-cache - docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg FIPS=1 -t ${imageName}:latest-fips -t ${imageName}:nightly-fips -t ${jfrogImagePrefix}:latest-fips -t ${jfrogImagePrefix}:nightly-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:nightly-fips . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET -t ${imageName}:latest -t ${imageName}:nightly -t ${jfrogImagePrefix}:latest -t ${jfrogImagePrefix}:nightly -t ${ghcrImage}:latest -t ${ghcrImage}:nightly . --no-cache + docker build --secret id=git_token,src=${gitTokenFile} -f container/onePollerPerContainer/Dockerfile --build-arg GO_VERSION=${GO_VERSION} --build-arg VERSION=$VERSION --build-arg RELEASE=$RELEASE --build-arg ASUP_MAKE_TARGET=$ASUP_MAKE_TARGET --build-arg GODEBUG=fips140=on -t ${imageName}:latest-fips -t ${imageName}:nightly-fips -t ${jfrogImagePrefix}:latest-fips -t ${jfrogImagePrefix}:nightly-fips -t ${ghcrImage}:latest-fips -t ${ghcrImage}:nightly-fips . --no-cache echo $GIT_TOKEN | docker login ghcr.io -u $DOCKERHUB_USERNAME --password-stdin docker push ${ghcrImage}:nightly-fips docker push ${ghcrImage}:nightly