Repository navigation
Feat/flavor checker direct - #163
Conversation
We get the list of flavors and check compliance of them. Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Kurt Garloff <[email protected]>
Overproviding is allowed, we only warn. For underprovisioning, we produce an error. Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Kurt Garloff <[email protected]>
|
Why was this pull request created? I thought there is a task that is passed to another person working on exactly this topic. |
|
My guess is that "somebody' was bored on the sofa and wanted to do a little finger exercise |
Because we wanted to have This PR is completing the pre-existing work on (b). I understand from your comment that you assumed working on (b) as well which would turn some of the work into duplicated efforts. Not ideal. Communication breakdown? I consider the tool as the reference for judging flavor conformity. If that has been superceded by some other tool, I have missed that news and the rationale I guess. |
|
The problem is that we have SovereignCloudStack/issues#236 and the work on it is to be bundled by Tim in the new openstack-flavor-manager (https://github.com/osism/openstack-flavor-manager). If we continue to work here in parallel, this will lead to redundancies etc. IMO we should stop working here and proceed in openstack-flavor-manager. The first code is already there and Tim is currently working on it. |
|
So the flavor-manager will do the SCS flavor spec conformance checking in the future? If so, we need to ensure it can be invoked on non-SCS OpenStack envs and be ran in a mode that does just that: SCS Conformance Checking. I would then remove both pieces of the current test tool here to avoid confusion and to avoid the frustration of duplicated work. The only piece remaining here would be a README, a YAML with the list of mandatory flavors plus - if we have a good way to express the grammar - a file that describes the naming grammar. (I fear that regexps are not the best way to denote grammars although I made heavy use of them in my parser.) (Probably the current code will be reused for the gx-self-description-generator, that was actually the cause for me looking at it again.) |
|
My suggestion would be as follows:
If need be, we can schedule a call to outline this together next week (I'm on PTO, but can submerge from that in order to not block the work from @tibeer on this). |
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]. Signed-off-by: Kurt Garloff <[email protected]>
|
Discussed this in the IaaS team meeting:
|
tibeer
left a comment
There was a problem hiding this comment.
Tested against PlusCloud Open:
columbia@columbia tools % ./flavor-names-openstack.py
scs-community-beermann:
FlavorReport:
GoodSCSFlavors:
- SCS-16V:64
- SCS-16V:64:100
- SCS-1V:0.5
- SCS-1V:0.5:20
- SCS-1V:1
- SCS-1V:1:10
- SCS-1V:1:20
- SCS-2V:2
- SCS-2V:2:20
- SCS-2V:4:100
- SCS-2V:4:20
- SCS-2V:4:50
- SCS-2V:8:100
- SCS-4V:16:100
- SCS-4V:32:50
- SCS-4V:8:100
- SCS-4V:8:50
- SCS-8V:16:100
- SCS-8V:32:50
- SCS-8V:8
- SCS-8V:8:100
MandatoryFlavors:
- SCS-16V:32
- SCS-16V:32:100
- SCS-1L:1
- SCS-1L:1:5
- SCS-1V:2
- SCS-1V:2:5
- SCS-1V:4
- SCS-1V:4:10
- SCS-1V:8
- SCS-1V:8:20
- SCS-2V:16
- SCS-2V:16:50
- SCS-2V:4
- SCS-2V:4:10
- SCS-2V:8
- SCS-2V:8:20
- SCS-4V:16
- SCS-4V:16:50
- SCS-4V:32
- SCS-4V:32:100
- SCS-4V:8
- SCS-4V:8:20
- SCS-8V:16
- SCS-8V:16:50
- SCS-8V:32
- SCS-8V:32:100
MissingFlavors: []
WarnSCSFlavors: []
WrongSCSFlavors: []
nonSCSFlavors:
- octavia
FlavorSummary:
GoodSCSFlavors: 21
MandatoryFlavors: 26
MissingFlavors: 0
WrongSCSFlavors: 0
errors: 0
nonSCSFlavors: 1
warnings: 0
columbia@columbia tools % I would assume, that the tool should report five missing flavors, since 26 are mandatory and only 21 are good.
Or do I misunderstand the output?
- 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 Signed-off-by: Tim Beermann <[email protected]>
|
You misinterpreted the output: What would not have been allowed:
So from my perspective all good. Do we need better wording in the report? Or better documentation? |
|
I would then change the output to something like this What do you think? |
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. Signed-off-by: Kurt Garloff <[email protected]>
I like it and I implemented it. Please check! |
Signed-off-by: Kurt Garloff <[email protected]>
Mainly superfluous () after if. (Yes, I have written C for too long.) Signed-off-by: Kurt Garloff <[email protected]>
…udStack/Docs into feat/flavor-checker-direct
* 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]>
* (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]>
Rather than feeding the output from
openstack flavor list -f value -c Nametoflavor-name-check.py, we can create a tool that uses the openstacksdk to retrieve the flavor list and directly check.This has one big advantage: We get some data (like vCPUs and RAM and root disk size) from OpenStack and can compare it with what's advertized in a name.
And indeed, found one warning (overprovided resources) on gx-scs and one error (underprovided resources) each on plus-pco and wavestack.
This gets us close to a complete conformance test for flavors.
Short of actually booting VMs and looking inside and doing long-term performance testing ...