Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide debug option for the mcloud-device container #135

Closed
vdelendik opened this issue May 5, 2023 · 4 comments · Fixed by #188
Closed

provide debug option for the mcloud-device container #135

vdelendik opened this issue May 5, 2023 · 4 comments · Fixed by #188
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@vdelendik
Copy link
Contributor

in case of any problem we do have device containers in restarting state:

901fc27e483b   public.ecr.aws/zebrunner/mcloud-device:2.4.6   "/bin/sh -c 'bash /o…"   30 hours ago   Restarting (255) 17 seconds ago                                                                                                                                                device-iPhone_12_mini-0..E
bde99e1f3f57   public.ecr.aws/zebrunner/appium:1.4.12-beta2   "/root/entry_point.sh"   30 hours ago   Up 8 seconds (health: starting)    4723/tcp, 0.0.0.0:7741->7741/tcp, :::7741->7741/tcp                                                                                         device-iPhone_12_mini-0..E-appium

let's introduce new DEBUG mode which allow us to stay at the end so user can bash into the container and test all kind of infrastructure settings. Ideally it should be organized via start command argument.

if DEBUG=true we should prohibit exit and restart and stay as is...
The same should be implemented for appium container

@vdelendik vdelendik added the enhancement New feature or request label May 5, 2023
@vdelendik vdelendik added this to the 2.4.7 milestone May 5, 2023
@vdelendik vdelendik modified the milestones: 2.4.7, 2.5 Jul 18, 2023
@vdelendik vdelendik modified the milestones: 2.6, 2.7 Nov 4, 2023
@azarouski azarouski linked a pull request Feb 23, 2024 that will close this issue
@azarouski azarouski self-assigned this Feb 23, 2024
@azarouski
Copy link
Contributor

azarouski commented Feb 23, 2024

To check this enhancement you need to change Dockerfile variables before build:

ENV DEBUG=true
ENV DEBUG_TIMEOUT=3600
ENV VERBOSE=true

or run an already built container with --env args:

docker run -d --env DEBUG=true --env VERBOSE=true ... IMAGE [COMMAND] [ARG...]

after that you need to broke some code to provoke container to exit (in usual situation) and check that container has not exited. Also you need to check logs for verbose output.

@dhreben
Copy link

dhreben commented Mar 1, 2024

Debug and Verbose mods are present, but we catch log issue /opt/debug.sh: line 12: 3600: command not found

log:

docker run --env DEBUG=true --env VERBOSE=true public.ecr.aws/zebrunner/mcloud-device:2.6.4-beta17
/opt/debug.sh: line 12: 3600: command not found
+ [[ -z '' ]]
+ echo 'Exiting without restart as one of important setting is missed!'
+ exit 0
+ echo 'Exit attempt intercepted. Sleep for 3600 seconds activated!'
+ sleep 3600
#######################################################
#                                                     #
#                  DEBUG mode is on!                  #
#                                                     #
#######################################################
#######################################################
#                                                     #
#                 VERBOSE mode is on!                 #
#                                                     #
#######################################################
Exiting without restart as one of important setting is missed!
Exit attempt intercepted. Sleep for 3600 seconds activated!

@dhreben dhreben reopened this Mar 1, 2024
@azarouski
Copy link
Contributor

fixed

@dhreben
Copy link

dhreben commented Mar 1, 2024

Verified.
Tested on public.ecr.aws/zebrunner/mcloud-device:2.6.4-beta17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants