You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prepare /home/config/{environ,resource}.txt. (step A)
Instantiate XXXKernel object to keep track of the container lifecycle.
XXXKernelCreationContext.start_container()
Finalize the port mapping.
Create the container.
Append the container ID to /home/config/resource.txt. (step B)
Start the container.
Refactoring
Rename spawn() to prepare_container() for clarity.
spawn() method does not spawn anything... It just prepares the config files in the scratch directory, and instantiate the internal record object.
Remove container_id from KernelResourceSpec.
There are duplicate file-write operations for /home/config/resource.txt to just append the container ID (i.e., The step B repeats the entire step A for this). Since there are no other places that read KernelResourceSpec.container_id, we can simply remove it and just append the container ID line after creating the container without repeating the step A.
The text was updated successfully, but these errors were encountered:
The container creation step works as follows:
XXXKernelCreationContext.spawn()
/home/config/{environ,resource}.txt
. (step A)XXXKernel
object to keep track of the container lifecycle.XXXKernelCreationContext.start_container()
/home/config/resource.txt
. (step B)Refactoring
spawn()
toprepare_container()
for clarity.spawn()
method does not spawn anything... It just prepares the config files in the scratch directory, and instantiate the internal record object.container_id
fromKernelResourceSpec
./home/config/resource.txt
to just append the container ID (i.e., The step B repeats the entire step A for this). Since there are no other places that readKernelResourceSpec.container_id
, we can simply remove it and just append the container ID line after creating the container without repeating the step A.The text was updated successfully, but these errors were encountered: