Repository navigation
Conversation
|
IMO the following things should be included, even if they're not in the Standard or aren't a necessity:
|
|
Talked with @mbuechse about this, I will include the parts mentioned in the previous comment for now in a separate commit. If someone has objections for this, we can revert the commit. |
|
I don't think there will be objections to these things as long as they are guarded by command-line options. The discussion will then be about which options we shall use for certification (cf. scs-compatible.yaml). BTW, you can already add the script to the scs-compatible-test.yaml in the testing directory. This can be used for testing the whole certification package (compatible IaaS), and if it works, then we already have a blueprint ready for the actual yaml. |
* add script to check available entropy on VMs and OpenStack * additional requirements Signed-off-by: Hannes Baum <[email protected]>
* improvements to appease Flake8 * sort script imports * add command-line options Signed-off-by: Matthias Büchse <[email protected]>
…he VM Signed-off-by: Matthias Büchse <[email protected]>
* adapt to the new standard introduced in #297 * added specific exceptions * small inline documentation * added return codes and explanation * better explained log messages Signed-off-by: Hannes Baum <[email protected]>
* possibility to check multiple images * lists from image metadata standard * more exception checks * improved return codes * improved usage output Signed-off-by: Hannes Baum <[email protected]>
* handling for multiple package managers Signed-off-by: Hannes Baum <[email protected]>
- removed coupling with image standard (images have to be named in the yaml file) - simplified return codes and logging - simplified openstack API calls (e.g., use built-in feature to delete floating IPs) - pick suitable flavor for checking virtio-rng, otherwise check is pointless - made code more concise, added comments at a few surprising spots Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
* handling for multiple package managers Signed-off-by: Hannes Baum <[email protected]> Signed-off-by: Matthias Büchse <[email protected]>
|
To all the reviewers, this is what the output looks like (DEBUG channel only shown due to $ python3 Tests/iaas/entropy/entropy-check.py -c openstack -d -i "Debian 11 (bullseye), Ubuntu 22.04 LTS x64"
DEBUG: Connecting to cloud 'openstack'
DEBUG: Selected images: Debian 11 (bullseye), Ubuntu 22.04 LTS x64
DEBUG: Checking images and flavors for recommended attributes
INFO: Image 'Debian 11 (bullseye)' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Debian 10 (buster)' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'CentOS 7' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Debian 9 (stretch)' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'AlmaLinux 8' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Fedora 34 x86_64' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Fedora 33 x86_64' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'CentOS 8' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Fedora Atomic 29 x86_64' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Ubuntu 16.04 LTS x64' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Fedora CoreOS 32' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'CirrOS 0.5.1' missing recommended attributes: hw_rng_model=virtio
INFO: Image 'Fedora Atomic 27 x86_64' missing recommended attributes: hw_rng_model=virtio
INFO: Flavor 'XXS' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'XS' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'S' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'S.mem+' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'M' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'M.mem+' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'L' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'L.mem+' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'XL' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
INFO: Flavor 'XL.mem+' missing recommended attributes: hw_rng:allowed=True; additionally, missing optional attributes: hw_rng:rate_bytes, hw_rng:rate_period
DEBUG: Checking dynamic instance properties
DEBUG: Unable to pick flavor with hw_rng:allowed=True for image 'Debian 11 (bullseye)'
DEBUG: Creating instance of image 'Debian 11 (bullseye)' using flavor 'XXS'
DEBUG: Server 'scs-0101-server' ('99fdec2f-aaad-4b8f-9e52-d01dc5bb3102') has been created
INFO: VM 'Debian 11 (bullseye)' doesn't provide the recommended service rngd
DEBUG: Not looking for virtio-rng because required attributes are missing
DEBUG: Deleting server 'scs-0101-server'
DEBUG: Unable to pick flavor with hw_rng:allowed=True for image 'Ubuntu 22.04 LTS x64'
DEBUG: Creating instance of image 'Ubuntu 22.04 LTS x64' using flavor 'XXS'
DEBUG: Server 'scs-0101-server' ('3e75f0b5-8d7e-454e-b075-f4ca945914a1') has been created
INFO: VM 'Ubuntu 22.04 LTS x64' doesn't provide the recommended service rngd
DEBUG: Not looking for virtio-rng because required attributes are missing
DEBUG: Deleting server 'scs-0101-server'
DEBUG: Total critical / error / info: 0 / 0 / 25 |
|
... and here is (part of) the output for CentOS 8, which has a package management problem mentioned in the code as well. Most importantly, we get an ERROR because the amount of entropy isn't fixed at 256, which means that the kernel is too old. DEBUG: Unable to pick flavor with hw_rng:allowed=True for image 'CentOS 8'
DEBUG: Creating instance of image 'CentOS 8' using flavor 'XXS'
DEBUG: Server 'scs-0101-server' ('4d0c2549-4534-4294-b99e-be2121ecca2b') has been created
DEBUG: Not looking for virtio-rng because required attributes are missing
ERROR: VM 'CentOS 8' didn't have a fixed amount of entropy available. Expected 256, got 3783.
DEBUG: Error running 'aptitude': bash: apt-get: command not found
DEBUG: Error running 'dnf': Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
DEBUG: Error running 'yum': Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
DEBUG: Error running 'pacman': sudo: pacman: command not found
DEBUG: No package manager worked; proceeding anyway as rng-utils might be present nonetheless.
DEBUG: Deleting server 'scs-0101-server'
DEBUG: Total critical / error / info: 0 / 1 / 23 |
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
This PR introduces a test for checking Entropy, with regards to the provided Standard.
Things that are tested are as follows: