Closed infinitewarp closed 2 years ago
Inspection appears to crash out when given a regular old not-LVM image.
ami-01d6971d4709098f9
HOUNDIGRADE_ECS_IMAGE_NAME=quay.io/cloudservices/houndigrade
latest
launch_inspection_instance
celery --app config --workdir cloudigrade worker --concurrency 1 --task-events --queues launch_inspection_instance
[ 37.736767] cloud-init[4456]: Block device attributes for drive "/dev/xvdbb" [ 37.760839] cloud-init[4456]: Device appears to have partitions, PTTYPE: dos [ 37.772771] cloud-init[4456]: Traceback (most recent call last): [ 37.784493] cloud-init[4456]: File "/opt/houndigrade/cli.py", line 900, in <module> [ 37.800511] cloud-init[4456]: File "/opt/houndigrade/.venv/lib/python3.9/site-packages/click/core.py", line 1137, in __call__ [ 37.812689] cloud-init[4456]: return self.main(*args, **kwargs) [ 37.820317] cloud-init[4456]: File "/opt/houndigrade/.venv/lib/python3.9/site-packages/click/core.py", line 1062, in main [ 37.836344] cloud-init[4456]: rv = self.invoke(ctx) [ 37.843500] cloud-init[4456]: File "/opt/houndigrade/.venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke [ 37.864797] cloud-init[4456]: return ctx.invoke(self.callback, **ctx.params) [ 37.873828] cloud-init[4456]: File "/opt/houndigrade/.venv/lib/python3.9/site-packages/click/core.py", line 763, in invoke [ 37.883593] cloud-init[4456]: return __callback(*args, **kwargs) [ 37.887018] cloud-init[4456]: File "/opt/houndigrade/cli.py", line 72, in main [ 37.901779] cloud-init[4456]: mount_and_inspect(drive, image_id, results) [ 37.905866] cloud-init[4456]: File "/opt/houndigrade/cli.py", line 164, in mount_and_inspect [ 37.911319] cloud-init[4456]: if lvm_partitions := is_lvm(partitions): [ 37.918406] cloud-init[4456]: File "/opt/houndigrade/cli.py", line 592, in is_lvm [ 37.922878] cloud-init[4456]: if "LVM2" in properties.get("ID_FS_VERSION"): [ 37.927340] cloud-init[4456]: TypeError: argument of type 'NoneType' is not iterable
I've tested this using the same account and image that triggered my original error, and the whole inspection process appears to be working correctly now. Thanks @katherine-black !
Summary
Inspection appears to crash out when given a regular old not-LVM image.
Steps to Reproduce
ami-01d6971d4709098f9
HOUNDIGRADE_ECS_IMAGE_NAME=quay.io/cloudservices/houndigrade
latest
taglaunch_inspection_instance
task like…celery --app config --workdir cloudigrade worker --concurrency 1 --task-events --queues launch_inspection_instance
Expected Result
Actual Result
Additional context