Bug 1221210 - YaST Internal error while removing docker image
Summary: YaST Internal error while removing docker image
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Ruby (show other bugs)
Version: Leap 15.5
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Manuel Schnitzer
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-10 11:08 UTC by Mindaugas Baranauskas
Modified: 2024-03-11 09:25 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
y2logs.tgz (15.13 MB, application/x-compressed-tar)
2024-03-10 11:08 UTC, Mindaugas Baranauskas
Details
Part of /var/log/y2log with a failing docker start (17.54 KB, text/plain)
2024-03-11 09:17 UTC, Stefan Hundhammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mindaugas Baranauskas 2024-03-10 11:08:43 UTC
Created attachment 873380 [details]
y2logs.tgz

I wanted remove Docker image hugomods/hugo:exts. I openedd YaST Docker module, selected image and pressed button to remove.

I got YaST window:

Internal error. Please report a bug report with logs.
Run save_y2logs to get complete logs.

Caller: /usr/lib64/ruby/gems/2.5.0/gems/excon-0.73.0/lib/excon/middlewares/expects.rb:13:in `response_call'

Details: Expected([200, 201, 202, 203, 204, 304]) <=> Actual(409 Conflict)

Expected result:
image removed from list, but after re-opening it still exist. 
And can reproduce this bug again, I can reproduce with other image too.
Comment 1 Mindaugas Baranauskas 2024-03-10 11:18:26 UTC
Removing Docker image via YaST successed after executing:
> docker system prune
Comment 2 Stefan Hundhammer 2024-03-10 17:47:28 UTC
Complete backtrace:

> 2024-03-10 13:01:46 <1> linux-opensuse(29973)
>   [Ruby] bin/y2start(<main>):22
>   y2base called with ["docker", "qt", "-name", "YaST2", "-icon", "yast"]
...
...
> 2024-03-10 13:02:28 <3> linux-opensuse(29973)
>   [Ruby] yast/wfm.rb(handle_exception):271
>   Client /usr/share/YaST2/clients/docker.rb failed with
>   'Expected([200, 201, 202, 203, 204, 304]) <=> Actual(409 Conflict)'
>   (Excon::Error::Conflict).
> .
> Backtrace:
> .
> /usr/lib64/ruby/gems/2.5.0/gems/excon-0.73.0/lib/excon/middlewares/expects.rb:13:in `response_call'
> /usr/lib64/ruby/gems/2.5.0/gems/excon-0.73.0/lib/excon/middlewares/response_parser.rb:12:in `response_call'
> /usr/lib64/ruby/gems/2.5.0/gems/docker-api-1.13.2/lib/excon/middlewares/hijack.rb:34:in `response_call'
> /usr/lib64/ruby/gems/2.5.0/gems/excon-0.73.0/lib/excon/connection.rb:448:in `response'
> /usr/lib64/ruby/gems/2.5.0/gems/excon-0.73.0/lib/excon/connection.rb:279:in `request'
> /usr/lib64/ruby/gems/2.5.0/gems/docker-api-1.13.2/lib/docker/connection.rb:42:in `request'
> /usr/lib64/ruby/gems/2.5.0/gems/docker-api-1.13.2/lib/docker/connection.rb:57:in `block (2 levels) in <class:Connection>'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:329:in `image_delete'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:116:in `block (2 levels) in controller_loop'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:141:in `handle_docker_exceptions'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:93:in `block in controller_loop'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:91:in `loop'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:91:in `controller_loop'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:51:in `run'
> /usr/share/YaST2/lib/ydocker/main_dialog.rb:40:in `run'
> /usr/share/YaST2/clients/docker.rb:21:in `<top (required)>'
> /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `eval'
> /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `run_client'
> /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin'
> /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper'
> /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction'


So this received a HTTP 409 error code which was unexpected.
Comment 3 Stefan Hundhammer 2024-03-11 09:16:34 UTC
yast-docker doesn't operate on this low level; it doesn't handle HTTP requests and responses directly:

https://github.com/yast/yast-docker/blob/openSUSE-15_5/src/lib/ydocker/main_dialog.rb#L329


It delegates this to the docker-api rubygem. Maybe that HTTP 409 response is new in the docker daemon.

-> rubygem-docker-api maintainers


% osc maintainer -e rubygem-docker-api
Defined in project:  devel:languages:ruby:extensions
  bugowner of rubygem-docker-api : 
   -

  maintainer of rubygem-docker-api : 
   mschnitzer@suse.com, dcermak@suse.com, -

Defined in project:  devel:languages:ruby
  bugowner of rubygem-docker-api : 
   -

  maintainer of rubygem-docker-api : 
   stephan@kulow.org, mschnitzer@suse.com, -
Comment 4 Stefan Hundhammer 2024-03-11 09:17:53 UTC
Created attachment 873386 [details]
Part of /var/log/y2log with a failing docker start
Comment 5 Stefan Hundhammer 2024-03-11 09:20:57 UTC
In the case of this failure, yast-docker doesn't do much: After the start-up phase, the user clicks on one of the dockers in the table and then "Delete", and the exception is thrown and not caught in any of the intermediate layers until the YaST "internal error" handler.