-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add document type Supplement for Implementation and Testing Notes (#443)
* Initial attempt of a supplemental document regarding implementation and testing of scs-0100-v3 Signed-off-by: Matthias Büchse <[email protected]> * Syntax error in front matter Signed-off-by: Matthias Büchse <[email protected]> * minor improvements Signed-off-by: Matthias Büchse <[email protected]> * Adapt ADR check script Signed-off-by: Matthias Büchse <[email protected]> * Add supplement to entropy standard Signed-off-by: Matthias Büchse <[email protected]> * Correction: mention that attributes have to be set Signed-off-by: Matthias Büchse <[email protected]> * Bugfix: subsection on manual tests was two levels too deep Signed-off-by: Matthias Büchse <[email protected]> * Minor improvements Signed-off-by: Matthias Büchse <[email protected]> * Relax testing notes to accommodate previous commit Signed-off-by: Matthias Büchse <[email protected]> * Update docstring of entropy-check.py Signed-off-by: Matthias Büchse <[email protected]> * State examples for flavor properties that are not immediately discoverable Signed-off-by: Matthias Büchse <[email protected]> * Extend scs-0001 in regard to Supplement type Signed-off-by: Matthias Büchse <[email protected]> * Update the section on Operation Tooling Signed-off-by: Matthias Büchse <[email protected]> * Use relative URIs Signed-off-by: Matthias Büchse <[email protected]> * Use absolute URIs, including host Signed-off-by: Matthias Büchse <[email protected]> * Update chk_adr to cope with templates and proposals better Signed-off-by: Matthias Büchse <[email protected]> * Replace scs- with SCS- as flavor prefix. Signed-off-by: Kurt Garloff <[email protected]> --------- Signed-off-by: Matthias Büchse <[email protected]> Signed-off-by: Kurt Garloff <[email protected]> Co-authored-by: Kurt Garloff <[email protected]>
- Loading branch information
Showing
7 changed files
with
193 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
Standards/scs-0100-w1-flavor-naming-implementation-testing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
title: "SCS Flavor Naming Standard: Implementation and Testing Notes" | ||
type: Supplement | ||
track: IaaS | ||
status: Proposal | ||
supplements: | ||
- scs-0100-v1-flavor-naming.md | ||
- scs-0100-v2-flavor-naming.md | ||
- scs-0100-v3-flavor-naming.md | ||
--- | ||
|
||
## Introduction | ||
|
||
The three major versions of the standard that exist so far are very similar, and deliberately so. | ||
Therefore, the procedures needed to implement or test them are very similar as well. Yet, this document | ||
will only cover v3, because v1 and v2 are already obsolete by the time of writing. | ||
|
||
## Implementation Notes | ||
|
||
Every flavor whose name starts with `SCS-` must conform with the naming scheme laid down in the standard. | ||
|
||
### Operational Tooling | ||
|
||
#### Syntax Check | ||
|
||
The [test suite](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/flavor-naming) | ||
comes with a handy | ||
[command-line utility](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/flavor-naming/cli.py) | ||
that can be used to validate flavor names, to | ||
interactively construct a flavor name via a questionnaire, and to generate prose descriptions for given | ||
flavor names. See the | ||
[README](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/flavor-naming/README.md) | ||
for more details. | ||
|
||
The functionality of this script is also (partially) exposed via the web page | ||
<https://flavors.scs.community/>. | ||
|
||
With the OpenStack tooling (`python3-openstackclient`, `OS_CLOUD`) in place, you can call | ||
`cli.py -v parse v3 $(openstack flavor list -f value -c Name)` to get a report | ||
on the syntax compliance of the flavor names of the cloud environment. | ||
|
||
#### Flavor Creation | ||
|
||
The [OpenStack Flavor Manager](https://github.com/osism/openstack-flavor-manager) will create a whole set | ||
of flavors in one go, given a YAML description of this set. | ||
|
||
## Automated Tests | ||
|
||
### Errors | ||
|
||
The following items MUST be detected and reported as an error: | ||
|
||
- any syntax error in a name starting with `SCS-`, | ||
- any mismatch between any immediately discoverable property of a flavor (currently, CPU, RAM and disk size) | ||
and the meaning of its name (which is usually a lower bound), such as the CPU generation or hypervisor. | ||
|
||
In addition, the following items MAY be reported as an error: | ||
|
||
- any mismatch between any non-immediately discoverable property of flavor and the meaning of its name. | ||
|
||
### Warnings | ||
|
||
None so far. | ||
|
||
### Implementation | ||
|
||
The script [`flavor-names-openstack.py`](https://github.com/SovereignCloudStack/standards/tree/main/Tests/iaas/flavor-naming/flavor-names-openstack.py) | ||
talks to the OpenStack API of the cloud specified by the `OS_CLOUD` environment and queries properties and | ||
checks the names for standards compliance. | ||
|
||
## Manual Tests | ||
|
||
To be determined. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: "SCS Entropy: Implementation and Testing Notes" | ||
type: Supplement | ||
track: IaaS | ||
status: Proposal | ||
supplements: | ||
- scs-0101-v1-entropy.md | ||
--- | ||
|
||
## Implementation | ||
|
||
We presume that almost nothing has to be done (or indeed can be done), as | ||
long as the CPUs and VM images are reasonably recent; only the flavor and | ||
image attributes have to be set: | ||
|
||
- flavor: `hw_rng:allowed=True` , | ||
- image: `hw_rng_model: virtio` . | ||
|
||
## Automated Tests | ||
|
||
### Images Sample | ||
|
||
Some checks need to be performed on a live instance. For these checks, it is | ||
necessary to choose a sample of VM images to test on. | ||
|
||
For the time being, the sample MUST contain at least one public image reported | ||
by OpenStack. This may be extended in the future. | ||
|
||
### Errors | ||
|
||
For every image in the chosen sample, the following items MUST be detected and | ||
reported as an error: | ||
|
||
- the service `rngd` is not running, | ||
- the special file `/proc/sys/kernel/random/entropy_avail` does not contain | ||
the value 256 (pinned since kernel 5.18), | ||
- the number of FIPS 140-2 failures exceeds 3 out of 1000 blocks | ||
tested, as determined by `cat /dev/random | rngtest -c 1000` . | ||
|
||
Note: The latter two items act as surrogates for the following item, which | ||
cannot be detected directly: | ||
|
||
- CPU instructions for accessing entropy are not available to the VMs. | ||
|
||
### Warnings | ||
|
||
The following items MUST be detected and reported as a warning: | ||
|
||
- any flavor missing the attribute `hw_rng:allowed=True`, | ||
- any image missing the attribute `hw_rng_model: virtio`, | ||
|
||
Note that the requirement regarding the kernel patch level will not be | ||
checked, because of two reasons: (a) we already check the file `entropy_avail` | ||
(see subsection on Errors), and (b) users can always choose a recent image, | ||
as ensured by the image metadata standard. | ||
|
||
### Implementation | ||
|
||
The script [`entropy-check.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/entropy/entropy-check.py) | ||
connects to OpenStack and performs the checks described in this section. | ||
|
||
## Manual Tests | ||
|
||
None. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters