@@ -164,7 +164,9 @@ func (c *calcium) doCreateContainerWithCPUPeriod(nodename string, connum int, qu
164
164
}
165
165
166
166
// after start
167
- runExec (node .Engine , info , AFTER_START )
167
+ if err := runExec (node .Engine , info , AFTER_START ); err != nil {
168
+ log .Errorf ("Run exec at %s error: %s" , AFTER_START , err .Error ())
169
+ }
168
170
169
171
_ , err = c .store .AddContainer (info .ID , opts .Podname , node .Name , containerName , nil , opts .Memory )
170
172
if err != nil {
@@ -439,7 +441,9 @@ func (c *calcium) doCreateContainerWithScheduler(nodename string, cpumap []types
439
441
}
440
442
441
443
// after start
442
- runExec (node .Engine , info , AFTER_START )
444
+ if err := runExec (node .Engine , info , AFTER_START ); err != nil {
445
+ log .Errorf ("Run exec at %s error: %s" , AFTER_START , err .Error ())
446
+ }
443
447
444
448
_ , err = c .store .AddContainer (info .ID , opts .Podname , node .Name , containerName , quota , opts .Memory )
445
449
if err != nil {
@@ -770,7 +774,9 @@ func (c *calcium) doUpgradeContainer(containers []*types.Container, image string
770
774
imageToDelete := info .Config .Image
771
775
772
776
// before stop old container
773
- runExec (engine , info , BEFORE_STOP )
777
+ if err := runExec (engine , info , BEFORE_STOP ); err != nil {
778
+ log .Errorf ("Run exec at %s error: %s" , BEFORE_STOP , err .Error ())
779
+ }
774
780
775
781
// stops the old container
776
782
timeout := 5 * time .Second
@@ -834,7 +840,9 @@ func (c *calcium) doUpgradeContainer(containers []*types.Container, image string
834
840
}
835
841
836
842
// after start
837
- runExec (engine , newInfo , AFTER_START )
843
+ if err := runExec (engine , newInfo , AFTER_START ); err != nil {
844
+ log .Errorf ("Run exec at %s error: %s" , AFTER_START , err .Error ())
845
+ }
838
846
839
847
// if so, add a new container in etcd
840
848
_ , err = c .store .AddContainer (newInfo .ID , container .Podname , container .Nodename , containerName , container .CPU , container .Memory )
0 commit comments