oblanco
Mission Specialist
Mission Specialist
  • 1,756 Views

Lab: Troubleshooting Application Issues

https://role.rhu.redhat.com/rol-rhu/app/courses/rh342-8.4/pages/ch08s09

The lab need to be corrected because if you run the grade script, it is going to give you an error like this

* Checking containerized application ...................... FAIL

despite the application is responding with the correct data. If you look at the answers, it is peformining an extra step which is exposing the port 3306. I don't think this is specified in the instructions and it is scary if the real exam is going to be like that 

20 Replies
Chetan_Tiwary_
Moderator
Moderator
  • 622 Views

@Travis Totally agree on this, and +1 to especially the below one :

"Again, as mentioned the grading for exams is a completely different team and we look at things differently there. For the course environment, often we use the scripts to check what we've done to get to a specific solution and that isn't necessarily the "ONLY" way to do things."

I will update the JIRA based on your inputs - so that it can be tracked there. 

Thanks for your detailed explanation - useful as always !!

 

0 Kudos
bonnevil
Starfighter Starfighter
Starfighter
  • 557 Views

@Travis  Interesting. I'll run it past the team, see what they think.

Travis
Moderator
Moderator
  • 554 Views

Thanks @bonnevil - I wanted to call attention to this (especially as we are talking about a newer version of the course). I do see the point the poster has made here and agree that technically, we are getting the web application to work and it isn't needed in this instance for the Port 3306 to be forwarded to the. container because of the solution using the Containerized Network for a database container and not leveraging NAT and that both the webserver (running locally) and the container (hosted locally) have access to the network subnet for the 10.xxx eliminating the need to 100% require port forwarding.

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
  • 541 Views

Thanks @bonnevil !

0 Kudos
Chetan_Tiwary_
Moderator
Moderator
  • 621 Views

@Travis I got the crux of your post - Thank you ! That was some detailing !! 

I raised the ticket and provided the link to this discussion on it - may be it could be improved. 

0 Kudos
oblanco
Mission Specialist
Mission Specialist
  • 613 Views

I don't know how to post images here so I am going to create a video and I am going to send you the link , I hope it helps  

oblanco
Mission Specialist
Mission Specialist
  • 610 Views

@Travis Let me know if you could watch the video, I didn't want it to posting in here but if you wanted me I can do it. Thank you in advance 

Travis
Moderator
Moderator
  • 562 Views

Not sure you can place a video here. I've sent you an e-mail and I'm willing to watch the video, but again, I agreed with you because the way the lab is written (especially the solution), you are being told to solve a specific way in the solutions.

podman run -d --name mariadb-service -p 3306:3306
-v /opt/var/lib/mysql/data:/var/lib/mysql/data:Z -e MYSQL_USER=site_monitor
-e MYSQL_PASSWORD=reviews -e MYSQL_DATABASE=sitemonitor --net maria-bridge
registry.access.redhat.com/rhscl/mariadb-101-rhel7

So technically, it does work without the port 3306 being exposed, and that is because this is a newer version of Podman not using the SERVERA network and NAT, but instead leveraging the container networking functionality "--net maria-bridge". Because of that, if you are accessing the database container locally from SERVERA by the 10.xx.xx address like we changed the application, connectivity exists. 

$hostname = "10.89.0.7";

However, if we weren't using the 10.xx network and it was localhost 127.0.0.1 and we didn't specify the "--net maria-bridge" port 3306 would have absolutely needed to be forwarded from the SERVERA to the container for the NAT/SLIRP to work.

Additionally, that is why the Step 4.2 worked is because you are using the IP Address of the container on the "--net maria-bridge" network so again, SERVERA has access to everything and doesn't need the ports to be open. If we would have made you connect to ServerA from workstation, the Firewall port would have needed to be open and we would have needed port forwarding setup to get to the proper container. It is because the "--net maria-bridge" existed and we had an IP address that the port forwarding to the container didn't matter since serverA is has network access to all container networks.

I've sent you an e-mail you can respond to with the video if you want me to watch it.

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
  • 569 Views

@oblanco You have 2 options to attach an image here , 

use the camera button while drafting messages or use the Drag and drop option to attach files:

Chetan_Tiwary__0-1702982591708.png

 

0 Kudos
bonnevil
Starfighter Starfighter
Starfighter
  • 537 Views

I don't know if this has been mentioned further up-thread, but the relevant ticket for this issue is https://issues.redhat.com/browse/PTL-11265.

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