Bytesalat
Mission Specialist
Mission Specialist
  • 757 Views

Error in lab-environment Chapter 9.9 "Create-review"

Jump to solution

I think I discovered an error in the grading function for lab exercise "create-review" (chapter 9.9) of course DO374:

The grader complains that the python package "Pillow" is missing from the custom execution-environment-image you are supposed to create in this exercise.But using "ansible-navigator images" to inspect the python-packages included in the image I have just built reveals that "pillow" (lowercase!) has indeed been installed.

All other checks of the grader PASS except this one. Even the final test of opening the website of serverf.lab.example.com correctly shows the QR-code it is supposed to display.

The issue seems to be that the grader is configured to search for "Pillow" (capitalized) in the image, but the packages are only listed in lowercase formatting, "pillow".

Labels (2)
1 Solution

Accepted Solutions
Chetan_Tiwary_
Moderator
Moderator
  • 325 Views

@alexajo The issue is already escalated to the course development team via an internal JIRA - One temporary workaround was suggested to update the `/home/student/.venv/labs/lib/python3.6/site-packages/do374/ansible/inventory/group_vars/private_automation_hub/ee.yml` file to use `pillow` (lower-case) instead of `Pillow` (capitalized) - and the grading script should "pass" it. 

@bonnevil FYI 

 

View solution in original post

6 Replies
wbialy
Flight Engineer Flight Engineer
Flight Engineer
  • 667 Views

I got the exact same issue. Pillow is installed on the container (pillow==10.2.0) and all other checks are passing.

I experienced another issue though. For me ansible-builder buid failed on the certificate verification when connecting to Galaxy. I did copied the specified certificate and Contatiner file before building the image but that did not resolve the issue. I had to set ignore_certs = true under [galaxy] in the ansible.cfg to get this resolve.

Bytesalat
Mission Specialist
Mission Specialist
  • 665 Views

I don't recall having to set ignore certs.

Did you make sure to use `podman build` to build the image and not `ansible-builder build`?

The latter would overwrite the Containerfile again, which removes the COPY directive that copies the certificate to the container image.

wbialy
Flight Engineer Flight Engineer
Flight Engineer
  • 659 Views

ahh, yes thx! It’s because the build command in the first step runs the create part which does the overwrite. I wrongly assumed the build reuses what the manual execution of create created. I can see the lab uses podman to build the image. I did overlook this

alexajo
Flight Engineer
Flight Engineer
  • 341 Views

I got the same error and I'm not sure why. I agree that I think its an issue with the grading script. And this is my problem with scripts grading my exam. I got a fail for this lab b/c of this when it should have been a pass. 

cat ~/training/web/requirements.txt
Pillow
qrcode

...
- hub: Show grading failures: ["The 'hub.lab.example.com/review/ee-training-rhel8:v1.0' container image does not include the 'Pillow' python package."]

 

Travis
Moderator
Moderator
  • 328 Views

@alexajo -

You don't quite have enough details here to show that what you have is correct. I do see that in the requirements.txt file which is used to provide Python packages that you have Pillow and qrencode, but that doesn't mean it is correct.

I would suggest using podman locally to open the container and inspect it or use ansible-navigator to open the EE in the TUI (interactive) mode and look at the OS and Python packages installed to ensure the container image actually has the packages.

Finally, looking at this it is attempting to grade the container from Hub, so I would look at Private Automation hub to ensure the container image exists there (in the correct location review) and that it has been configured correctly to be deployed from Automation Controller.

Keep in mind, it is possible that things could "work" but if the container image isn't in the correct location on Automation Hub, it doesn't matter.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Chetan_Tiwary_
Moderator
Moderator
  • 326 Views

@alexajo The issue is already escalated to the course development team via an internal JIRA - One temporary workaround was suggested to update the `/home/student/.venv/labs/lib/python3.6/site-packages/do374/ansible/inventory/group_vars/private_automation_hub/ee.yml` file to use `pillow` (lower-case) instead of `Pillow` (capitalized) - and the grading script should "pass" it. 

@bonnevil FYI 

 

Join the discussion
You must log in to join this conversation.