Fix restore active sandbox
Fix restore active sandbox

we store the active sandbox after daemon.containerd.Restore, but there
is a chance the `Restore` will set the container to exit see
(https://github.com/docker/docker/blob/master/libcontainerd/client_linux.go#L469).
so we should check if the container is really running before add it to
activesandbox.

Signed-off-by: Lei Jitang <9ac444d2b5df3db1f31aa1c6462ac8e9e2bde241@huawei.com>

mstanleyjones/docker,yummypeng/docker,kunalkushwaha/docker,cr7pt0gr4ph7/docker,gschaetz/moby,harche/docker,xuxinkun/docker,ndeloof/docker,michelvocks/docker,djs55/docker,yp-engineering/docker,containers/storage,nawawi/docker,Morsicus/docker,moby/moby,darrenstahlmsft/moby,mike1729/docker,kolyshkin/moby,akira-baruah/docker,asbjornenge/docker,coreos/docker,mikebrow/docker,noxiouz/docker,pradipd/moby,jimjag/docker,amatsus/docker,ColinHebert/docker,pradipd/moby,mike1729/docker,hypriot/docker,darrenstahlmsft/docker,cpuguy83/docker,q384566678/docker,yp-engineering/docker,jameszhan/docker,mohmost12/docker,pramodhkp/moby,yasiramin10p/moby,haveatry/docker,endophage/docker,dsau/docker,maxamillion/docker,HideoYamauchi/docker,jlhawn/docker,diogomonica/docker,scotttlin/docker,ripcurld0/moby,darrenstahlmsft/docker,splunk/docker,mtanlee/docker,xiekeyang/docker,qudongfang/docker,mtrmac/docker,amatsus/docker,x1022as/docker,laijs/moby,mahak/docker,ndeloof/docker,docker/docker,mixja/docker,ndeloof/docker,dccurtis/docker,Morsicus/docker,maxamillion/docker,YuPengZTE/docker,yummypeng/docker,xuxinkun/docker,catinthesky/docker,flavio/docker,cpuguy83/docker,mikedougherty/docker,imkin/moby,whuwxl/docker,ColinHebert/docker,justincormack/docker,tophj-ibm/docker,prertik/docker,ffoysal/docker,mixja/docker,bonczj/moby-json-file-logger,hqhq/moby,nawawi/docker,xiekeyang/docker,KingEmet/docker,mikedougherty/docker,duglin/docker,noxiouz/docker,resin-io/docker,projectatomic/docker,nalind/docker,qudongfang/docker,tagomoris/docker,JMesser81/docker,KingEmet/docker,dgageot/docker,cloudflare/docker,POLJM242/docker,yongtang/docker,liaoqingwei/docker,shishir-a412ed/docker,tklauser/docker,tagomoris/docker,cr7pt0gr4ph7/docker,tonistiigi/docker,rhatdan/storage,estesp/docker,Ramzec/docker,madhanrm/docker,danyalKhaliq10p/moby,splunk/docker,vdemeester/docker,pramodhkp/moby,brahmaroutu/docker,thaJeztah/docker,Mokolea/docker,scotttlin/docker,madhanrm/docker,ibuildthecloud/docker,kojiromike/docker,coolljt0725/docker,Syntaxide/docker,msabansal/docker,dmcgowan/docker,jvanz/docker,mkumatag/docker,laijs/docker,SvenDowideit/docker,abhinavdahiya/docker,erikh/docker,yosifkit/docker,whuwxl/docker,docker/docker,x1022as/docker,sanjeo/docker,xiekeyang/docker,kojiromike/docker,tophj-ibm/moby,whuwxl/docker,ripcurld0/moby,gschaetz/moby,13W/docker,nalind/docker,ffoysal/docker,trebonian/docker,kolyshkin/docker,unclejack/docker,konstruktoid/docker-1,YuPengZTE/docker,mike1729/docker,jwhonce/docker,bearstech/moby,kolyshkin/moby,thaJeztah/docker,KarthikNayak/docker,michelvocks/docker,srust/docker,unclejack/docker,jlebon/docker,portworx/docker,thtanaka/docker,zhuguihua/docker,shhsu/docker,laijs/moby,hqhq/moby,dgageot/docker,justyntemme/docker,jhorwit2/docker,prertik/docker,cr7pt0gr4ph7/docker,michael-holzheu/docker,sarnautov/moby,tklauser/docker,duglin/docker,mikedougherty/docker,lixiaobing1/docker,afein/docker,moypray/docker,harche/docker,dperny/docker,danyalKhaliq10p/moby,mahak/docker,xiaods/docker,alfred-landrum/docker,Ramzec/docker,noironetworks/docker,moby/moby,sanjeo/docker,rancher/docker,hypriot/docker,tmp6154/docker,imkin/moby,raja-sami-10p/moby,raja-sami-10p/moby,darrenstahlmsft/docker,laijs/moby,yosifkit/docker,yongtang/docker,dnephin/docker,zhuguihua/docker,yosifkit/docker,bearstech/moby,charleszheng44/moby,erikstmartin/docker,AkihiroSuda/docker,darrenstahlmsft/moby,kunalkushwaha/docker,dperny/docker,mtanlee/docker,flavio/docker,tagomoris/docker,naveed-jamil-tenpearls/moby,jthelin/docker,fcrisciani/docker,nghiant2710/docker,dsheets/moby,duglin/docker,rhatdan/storage,dsau/docker,thtanaka/docker,Mokolea/docker,kojiromike/docker,dims/docker,sterchelen/docker,mikebrow/docker,lixiaobing10051267/docker,jimjag/docker,cyphar/docker,haveatry/docker,hqhq/moby,rhatdan/storage,POLJM242/docker,justyntemme/docker,justyntemme/docker,yp-engineering/docker,eskaaren/docker,cloudflare/docker,twaugh/docker,yasiramin10p/moby,dsheets/moby,raja-sami-10p/moby,YuPengZTE/docker,wenchma/docker,bluebreezecf/docker,resin-io/docker,ripcurld0/moby,msabansal/docker,moul/docker,containers/storage,sterchelen/docker,nalind/docker,projectatomic/docker,moypray/docker,miminar/docker,xiaods/docker,dnephin/docker,mohmost12/docker,charleszheng44/moby,SvenDowideit/docker,dims/docker,Ramzec/docker,jameszhan/docker,flavio/docker,liaoqingwei/docker,gnailuy/docker,jameszhan/docker,konstruktoid/docker-upstream,AkihiroSuda/docker,rhatdan/docker,ibuildthecloud/docker,mixja/docker,kolyshkin/moby,moby/moby,Mokolea/docker,coolljt0725/docker,trebonian/docker,harche/docker,tkopczynski/docker,sdurrheimer/docker,icaoweiwei/docker,abhinavdahiya/docker,srust/docker,JMesser81/docker,fcrisciani/docker,mtanlee/docker,eskaaren/docker,konstruktoid/docker-1,fcrisciani/docker,PatrickLang/moby,abhinavdahiya/docker,konstruktoid/docker-upstream,djs55/docker,SvenDowideit/docker,estesp/docker,PatrickLang/moby,miminar/docker,AkihiroSuda/docker,icaoweiwei/docker,eskaaren/docker,asbjornenge/docker,dgageot/docker,jvanz/docker,cyphar/docker,mtesselH/docker,nghiant2710/docker,imkin/moby,johnstep/moby-moby,erikstmartin/docker,dmcgowan/docker,stevvooe/docker,pradipd/moby,scotttlin/docker,HuKeping/docker,shhsu/docker,containers/storage,KarthikNayak/docker,Syntaxide/docker,ajaymdesai/docker,AkihiroSuda/docker,hypriot/docker,mkumatag/docker,diogomonica/docker,stevvooe/docker,Ramzec/docker,tonistiigi/docker,sdurrheimer/docker,msabansal/docker,resin-io/docker,tophj-ibm/moby,yosifkit/docker,konstruktoid/docker-upstream,tonistiigi/docker,srust/docker,crosbymichael/docker,sdurrheimer/docker,kencochrane/docker,rancher/docker,erikh/docker,charleszheng44/moby,estesp/docker,shishir-a412ed/docker,bluebreezecf/docker,JMesser81/docker,KingEmet/docker,endophage/docker,cpuguy83/docker,13W/docker,dmcgowan/docker,wenchma/docker,lixiaobing1/docker,asbjornenge/docker,jhorwit2/docker,dongjoon-hyun/docker,afein/docker,vdemeester/docker,Syntaxide/docker,mikebrow/docker,kolyshkin/docker,catinthesky/docker,dsheets/moby,tklauser/docker,icaoweiwei/docker,KarthikNayak/docker,jhorwit2/docker,thtanaka/docker,brahmaroutu/docker,tophj-ibm/moby,moul/docker,pramodhkp/moby,thaJeztah/docker,dongjoon-hyun/docker,nghiant2710/docker,jlhawn/docker,xuxinkun/docker,johnstep/moby-moby,qudongfang/docker,mahak/docker,crosbymichael/docker,johnstep/moby-moby,rremer/moby,HuKeping/docker,moypray/docker,ajaymdesai/docker,mahak/docker,madhanrm/docker,x1022as/docker,allencloud/docker,gnailuy/docker,Mokolea/docker,gnailuy/docker,lixiaobing10051267/docker,haveatry/docker,bonczj/moby-json-file-logger,mkumatag/docker,laijs/docker,portworx/docker,dongjoon-hyun/docker,nawawi/docker,tmp6154/docker,maxamillion/docker,sarnautov/moby,trebonian/docker,vdemeester/docker,ibuildthecloud/docker,michael-holzheu/docker,jlhawn/docker,jimjag/docker,sterchelen/docker,noironetworks/docker,noxiouz/docker,xiaods/docker,bearstech/moby,catinthesky/docker,jvanz/docker,danyalKhaliq10p/moby,Morsicus/docker,HideoYamauchi/docker,mstanleyjones/docker,jimjag/docker,dperny/docker,dccurtis/docker,tianon/docker,wenchma/docker,erikstmartin/docker,justincormack/docker,ibuildthecloud/docker,rremer/moby,q384566678/docker,tmp6154/docker,diogomonica/docker,paralin/docker,mtrmac/docker,dsau/docker,13W/docker,kunalkushwaha/docker,nalind/docker,djs55/docker,HideoYamauchi/docker,gjaskiewicz/moby,allencloud/docker,PatrickLang/moby,gnailuy/docker,jlebon/docker,konstruktoid/docker-1,tophj-ibm/docker,prertik/docker,gjaskiewicz/moby,sfsmithcha/docker,sarnautov/moby,erikh/docker,kencochrane/docker,moul/docker,coreos/docker,amatsus/docker,afein/docker,gjaskiewicz/moby,projectatomic/docker,dims/docker,splunk/docker,tophj-ibm/docker,portworx/docker,jwhonce/docker,flavio/docker,paralin/docker,michelvocks/docker,yummypeng/docker,alfred-landrum/docker,sfsmithcha/docker,noironetworks/docker,naveed-jamil-tenpearls/moby,michael-holzheu/docker,jlebon/docker,allencloud/docker,moby/moby,laijs/docker,moul/docker,rancher/docker,tkopczynski/docker,coreos/docker,kencochrane/docker,brahmaroutu/docker,q384566678/docker,yasiramin10p/moby,shhsu/docker,cyphar/docker,akira-baruah/docker,rhatdan/docker,darrenstahlmsft/moby,nawawi/docker,ajaymdesai/docker,zhuguihua/docker,thaJeztah/docker,cpuguy83/docker,ibuildthecloud/docker,tianon/docker,mstanleyjones/docker,cloudflare/docker,twaugh/docker,naveed-jamil-tenpearls/moby,docker/docker,liaoqingwei/docker,paralin/docker,gschaetz/moby,endophage/docker,paralin/docker,justincormack/docker,mtesselH/docker,sanjeo/docker,tkopczynski/docker,dnephin/docker,mtrmac/docker,mohmost12/docker,coolljt0725/docker,mtesselH/docker,jwhonce/docker,rremer/moby,rhatdan/docker,ffoysal/docker,bonczj/moby-json-file-logger,yongtang/docker,miminar/docker,13W/docker,lixiaobing10051267/docker,crosbymichael/docker,konstruktoid/docker-upstream,unclejack/docker,alfred-landrum/docker,dccurtis/docker,bearstech/moby,lixiaobing1/docker,bluebreezecf/docker,ColinHebert/docker,shishir-a412ed/docker,13W/docker,jthelin/docker,sfsmithcha/docker,trebonian/docker,stevvooe/docker,HuKeping/docker,twaugh/docker