-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collector/Analyzer - Subnet Available #1004
Conversation
need to get the actual logic in next
This is still very WIP. At one point I considered using https://github.com/vishvananda/netlink but then decided to pivot as I want to ensure Going to take a slightly different approach, but it'll work out :) |
netlink package or iproute2 as a host package dependency)
until the collector is done to test it)
(wrote it from scratch and commented it for easier understanding in future). tests pass
Pretty sure this is G2G now, based on my local testing... |
I'll need to write up the docs still around this, I'll get to that next. |
would have loved to keep it for safety but all good
Docs PR: replicatedhq/troubleshoot.sh#473 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've given this a first pass. So far it looks good to me. I'll step through the code in a debugger to test some edge cases before giving a verdict
You'll want to run |
interesting, actually I remember trying to run this but got an error. I'll need to go through and debug what's going on in there...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a separate issue, I think we need to have a way to strictly validate specs. These missing indentations fail silently and it looks like all is well but in actual sense collectors and analysers are not executed.
I've added this as something to be addressed by here (#871)
debug.Printf("Routes: %+v\n", routes) | ||
|
||
// IPv4 only right now... | ||
if c.hostCollector.DesiredCIDR < 1 || c.hostCollector.DesiredCIDR > 32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/0
is a valid mask unless we intentionally want to omit it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, /0
is a valid mask, in this instance I don't think we want to allow someone to select it though :) As that would basically be claiming the entirety of the valid IPv4 address space as an available subnet.
tbh I'd almost suggest we could lock this down to less than a /8
too, but I'm open to leaving it fairly wide... feedback welcome on the "right" number there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the collector meant to be informational only? i.e it does not allow/deny anything, it just states facts, then the analyser enforces such constraints.
If we take this route, I suggest we document this somewhere (troubleshoot.sh?), but I'm leaning towards not having an opinion in the collector, rather in the analyser if need be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically the collector makes the decisions here... the analyzer just reports the results on this one. Which I agree does feel a bit counterintuitive.
The alternative approach would be the collector writes out all of the system routes, and then the analyzer does all of the logic we're doing in the collector today? The system routes are the main input component (in addition to the collector config attributes)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative approach would be the collector writes out all of the system routes
I think the current approach is how its meant to be.
With regards to /0
, lets leave it as you have it.
fixed it, was missing |
done 9f06b4d |
Also had to run |
…reliably on MacOS (unless we feed in a mocked /proc/net/route, which is non-trivial)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good overall. I made a minor suggestion on improving how logging is being done.
pkg/collect/host_subnetavailable.go
Outdated
continue | ||
} | ||
|
||
if debug { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use klog
logger here (and elsewhere with fmt.Fprintf(os.Stderr...)
) instead? I appreciate that the logging changes were introduced after you had finished your implementation.
With klog, you will be be able to have log levels which you can use to increase verbosity.
These log lines are fit for -v=2
...
Checking if route 10.1.5.60/32 overlaps with subnet 10.0.0.0/22 - No overlap
Checking if route 10.1.5.62/32 overlaps with subnet 10.0.0.0/22 - No overlap
Checking if route 172.31.1.1/32 overlaps with subnet 10.0.0.0/22 - No overlap
Checking if route 185.12.64.1/32 overlaps with subnet 10.0.0.0/22 - No overlap
Checking if route 185.12.64.2/32 overlaps with subnet 10.0.0.0/22 - No overlap
whereas these line would be logged when -v=1
Subnet "10.0.0.0/22" is available
The logger with verbosity is invoked like so. You will not need the your if-debug conditions anymore.
klog.V(2).Info(msg)
klog.Info(msg) // equivalent to klog.V(0).Info(msg)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea that's kind of cool... I'd be open to doing that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
pkg/collect/host_subnetavailable.go
Outdated
if err != nil { | ||
return nil, errors.Wrap(err, "failed to parse /proc/net/route") | ||
} | ||
debug.Printf("Routes: %+v\n", routes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This spits out hard to read logs. Some formatting would be good to have. Also this feels like a V(2)
type of log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted to make these V(3)
instead... sufficient? formatting these feels like I'm reinventing ip route list
😆
In theory you shouldn't need it too often tbh...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Adding a new Subnet Available Collector and Analyzer, used to check if a subnet is available for use on a K8s node.
* Adds MSSQL collector based on Postgres collector * Adds tests for MSSQL based on the tests for Postgres * Adds analyzer * Adds MS SQL Server example * Assures MS SQL tests pass * Aligns naming and adds to API * Corrects names that weren't updated * Updates text on sample * Corrects typo * Makes troubleshoot aware of mssql * Uses Hashicorp version library for SQL Server versions * Resyncs generated file * Cleaning up the workspace. * Updates schemas per PR feedback * Unit Tests. * fix: address runtime error of nil pointer when concatenating preflight specs (#998) fix: address runtime error of nil pointer when concatenating preflight spec with hostpreflight spec in preflight run.go * chore: chore: update binaries used to build manifests and k8s (#997) - client-gen version from v0.22.0 to v0.26.1 - controller-gen version from v0.7.0 to v0.11.2 - k8s pacth from 1.26.0 to 1.26.1 * Deduplication for In-Cluster Collectors (#972) * adding dedup for in cluster collectors * add tests * return collector as is whenever marshalling to json fails --------- Co-authored-by: Evans Mungai <evans@replicated.com> * refactor: keep support bundle concat logic to be consistent with Preflight concat (#1002) * refactor: keep support bundle concat logic to be consistent with Preflight * test: add tests for support bundle spec concat function * chore: Refactor in cluster analysers (#999) Have all in-cluster analysers implement the same interface. This will help with the implementation of code that requires making calls to all analysers Fixes #995 * feat: Record summary of execution times of support bundle operations (collect/redact/analyse) (#935) When running a support bundle, we want to know how long each operation (collect, redact, analyze) takes. This commit adds a new trace exporter that records the start and end times of each operation, and then prints a summary of the execution. The summary is also stored in the support bundle. Related to #923 * chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.2 to 0.14.4 (#1006) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.2 to 0.14.4. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.14.2...v0.14.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/shirou/gopsutil/v3 from 3.22.12 to 3.23.1 (#1007) Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.12 to 3.23.1. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v3.22.12...v3.23.1) --- updated-dependencies: - dependency-name: github.com/shirou/gopsutil/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Don't hardcode /bin/bash (#1011) Bash is not always installed in /bin/bash. Mitigate that by relying on bash being in PATH. * chore: Don't print which error in Makefile (#1012) The which binary is used to detect if client-gen is installed, and if it's not, the Makefile will install it. The initial detection prints an error if it's not found. This is misleading, as it is actually an expected situation. * chore: remove unused code (#1013) Remove code snippets that are not used across the codebase. * remove PR label enforcement workflow (#1015) * chore(deps): bump go.opentelemetry.io/otel/sdk from 1.11.2 to 1.13.0 (#1020) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.11.2 to 1.13.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.11.2...v1.13.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/text from 0.6.0 to 0.7.0 (#1017) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/jackc/pgx/v5 from 5.2.0 to 5.3.0 (#1018) Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.2.0 to 5.3.0. - [Release notes](https://github.com/jackc/pgx/releases) - [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md) - [Commits](jackc/pgx@v5.2.0...v5.3.0) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/hashicorp/go-getter from 1.6.2 to 1.7.0 (#1019) Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.6.2 to 1.7.0. - [Release notes](https://github.com/hashicorp/go-getter/releases) - [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml) - [Commits](hashicorp/go-getter@v1.6.2...v1.7.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-getter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat(support-bundle): print progress in debug non-interactive mode (#1010) Currently, there's no debug logs whatsoever when running a command like troubleshoot --debug --interactive=false Tackle this by printing similar log statements as presented in interactive mode to the debug logger. Refactor the code a bit so there's no need for a dedicated finished channel and to exit the goroutines properly. Co-authored-by: Evans Mungai <evans@replicated.com> * chore(deps): bump github.com/containerd/containerd from 1.6.12 to 1.6.18 (#1021) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.12 to 1.6.18. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](containerd/containerd@v1.6.12...v1.6.18) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#1025) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](golang/net@v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/containers/image/v5 from 5.24.0 to 5.24.1 (#1026) Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.24.0 to 5.24.1. - [Release notes](https://github.com/containers/image/releases) - [Commits](containers/image@v5.24.0...v5.24.1) --- updated-dependencies: - dependency-name: github.com/containers/image/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README to add link for the docs (#1022) Co-authored-by: Evans Mungai <evans@replicated.com> * feat: use klog as the default logging library (#1008) * chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.1 to 3.23.2 (#1043) Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.23.1 to 3.23.2. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v3.23.1...v3.23.2) --- updated-dependencies: - dependency-name: github.com/shirou/gopsutil/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump go.opentelemetry.io/otel from 1.13.0 to 1.14.0 (#1040) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/containers/image/v5 from 5.24.1 to 5.24.2 (#1038) Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.24.1 to 5.24.2. - [Release notes](https://github.com/containers/image/releases) - [Commits](containers/image@v5.24.1...v5.24.2) --- updated-dependencies: - dependency-name: github.com/containers/image/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: support for rhel 9 variants (rhel, centos, ol, rocky) (#1045) * fix: Use namespace from the collector spec for Ceph (#1042) use namespace from the collector spec for ceph * chore(deps): bump go.opentelemetry.io/otel/sdk from 1.13.0 to 1.14.0 (#1039) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Collector/Analyzer - Subnet Available (#1004) * Adding a new Subnet Available Collector and Analyzer, used to check if a subnet is available for use on a K8s node. * chore(deps): bump k8s.io/apimachinery from 0.26.1 to 0.26.2 (#1050) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](kubernetes/apimachinery@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.4 to 0.14.5 (#1048) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.4 to 0.14.5. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.14.4...v0.14.5) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * dont run tests on draft PRs (#966) Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com> * chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](kubernetes/klog@v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/cli-runtime/releases) - [Commits](kubernetes/cli-runtime@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 (#1051) * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](kubernetes/apiextensions-apiserver@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](kubernetes/klog@v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/cli-runtime/releases) - [Commits](kubernetes/cli-runtime@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](kubernetes/apiextensions-apiserver@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update go.sum --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evans Mungai <evans@replicated.com> * Adds MSSQL collector based on Postgres collector * Missed a merge conflict. * More merge conflicts fixed. * Ran go mod tidy. * Fixed the function name return. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Chuck D'Antonio <chuck@crdant.io> Co-authored-by: yunju.lly <yunju.lly@infracreate.com> Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Co-authored-by: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com> Co-authored-by: Evans Mungai <evans@replicated.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tom Wieczorek <twz123@users.noreply.github.com> Co-authored-by: Nick Meyer <nickm@replicated.com> Co-authored-by: Ethan Mosbaugh <ethan@replicated.com> Co-authored-by: Nathan Sullivan <nathans@replicated.com> Co-authored-by: ada mancini <adamancini@users.noreply.github.com> Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com>
* Adding a new Subnet Available Collector and Analyzer, used to check if a subnet is available for use on a K8s node.
* Adds MSSQL collector based on Postgres collector * Adds tests for MSSQL based on the tests for Postgres * Adds analyzer * Adds MS SQL Server example * Assures MS SQL tests pass * Aligns naming and adds to API * Corrects names that weren't updated * Updates text on sample * Corrects typo * Makes troubleshoot aware of mssql * Uses Hashicorp version library for SQL Server versions * Resyncs generated file * Cleaning up the workspace. * Updates schemas per PR feedback * Unit Tests. * fix: address runtime error of nil pointer when concatenating preflight specs (#998) fix: address runtime error of nil pointer when concatenating preflight spec with hostpreflight spec in preflight run.go * chore: chore: update binaries used to build manifests and k8s (#997) - client-gen version from v0.22.0 to v0.26.1 - controller-gen version from v0.7.0 to v0.11.2 - k8s pacth from 1.26.0 to 1.26.1 * Deduplication for In-Cluster Collectors (#972) * adding dedup for in cluster collectors * add tests * return collector as is whenever marshalling to json fails --------- Co-authored-by: Evans Mungai <evans@replicated.com> * refactor: keep support bundle concat logic to be consistent with Preflight concat (#1002) * refactor: keep support bundle concat logic to be consistent with Preflight * test: add tests for support bundle spec concat function * chore: Refactor in cluster analysers (#999) Have all in-cluster analysers implement the same interface. This will help with the implementation of code that requires making calls to all analysers Fixes #995 * feat: Record summary of execution times of support bundle operations (collect/redact/analyse) (#935) When running a support bundle, we want to know how long each operation (collect, redact, analyze) takes. This commit adds a new trace exporter that records the start and end times of each operation, and then prints a summary of the execution. The summary is also stored in the support bundle. Related to #923 * chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.2 to 0.14.4 (#1006) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.2 to 0.14.4. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.14.2...v0.14.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/shirou/gopsutil/v3 from 3.22.12 to 3.23.1 (#1007) Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.12 to 3.23.1. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v3.22.12...v3.23.1) --- updated-dependencies: - dependency-name: github.com/shirou/gopsutil/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Don't hardcode /bin/bash (#1011) Bash is not always installed in /bin/bash. Mitigate that by relying on bash being in PATH. * chore: Don't print which error in Makefile (#1012) The which binary is used to detect if client-gen is installed, and if it's not, the Makefile will install it. The initial detection prints an error if it's not found. This is misleading, as it is actually an expected situation. * chore: remove unused code (#1013) Remove code snippets that are not used across the codebase. * remove PR label enforcement workflow (#1015) * chore(deps): bump go.opentelemetry.io/otel/sdk from 1.11.2 to 1.13.0 (#1020) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.11.2 to 1.13.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.11.2...v1.13.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/text from 0.6.0 to 0.7.0 (#1017) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/jackc/pgx/v5 from 5.2.0 to 5.3.0 (#1018) Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.2.0 to 5.3.0. - [Release notes](https://github.com/jackc/pgx/releases) - [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md) - [Commits](jackc/pgx@v5.2.0...v5.3.0) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/hashicorp/go-getter from 1.6.2 to 1.7.0 (#1019) Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.6.2 to 1.7.0. - [Release notes](https://github.com/hashicorp/go-getter/releases) - [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml) - [Commits](hashicorp/go-getter@v1.6.2...v1.7.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-getter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat(support-bundle): print progress in debug non-interactive mode (#1010) Currently, there's no debug logs whatsoever when running a command like troubleshoot --debug --interactive=false Tackle this by printing similar log statements as presented in interactive mode to the debug logger. Refactor the code a bit so there's no need for a dedicated finished channel and to exit the goroutines properly. Co-authored-by: Evans Mungai <evans@replicated.com> * chore(deps): bump github.com/containerd/containerd from 1.6.12 to 1.6.18 (#1021) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.12 to 1.6.18. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](containerd/containerd@v1.6.12...v1.6.18) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#1025) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](golang/net@v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/containers/image/v5 from 5.24.0 to 5.24.1 (#1026) Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.24.0 to 5.24.1. - [Release notes](https://github.com/containers/image/releases) - [Commits](containers/image@v5.24.0...v5.24.1) --- updated-dependencies: - dependency-name: github.com/containers/image/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README to add link for the docs (#1022) Co-authored-by: Evans Mungai <evans@replicated.com> * feat: use klog as the default logging library (#1008) * chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.1 to 3.23.2 (#1043) Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.23.1 to 3.23.2. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v3.23.1...v3.23.2) --- updated-dependencies: - dependency-name: github.com/shirou/gopsutil/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump go.opentelemetry.io/otel from 1.13.0 to 1.14.0 (#1040) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/containers/image/v5 from 5.24.1 to 5.24.2 (#1038) Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.24.1 to 5.24.2. - [Release notes](https://github.com/containers/image/releases) - [Commits](containers/image@v5.24.1...v5.24.2) --- updated-dependencies: - dependency-name: github.com/containers/image/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: support for rhel 9 variants (rhel, centos, ol, rocky) (#1045) * fix: Use namespace from the collector spec for Ceph (#1042) use namespace from the collector spec for ceph * chore(deps): bump go.opentelemetry.io/otel/sdk from 1.13.0 to 1.14.0 (#1039) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Collector/Analyzer - Subnet Available (#1004) * Adding a new Subnet Available Collector and Analyzer, used to check if a subnet is available for use on a K8s node. * chore(deps): bump k8s.io/apimachinery from 0.26.1 to 0.26.2 (#1050) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](kubernetes/apimachinery@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.4 to 0.14.5 (#1048) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.4 to 0.14.5. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.14.4...v0.14.5) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * dont run tests on draft PRs (#966) Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com> * chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](kubernetes/klog@v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/cli-runtime/releases) - [Commits](kubernetes/cli-runtime@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 (#1051) * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](kubernetes/apiextensions-apiserver@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](kubernetes/klog@v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/cli-runtime/releases) - [Commits](kubernetes/cli-runtime@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](kubernetes/apiextensions-apiserver@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update go.sum --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evans Mungai <evans@replicated.com> * Adds MSSQL collector based on Postgres collector * Missed a merge conflict. * More merge conflicts fixed. * Ran go mod tidy. * Fixed the function name return. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Chuck D'Antonio <chuck@crdant.io> Co-authored-by: yunju.lly <yunju.lly@infracreate.com> Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Co-authored-by: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com> Co-authored-by: Evans Mungai <evans@replicated.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tom Wieczorek <twz123@users.noreply.github.com> Co-authored-by: Nick Meyer <nickm@replicated.com> Co-authored-by: Ethan Mosbaugh <ethan@replicated.com> Co-authored-by: Nathan Sullivan <nathans@replicated.com> Co-authored-by: ada mancini <adamancini@users.noreply.github.com> Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com>
Description, Motivation and Context
A collector and analyzer to determine if a subnet is available. If used in a Host Preflight can ensure we don't have conflicting network subnet issues once an install is underway.
Closes #984
Checklist
Does this PR introduce a breaking change?