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

If container exits on error, eventually important information from stdout is omitted #16

Closed
bionade24 opened this issue May 26, 2021 · 4 comments
Assignees

Comments

@bionade24
Copy link
Owner

Example ros-melodic-moveit-perception: https://abs-cd.oscloud.info/cd_manager/ros-melodic-moveit-ros-perception
Real part of stdout + stderr combined:

Total Installed Size:  1423.30 MiB                                                                                                                                                                        
                                                                                                                                                                                                          
:: Proceed with installation? [Y/n]                                                                                                                                                                       
checking keyring...                                                                                                                                                                                       
checking package integrity...                                                                                                                                                                             
loading package files...                                                                                                                                                                                  
checking for file conflicts...                                                                                                                                                                            
error: failed to commit transaction (conflicting files)                                                                                                                                                   
/opt/ros/melodic/lib/python3.9/site-packages/libgtest.so exists in both 'ros-melodic-moveit-core' and 'ros-melodic-tf'                                                                                    
/opt/ros/melodic/lib/python3.9/site-packages/libgtest.so.1.10.0 exists in both 'ros-melodic-moveit-core' and 'ros-melodic-tf'                                                                             
Errors occurred, no packages were upgraded.                                                                                                                                                               
==> ERROR: 'pacman' failed to install missing dependencies.                                                                                                                                               
==> Missing dependencies:                                                                                                                                                                                 
  -> ros-build-tools                                                                                                                                                                                      
  -> ros-melodic-message-filters                                                                                                                                                                          
  -> ros-melodic-moveit-core                                                                                                                                                                              
  -> ros-melodic-moveit-msgs           

Shown in abs_cd:

warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency
warning: dependency cycle detected:
warning: libglvnd will be installed before its mesa dependency
error: failed to commit transaction (conflicting files)
==> ERROR: 'pacman' failed to install missing dependencies.
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency
warning: dependency cycle detected:
warning: libglvnd will be installed before its mesa dependency
error: failed to commit transaction (conflicting files)
==> ERROR: 'pacman' failed to install missing dependencies.
==> ERROR: Could not resolve all dependencies.
No packages were built!

@fmauch Tagging you as it affects you.

Proposed solutions:

  1. Pacman should imho put all important error information to stderr -> Upstream bug
  2. Capture both logs on error cases, too. The docker API for Python makes this unnecessary complicated imao. ContainerError only has stderr as member. The current implementation can't work that way, we would have need to run containers with detach=True and remove=False to get the container logs after exited on failiure IIRC. -> I'll try to propose adding an output member upstream.

We still could fix this temporarily if necessary.

@fmauch
Copy link
Contributor

fmauch commented May 26, 2021

Thanks for summing this up. I remember having a short discussion about this in an email with you a while ago, but that's a prime example showing the actual problem.

@bionade24
Copy link
Owner Author

Thanks for summing this up. I remember having a short discussion about this in an email with you a while ago, but that's a prime example showing the actual problem.

Yeah, back then I didn't take your argument, but you were right. In this case the actual error message is omitted.

@bionade24 bionade24 self-assigned this May 26, 2021
@bionade24
Copy link
Owner Author

Seems like it's easy to solve and I was wrong about the upstream problem. docker/docker-py#2745

@bionade24
Copy link
Owner Author

Fixed f046d5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants