exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 84 discussion

Actual exam question from Cisco's 350-901
Question #: 84
Topic #: 1
[All 350-901 Questions]

A container running a Python script is failing when it reaches the integration testing phase of the CI/CD process. The code has been reviewed thoroughly, and the build process works on this container and all other containers pass unit and integration testing.
What should be verified to resolve the issue?

  • A. that the correct port is exposed in the Dockerfile
  • B. that the necessary modules and packages are installed on build
  • C. that the script is running from the right directory
  • D. that the Python version of the container image is correct
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
fechao
Highly Voted 3 years, 11 months ago
I choose A
upvoted 13 times
...
Cyphr
Highly Voted 2 years, 9 months ago
A: does not make sense as the docker file does not expose the ports. The purpose of the EXPOSE command within the docker file is simply for documentation purposes. The port exposure happens at runtime with the -p argument. https://docs.docker.com/engine/reference/builder/#expose "The EXPOSE instruction does not actually publish the port. It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published. To actually publish the port when running the container, use the -p flag on docker run to publish and map one or more ports, or the -P flag to publish all exposed ports and map them to high-order ports."
upvoted 11 times
...
e7bd289
Most Recent 2 days, 3 hours ago
Selected Answer: B
In the context of a container running a Python script that fails during the integration testing phase of the CI/CD process, verifying that the necessary modules and packages are installed on build is crucial.
upvoted 2 times
...
razvan999
6 months ago
IMO is A unit tests passed so B is out, I would also say C, including reviews (which can be valid for all at the same time) A is because you don't have to use EXPOSE word in Dockerfile, but you can expose the wrong port by starting the app
upvoted 2 times
...
kirrim
7 months, 2 weeks ago
Selected Answer: C
The build process succeded on this container, so B and D are ruled out. A is ruled out because the container had the correct port exposed on it during standalone testing, so the dockerfile has the port exposed properly. Only C is left
upvoted 1 times
...
Zizu007
8 months, 1 week ago
Correct answer is C: To resolve the issue of a container running a Python script failing during the integration testing phase, you should verify option: C. that the script is running from the right directory. Integration tests may depend on the working directory from which the script is executed, and if the script is not running from the correct directory, it can lead to failures. Ensure that the script is executing in the appropriate directory with the necessary files and dependencies available. While the other options may also be important in certain cases, such as checking the exposed port or verifying that the required modules are installed, the issue described in the question is related to script execution and directory context. Therefore, verifying that the script is running from the correct directory is the most relevant action to take in this context
upvoted 1 times
...
johntermlen
10 months, 2 weeks ago
Selected Answer: B
The other options are not as likely to be the cause of the problem. Option A, checking that the correct port is exposed in the Dockerfile, is unlikely to be the cause of the problem because the container is passing unit and integration testing. Option C, checking that the script is running from the right directory, is also unlikely to be the cause of the problem because the code has been reviewed thoroughly. Option D, checking that the Python version of the container image is correct, is also unlikely to be the cause of the problem because all other containers are passing unit and integration testing.
upvoted 1 times
...
blurain
11 months ago
Selected Answer: B
Going with B, the issue is happening in integration testing phase. The script might depend on packages that are not available in build
upvoted 1 times
...
Teringzooi
1 year, 8 months ago
Selected Answer: A
Correct answer: A Build succeeds. Other answers: build would fail.
upvoted 2 times
...
designated
1 year, 9 months ago
Selected Answer: A
I would choose A if the integration phase is being done by another device/software outside of the container and B if it is not. It will depend on how the environment is deployed and the question is not clear about that.
upvoted 3 times
...
CiscoRider
2 years ago
I agree with B as the answer.
upvoted 1 times
...
__al__
2 years, 2 months ago
pretty much all answers could be right depending on how the integration phase/script/environment was set-up
upvoted 3 times
...
[Removed]
2 years, 3 months ago
It is not A. Like written by Cyphr, this is from the Cisco DEVCOR study guide, page 107: EXPOSE <port>: Does not publish the port but functions as documentation between the person who builds the image and the person who runs the container. To publish the port when running the container, use the -p flag with docker run. I'll go with B.
upvoted 3 times
...
thinkingape
3 years, 6 months ago
agree with fechao and endermao, Integration tests are responsible for ensuring that the access to external systems works as expected. Database writes and reads, calls to APIs, and basically every I/O operation your application is performing.
upvoted 2 times
...
endermao
3 years, 8 months ago
Agreed with fechao, only wrong exposure of ports can lead to a successful build, other choices will make the building failed at first
upvoted 3 times
Timidwolf
3 years, 6 months ago
I agree with A. But your reason is not correct. Building still could succeed with other errors. The question implies Unit Test has passed but it failed at Integration Test. The rest is same as thinkingape.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago