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

Unable to open yast2-docker #32

Open
szw0407 opened this issue Mar 13, 2024 · 3 comments
Open

Unable to open yast2-docker #32

szw0407 opened this issue Mar 13, 2024 · 3 comments

Comments

@szw0407
Copy link

szw0407 commented Mar 13, 2024

Error as below shown in log file:

2024-03-13 20:59:05 <3> xxxxx(23925) [Ruby] yast/wfm.rb(handle_exception):271 Client /usr/share/YaST2/clients/docker.rb failed with 'Cannot convert nil to DiskSize' (TypeError).
Backtrace:
/usr/share/YaST2/lib/y2storage/disk_size.rb:101:in `initialize'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:278:in `new'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:278:in `block (2 levels) in images_items'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:270:in `each'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:270:in `block in images_items'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:267:in `map'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:267:in `images_items'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:228:in `images_table'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:191:in `images_page'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:181:in `dialog_content'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:64:in `create_dialog'
/usr/share/YaST2/lib/ydocker/main_dialog.rb:48: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/3.3.0/yast/wfm.rb:345:in `eval'
/usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:345:in `run_client'
/usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:206:in `call_builtin'
/usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:206:in `call_builtin_wrapper'
/usr/lib64/ruby/vendor_ruby/3.3.0/yast/wfm.rb:195:in `CallFunction'
/usr/lib/YaST2/bin/y2start:68:in `<main>'
2024-03-13 20:59:05 <3> xxxxx(23925) [Ruby] yast/wfm.rb(handle_exception):308 Internal error. Please report a bug report with logs.<br>Run save_y2logs to get complete logs.<br><br>Caller:  /usr/share/YaST2/lib/y2storage/disk_size.rb:101:in `initialize&#39;<br><br>Details: Cannot convert nil to DiskSize

I am not sure what happened. I have installed Docker version 25.0.3-ce, build f417435e5

Thanks for your help.

@szw0407 szw0407 changed the title Unable to open yast2=docker Unable to open yast2-docker Mar 13, 2024
@mvidner
Copy link
Member

mvidner commented Mar 18, 2024

Thanks for the report!

That error happens at this line, apparently VirtualSize is not reported for an image.

Y2Storage::DiskSize.new(image.info["VirtualSize"]).to_human_string

Can you please paste the output of

sudo ruby -rdocker -e 'p Docker::VERSION; pp Docker::version; pp Docker::Image.all'

@szw0407
Copy link
Author

szw0407 commented Mar 28, 2024

"2.2.0"
{"Platform"=>{"Name"=>""},
 "Components"=>
  [{"Name"=>"Engine",
    "Version"=>"25.0.3-ce",
    "Details"=>
     {"ApiVersion"=>"1.44",
      "Arch"=>"amd64",
      "BuildTime"=>"2024-02-22T14:13:42.000000000+00:00",
      "Experimental"=>"false",
      "GitCommit"=>"f417435e5",
      "GoVersion"=>"go1.20.14",
      "KernelVersion"=>"6.8.1-1-default",
      "MinAPIVersion"=>"1.24",
      "Os"=>"linux"}},
   {"Name"=>"containerd", "Version"=>"v1.7.10", "Details"=>{"GitCommit"=>"4e1fe7492b9df85914c389d1f15a3ceedbb280ac"}},
   {"Name"=>"runc", "Version"=>"1.1.12", "Details"=>{"GitCommit"=>"v1.1.12-0-g51d5e94601ce"}},
   {"Name"=>"docker-init", "Version"=>"0.2.0_catatonit", "Details"=>{"GitCommit"=>""}}],
 "Version"=>"25.0.3-ce",
 "ApiVersion"=>"1.44",
 "MinAPIVersion"=>"1.24",
 "GitCommit"=>"f417435e5",
 "GoVersion"=>"go1.20.14",
 "Os"=>"linux",
 "Arch"=>"amd64",
 "KernelVersion"=>"6.8.1-1-default",
 "BuildTime"=>"2024-02-22T14:13:42.000000000+00:00"}
[#<Docker::Image:0x00007fe9506bbdb8
  @connection=
   #<Docker::Connection:0x00007fe9362687a8
    @options={:socket=>"/var/run/docker.sock"},
    @url="unix:///",
    @version=
     {"Platform"=>{"Name"=>""},
      "Components"=>
       [{"Name"=>"Engine",
         "Version"=>"25.0.3-ce",
         "Details"=>
          {"ApiVersion"=>"1.44",
           "Arch"=>"amd64",
           "BuildTime"=>"2024-02-22T14:13:42.000000000+00:00",
           "Experimental"=>"false",
           "GitCommit"=>"f417435e5",
           "GoVersion"=>"go1.20.14",
           "KernelVersion"=>"6.8.1-1-default",
           "MinAPIVersion"=>"1.24",
           "Os"=>"linux"}},
        {"Name"=>"containerd", "Version"=>"v1.7.10", "Details"=>{"GitCommit"=>"4e1fe7492b9df85914c389d1f15a3ceedbb280ac"}},
        {"Name"=>"runc", "Version"=>"1.1.12", "Details"=>{"GitCommit"=>"v1.1.12-0-g51d5e94601ce"}},
        {"Name"=>"docker-init", "Version"=>"0.2.0_catatonit", "Details"=>{"GitCommit"=>""}}],
      "Version"=>"25.0.3-ce",
      "ApiVersion"=>"1.44",
      "MinAPIVersion"=>"1.24",
      "GitCommit"=>"f417435e5",
      "GoVersion"=>"go1.20.14",
      "Os"=>"linux",
      "Arch"=>"amd64",
      "KernelVersion"=>"6.8.1-1-default",
      "BuildTime"=>"2024-02-22T14:13:42.000000000+00:00"}>,
  @id="sha256:d2c94e258dcb3c5ac2798d32e1249e42ef01cba4841c2234249495f87264ac5a",
  @info=
   {"Containers"=>-1,
    "Created"=>1683046167,
    "Labels"=>nil,
    "ParentId"=>"",
    "RepoDigests"=>["hello-world@sha256:53641cd209a4fecfc68e21a99871ce8c6920b2e7502df0a20671c6fccc73a7c6"],
    "RepoTags"=>["hello-world:latest"],
    "SharedSize"=>-1,
    "Size"=>13256,
    "id"=>"sha256:d2c94e258dcb3c5ac2798d32e1249e42ef01cba4841c2234249495f87264ac5a"}>]

Thanks.

@mvidner
Copy link
Member

mvidner commented Apr 11, 2024

Thanks!
https://docs.docker.com/engine/api/v1.45/#tag/Image/operation/ImageList says for VirtualSize

Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.

So we need to fix yast2-docker to use image.info["Size"] instead

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