Repository navigation
Fix counting SCS flavors. - #165
Conversation
Signed-off-by: Kurt Garloff <[email protected]>
There was a problem hiding this comment.
Please add comments to point out, what the ´scs´ variable is used for. Moving variables to the top of a function is always good. But what I don't get is why scs is set to a fixed value of ´1´ when the first argument passed to the script is ´-i´. ´-h´, ´-d´, ´-v´ and ´-c´ are self explanatory because of the variables used below (help, debug, verbose, check). ´-i´ is unclear for me.
Also exit code documentation. Requested by Tim, thanks! Signed-off-by: Kurt Garloff <[email protected]>
I added a comment. I hope the code readability is better now. |
- Replaced tabs by spaces - switched partly to newer string formatting style - fixed indentation issues - removed code-linebreaks as they reduce readability - removed trailing backslashes inside braces as they are obsolete - removed unnecessary import of "os" - renamed some variables to improve readability Signed-off-by: Tim Beermann <[email protected]>
87d3e77 to
f994dc7
Compare
There was a problem hiding this comment.
Seems like some flavors are not accepted. We created a tool that generates a huge amount of possible flavor names according to the ruleset. The tool can be found here: https://github.com/osism/openstack-flavor-manager/tree/main/scs_flavor_generator
Since the generated file is too large (>4GB), I needed to apply some trickery to validate every line:
while read line; do if ! python3 flavor-name-check.py $line; then echo $line; fi; done </path/to/huge/list/of/flavors.txtThe validator marks flavors like SCS-1L:0.5-z-GI1hhh as invalid, even though they are valid according to the rules.
|
May I suggest that you only generate a list of mandatory flavors then the list should be only like 30ish flavors long. Then I would query the list of flavors a CSP provides and check those against the standard. Even with our extensive flavors we've offered in the past (we've reduced the flavor list around 10/2022) we never had more than 300 flavors, thus I don't understand the point of a 4GB long list. Ralf |
This clarifies the spec, allowing -GX[N][h] and -gX[N][h]. This is the second piece of approach B to fix the bug reported by Tim in a comment to PR#165: SovereignCloudStack/docs#165 (review) Signed-off-by: Kurt Garloff <[email protected]>
An easier test-case is Thanks for generating so much test data, I will look at it beyond this issue. |
This is the other option (option A) to resolve the issue that Tim reported in PR #165 (SovereignCloudStack/docs#165 (review)): Follow the spec and disallow -GM[N]h, only allow -GM[N][:N[h]]. This does not require a change to the parser, but ensure we can not produce such output. Signed-off-by: Kurt Garloff <[email protected]>
|
The other possible resolution can be seen here: |
- Fix counting SCS flavors - Added comments to better explain scs var, -i mode - Also exit code documentation - Fixed formatting - Replaced tabs by spaces - switched partly to newer string formatting style - fixed indentation issues - removed code-linebreaks as they reduce readability - removed trailing backslashes inside braces as they are obsolete - removed unnecessary import of "os" - renamed some variables to improve readability Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Tim Beermann <[email protected]> Co-authored-by: Tim Beermann <[email protected]>
* (see #180) initial commit for an Status Page ADR. This ADR contains why we decided to create a complete new application * (see #180) include decisions made in a earlier discussion * (see #180) update introduction * (see #180) a small design fix for related documents section * Add a first draft for a dev and testing cloud ressources overview (#167) * Add a first draft for a dev ressources overview Signed-off-by: Eduard Itrich <[email protected]> * added projects for @costelter to review Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Eduard Itrich <[email protected]> Signed-off-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Ralf Heiringhoff <[email protected]> * partner ressources (#171) * Add a first draft for a dev ressources overview * added projects for @costelter to review * updated out-dated PlusDemonstrator Docs added partner api endpoints in clouds-public.yaml * fixed gfm typos * more fixes * minor final fixes * Capitalize title Signed-off-by: Eduard Itrich <[email protected]> Signed-off-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Eduard Itrich <[email protected]> * Fix counting SCS flavors. (#165) - Fix counting SCS flavors - Added comments to better explain scs var, -i mode - Also exit code documentation - Fixed formatting - Replaced tabs by spaces - switched partly to newer string formatting style - fixed indentation issues - removed code-linebreaks as they reduce readability - removed trailing backslashes inside braces as they are obsolete - removed unnecessary import of "os" - renamed some variables to improve readability Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Tim Beermann <[email protected]> Co-authored-by: Tim Beermann <[email protected]> * ease collaboration & transparency (#172) * improved user handling to ease collaboration & transparency within the team * added link to the gx-scs environment * fixed link * Use github-flavored markdown for note sections (#173) See https://stackoverflow.com/questions/50544499/how-to-make-a-styled-markdown-admonition-box-in-a-github-gist for reference Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Eduard Itrich <[email protected]> Co-authored-by: Eduard Itrich <[email protected]> * typos & whitespaces fix on cloud-ressources.md (#174) * improved user handling to ease collaboration & transparency within the team Signed-off-by: Ralf Heiringhoff <[email protected]> * added link to the gx-scs environment Signed-off-by: Ralf Heiringhoff <[email protected]> * fixed link Signed-off-by: Ralf Heiringhoff <[email protected]> * Use github-flavored markdown for note sections (#173) See https://stackoverflow.com/questions/50544499/how-to-make-a-styled-markdown-admonition-box-in-a-github-gist for reference Signed-off-by: Eduard Itrich <[email protected]> Signed-off-by: Eduard Itrich <[email protected]> * minor fixes Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Eduard Itrich <[email protected]> Co-authored-by: Eduard Itrich <[email protected]> * removed copy & waste error (#175) Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Ralf Heiringhoff <[email protected]> * Remove more copy & waste issues (#178) Signed-off-by: Eduard Itrich <[email protected]> Signed-off-by: Eduard Itrich <[email protected]> * Update plusserver-gx-scs.md (#179) * Update plusserver-gx-scs.md * fix URL syntax Signed-off-by: Ralf Heiringhoff <[email protected]> * updated cloud-resources.md (#176) * added missing svc user * added related projects to svc user * fixed table Signed-off-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Eduard Itrich <[email protected]> * Update plusserver-gx-scs.md (#181) left and right mix up Signed-off-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Eduard Itrich <[email protected]> * Update README.md (#180) fixed dead link + reworded it to point to the partner resources instead Signed-off-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Eduard Itrich <[email protected]> * Feat/flavor checker direct (#163) * Add script using OpenStack API to check flavors. We get the list of flavors and check compliance of them. * Print output report in YAML. * Fix output report dict structure. * Check vCPUs, RAM, Disk OpenStack data vs name. Overproviding is allowed, we only warn. For underprovisioning, we produce an error. * Count errors for underperforming flavors. * Some comments help with code reading. * Warn for strange memory sizes. We only recommend 0.5, 1, 1.5, 2, ... 9.5, 10, 11, 12, 13, ... and warn for numbers that are not integers if >= 10 and not halfed integers for smaller memory sizes. (This gives us still plenty of flexibility.) Another change was naming the return values as cpuram is more readable than ret[0]. * Fixed formatting. - Replaced tabs by spaces - switched partly to newer string formatting style - fixed indentation issues - removed code-linebreaks as they reduce readability - removed trailing backslashes inside braces as they are obsolete * Implement Tim's suggestion who to report result. Tim suggested a better report format discussing PR#163 at SovereignCloudStack/docs#163 (comment) which we implement. Also: Don't list all flavors by category by default, but just the Summary with the numbers. Option -v/--verbose produces the full report though. Sidenote: As we have dicts, the field order is determined by the Python implementation (using Alphabetical ordering). If we prefer a different ordering, we might need to use some ordered dict implementation. * Make it pass flake8 tests. * Address a few of the pylint complaints. Mainly superfluous () after if. (Yes, I have written C for too long.) Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Tim Beermann <[email protected]> Co-authored-by: Tim Beermann <[email protected]> * Proposal for a standard to technically describe SCS certification levels (#148) * Add initial draft for the proposal SCS Standards YAML * Add a first round of key values for certification yaml and give example * Fix some typos and ammend section on list of standards * Fix SCS capitalization issue * Add missing full stop at end of file * Add flag to distinguish between mandatory and optional standards * Promote proposal to state * Rename state to condition Signed-off-by: Eduard Itrich <[email protected]> Signed-off-by: Eduard Itrich <[email protected]> Co-authored-by: Kurt Garloff <[email protected]> * Add decision record template (#168) Signed-off-by: Joshua Mühlfort <[email protected]> Co-authored-by: Kurt Garloff <[email protected]> * Add dNation Dev Project cloud resource (#188) * Add dNation Dev Project cloud resource Signed-off-by: Roman Hros <[email protected]> * added project id Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Roman Hros <[email protected]> Signed-off-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Ralf Heiringhoff <[email protected]> * remove files that exist in docs repository (#189) Signed-off-by: maxwolfs <[email protected]> Signed-off-by: maxwolfs <[email protected]> * some minor rewordings and additions on the reasoning. While there sprinkle another link Signed-off-by: Felix Kronlage-Dammers <[email protected]> * rename as per discussion Signed-off-by: Felix Kronlage-Dammers <[email protected]> * incorporate decision matrix based on a discussion in Team OPS with input from @horazont Signed-off-by: Felix Kronlage-Dammers <[email protected]> * start reworking some of the sections Signed-off-by: Felix Kronlage-Dammers <[email protected]> * fix list Signed-off-by: Felix Kronlage-Dammers <[email protected]> * reword to be precise * remove related documents. One of them (comparison) was incorporated. Signed-off-by: Felix Kronlage-Dammers <[email protected]> * fix(link): status page comparison moved Signed-off-by: Jan Schoone <[email protected]> * fix: minor typos Signed-off-by: Jan Schoone <[email protected]> * just link to section in same document. discussed with @jschoone Signed-off-by: Felix Kronlage-Dammers <[email protected]> * finalize naming Signed-off-by: Felix Kronlage-Dammers <[email protected]> * rename to match the numbering scheme according to the tracks Signed-off-by: Felix Kronlage-Dammers <[email protected]> * rename to reflect reality Signed-off-by: Felix Kronlage-Dammers <[email protected]> * Address comments wrote by @garloff Signed-off-by: Joshua Mühlfort <[email protected]> * rename to contain the track number in the filename Signed-off-by: Felix Kronlage-Dammers <[email protected]> --------- Signed-off-by: Eduard Itrich <[email protected]> Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Tim Beermann <[email protected]> Signed-off-by: Ralf Heiringhoff <[email protected]> Signed-off-by: Joshua Mühlfort <[email protected]> Signed-off-by: Roman Hros <[email protected]> Signed-off-by: maxwolfs <[email protected]> Signed-off-by: Felix Kronlage-Dammers <[email protected]> Signed-off-by: Jan Schoone <[email protected]> Co-authored-by: Benjamin <[email protected]> Co-authored-by: Eduard Itrich <[email protected]> Co-authored-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Ralf Heiringhoff <[email protected]> Co-authored-by: Kurt Garloff <[email protected]> Co-authored-by: Tim Beermann <[email protected]> Co-authored-by: Joshua Mühlfort <[email protected]> Co-authored-by: Roman Hros <[email protected]> Co-authored-by: Max Wolfs <[email protected]> Co-authored-by: Jan Schoone <[email protected]>
Signed-off-by: Kurt Garloff [email protected]