oracle / railcar

RailCar: Rust implementation of the Open Containers Initiative oci-runtime
Other
1.12k stars 101 forks source link

Platform should be optional #27

Closed udzura closed 6 years ago

udzura commented 6 years ago

Hi,

struct Spec's member platform should be optional, because current docker seems not to provide this in its config.json when invoke the runtime via docker-containerd-shim. So this instruction is now broken.

(tested with Docker 17.09.0-ce on Ubuntu Zesty)

$ docker info
Containers: 22                      
 Running: 1                         
 Paused: 0                          
 Stopped: 21                                                             
Images: 1                                                                
Server Version: 17.09.0-ce          
Storage Driver: overlay2            
 Backing Filesystem: extfs          
 Supports d_type: true              
 Native Overlay Diff: true          
Logging Driver: json-file           
Cgroup Driver: cgroupfs             
Plugins:                            
 Volume: local                      
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive                     
Runtimes: rc runc                                                        
Default Runtime: runc               
Init Binary: docker-init            
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa               
Security Options: 
 apparmor 
 seccomp 
  Profile: default                  
Kernel Version: 4.10.0-37-generic   
Operating System: Ubuntu 17.04      
OSType: linux                       
Architecture: x86_64                
CPUs: 2                             
Total Memory: 989.8MiB              
Name: ubuntu-zesty                  
ID: ...          
Docker Root Dir: /var/lib/docker    
Debug Mode (client): false          
Debug Mode (server): true           
 File Descriptors: 26               
 Goroutines: 42                     
 System Time: 2017-10-20T03:21:52.575539454Z                             
 EventsListeners: 0                 
Registry: https://index.docker.io/v1/                                    
Experimental: true                  
Insecure Registries:                
 127.0.0.0/8                        
Live Restore Enabled: false         

WARNING: No swap limit support      
vishvananda commented 6 years ago

Thank you for this fix. It looks like the field was actually removed before the 1.0 release (https://github.com/opencontainers/runtime-spec/pull/850). I'm thinking it might be better to just remove it rather than make it optional. If you would like to make that change and go sign the cla I can merge your code. Otherwise I can just make the change to remove it.

udzura commented 6 years ago

I got it. Changed codes to just remove lines and force-pushed. :D

vishvananda commented 6 years ago

this was fixed in 62575a51842296e7a55eb51cf9697aa0318a0516 Please resubmit if further changes are needed.

udzura commented 6 years ago

OK, Thanks!