Skip to content

feat: Warn when stack/demo is larger than cluster - #94

Merged
sbernauer merged 15 commits into
mainfrom
feat/check-demo-resoures
Aug 21, 2023
Merged

feat: Warn when stack/demo is larger than cluster#94
sbernauer merged 15 commits into
mainfrom
feat/check-demo-resoures

Conversation

@sbernauer

@sbernauersbernauer commented Aug 14, 2023

Copy link
Copy Markdown
Member

Description

Related to #268

➜ stackable-cockpit git:(feat/check-demo-resoures) ✗ cargo r -p stackablectl -- demo in data-lakehouse-iceberg-trino-spark
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/stackablectl demo in data-lakehouse-iceberg-trino-spark`
WARN The stack has the resource requirements [CPU: 71, Memory: 160Gi, PVC space: 1Ti], but cluster seems to have only 8 cores
at rust/stackable-cockpit/src/platform/stack/spec.rs:138
WARN The stack has the resource requirements [CPU: 71, Memory: 160Gi, PVC space: 1Ti], but cluster seems to have only 47891.8Mi of memory
at rust/stackable-cockpit/src/platform/stack/spec.rs:138
WARN The demo has the resource requirements [CPU: 80, Memory: 200Gi, PVC space: 1Ti], but cluster seems to have only 8 cores
at rust/stackable-cockpit/src/platform/demo/spec.rs:97
WARN The demo has the resource requirements [CPU: 80, Memory: 200Gi, PVC space: 1Ti], but cluster seems to have only 47891.8Mi of memory
at rust/stackable-cockpit/src/platform/demo/spec.rs:97

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes
# Author
- [ ] Changes are OpenShift compatible
- [ ] CRD changes approved
- [ ] Helm chart can be installed and deployed operator works
- [ ] Integration tests passed (for non trivial changes)
# Reviewer
- [ ] Code contains useful comments
- [ ] (Integration-)Test cases added
- [ ] Documentation added or updated
- [ ] Changelog updated
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)
# Acceptance
- [ ] Feature Tracker has been updated
- [ ] Proper release label has been added

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

@sbernauersbernauer changed the title feat: Warn when stack/demo is larget than clusterfeat: Warn when stack/demo is larger than clusterAug 14, 2023
@sbernauersbernauer self-assigned this Aug 15, 2023

@TechassiTechassi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions. Nice feature!

Comment threadrust/stackable-cockpit/src/platform/cluster.rs Outdated
Comment threadrust/stackable-cockpit/src/platform/cluster.rs Outdated
Comment threadrust/stackable-cockpit/src/platform/stack/spec.rs Outdated
Comment threadrust/stackable-cockpit/src/platform/cluster.rs Outdated
Comment threadrust/stackable-cockpit/src/platform/stack/spec.rs
@Techassi

Copy link
Copy Markdown
Member

Some suggested improvements: feat/check-demo-resoures...feat/check-demo-resoures-techassi

@sbernauer

Copy link
Copy Markdown
MemberAuthor

@Techassi did pull in your commit, but also push two other ones. Would be great if you could have a look!

Comment threadrust/stackable-cockpit/src/platform/demo/spec.rs
Comment threadrust/stackablectl/src/cmds/stack.rs
Comment threadCargo.toml Outdated
Comment threadrust/stackable-cockpit/src/platform/cluster/resource_request.rs Outdated
Techassi
Techassi previously approved these changes Aug 17, 2023

@TechassiTechassi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. However we need to make sure that all pre-commits are run. Either manually like pre-commit run --all-files or by installing them permanently.

@nightkr

Copy link
Copy Markdown
Contributor

This feels a bit misleading, since it goes by a very optimistic view of scheduling (one node with no CPU but 1TiB RAM and another node with a 128-core EPYC and no RAM still wouldn't be able to schedule anything useful together).

I can see the value in giving early feedback, but I also wonder if it'd make more sense to focus on surfacing the actual scheduling errors in more discoverable ways.

@sbernauer

Copy link
Copy Markdown
MemberAuthor

@Techassi thanks for review!
@nightkr good point! There might be cases where the warning is not shown but the demo does not run anyway.
I would argue that their is value in this feature already, as it resolves some issues where users tried to install demos on a too small k8s cluster, which this warning would have catched. We should not see this as an "If no warning is thrown, the demo will definitely run" but more as a "Let's handle 90% of the resource problems by printing a warning and not get asked the same question multiple times, which costs us time"

@nightkr

Copy link
Copy Markdown
Contributor

Yeah I don't want to block this PR on that.

@sbernauer

Copy link
Copy Markdown
MemberAuthor

Alright, but it's a good and valid point!
Going forward I would like our stack and demo command waits for our product to be ready. In this place we can show the user the Pod events in the case the stack does not properly start. This could e.g. include 0/10 nodes sufficient memory etc.

@sbernauer
sbernauer enabled auto-merge August 21, 2023 08:01
@sbernauer
sbernauer added this pull request to the merge queueAug 21, 2023
Merged via the queue into main with commit 5f77e0dAug 21, 2023
@sbernauer
sbernauer deleted the feat/check-demo-resoures branch August 21, 2023 08:20
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants

@sbernauer@Techassi@nightkr