Closed aharold92 closed 2 months ago
I've been able to reproduce this in my test environment. I had to force the "Not enough space available on /var/lib/leapp/scratch" finding by mounting /var/lib/leapp
from 1 Gb volume. The line "Risk Factor: high (error)" in the leapp-report.txt
file is what triggers the failure. Also, the failure will only happen if leapp_known_inhibitors
has been defined. It will not fail with the leapp_known_inhibitors
is left as default of []
.
We also need to talk about why are we parsing the leapp-report.txt
file rather than just using the json report data.
Lastly, that this particular finding is not reported as an inhibitor already seems like a Leapp bug to me.
Fixed with #216.
We are receiving this error after we started using the infra.leapp 1.3.1 version
FAILED! => {"msg": "The conditional check 'item.key not in leapp_known_inhibitors' failed. The error was: error while evaluating conditional (item.key not in leapp_known_inhibitors): 'dict object' has no attribute 'key'. 'dict object' has no attribute 'key'\n\nThe error appears to be in '/runner/requirements_collections/ansible_collections/infra/leapp/roles/analysis/tasks/analysis-leapp.yml': line 96, column 3, but may \nbe elsewhere in the file depending on the exact syntax problem. \n\n The offending line appears to be:\n\n-name: analysis-leapp | Capture inhibitors in a list leapp_inhibitors\n ^ here\n"}
This error occurs because the data structure created by the task
- name: Construct a data structure to add high errors to leapp_report_json
does not include a key in the data structure.That exclusion then leads to a data structure that looks like the following
This data structure is then added to
leapp_report_json
.Then when the role reaches the following task
It fails because it is looping through the entries in
leapp_report_json
searching for keys in theleapp_known_inhibitors
to exclude. Key does not exist as a dict entry in the generated data structure for high (error) items and the task fails.