File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ mod environment;
1919mod memory;
2020mod mounts;
2121mod namespaces;
22- mod resources;
2322pub mod spec;
2423mod state;
2524
@@ -159,7 +158,7 @@ impl Container {
159158 } ;
160159
161160 self . state . pid = child. pid ( ) ;
162- self . state . set_status ( Status :: Running ) . unwrap ( ) ;
161+ self . state . set_status ( Status :: Running ) ? ;
163162
164163 child. wait ( ) . map_err ( Error :: ContainerWaitCommand ) ?. code ( )
165164 } ;
Original file line number Diff line number Diff line change 181181 " /proc/irq" ,
182182 " /proc/sys" ,
183183 " /proc/sysrq-trigger"
184- ]
184+ ],
185+ "resources" : {
186+ "cpu" : {
187+ "shares" : 1024 ,
188+ "quota" : 1000000 ,
189+ "period" : 500000 ,
190+ "realtimeRuntime" : 950000 ,
191+ "realtimePeriod" : 1000000
192+ },
193+ "memory" : {
194+ "limit" : 536870912 ,
195+ "reservation" : 536870912 ,
196+ "kernel" : -1 ,
197+ "kernelTCP" : -1 ,
198+ "swappiness" : 0 ,
199+ "disableOOMKiller" : false
200+ }
201+ }
185202 }
186203}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ pub struct RunCommand {
2626#[ async_trait]
2727impl Handler for RunCommand {
2828 async fn handler ( & self , _: & mut env_logger:: Builder ) -> Result < ( ) > {
29- // Create a container by passing the bundle provided in arguments to it's constructor.
29+ // Create a container by passing the bundle and the id provided in arguments to it's constructor.
3030 let mut container = Container :: new ( & self . bundle , & self . name ) ?;
3131
3232 // Run the container
You can’t perform that action at this time.
0 commit comments