Retry creating dynamic networks if not found
Retry creating dynamic networks if not found

In cases there are failures in task start, swarmkit might be trying to
restart the task again in the same node which might keep failing. This
creates a race where when a failed task is getting removed it might
remove the associated network while another task for the same service
or a different service but connected to the same network is proceeding
with starting the container knowing that the network is still
present. Fix this by reacting to `ErrNoSuchNetwork` error during
container start by trying to recreate the managed networks. If they
have been removed it will be recreated. If they are already present
nothing bad will happen.

Signed-off-by: Jana Radhakrishnan <045898bda7d4800fe4909a9831e702ab79e266be@docker.com>

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