Skip to content

Commit 1f716cb

Browse files
Fix issue with runtime environment restart failure (#8008)
1 parent 5e2bb27 commit 1f716cb

File tree

10 files changed

+11
-3
lines changed

10 files changed

+11
-3
lines changed

agent/app/service/container_compose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func (u *ContainerService) CreateCompose(req dto.ComposeCreate) error {
201201
}
202202
go func() {
203203
taskItem.AddSubTask(i18n.GetMsgByKey("ComposeCreate"), func(t *task.Task) error {
204-
cmd := exec.Command("docker-compose", "-f", req.Path, "up", "-d")
204+
cmd := exec.Command("docker", "compose", "-f", req.Path, "up", "-d")
205205
out, err := cmd.CombinedOutput()
206206
taskItem.Log(i18n.GetWithName("ComposeCreateRes", string(out)))
207207
if err != nil {

agent/app/service/runtime_utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func runComposeCmdWithLog(operate string, composePath string, logPath string) er
150150

151151
err = cmd.Run()
152152
if err != nil {
153-
return errors.New(buserr.New("ErrRuntimeStart").Error() + ":" + err.Error())
153+
return errors.New(buserr.New("ErrRuntimeStart").Error() + ":" + stderrBuf.String())
154154
}
155155
return nil
156156
}
@@ -263,7 +263,7 @@ func buildRuntime(runtime *model.Runtime, oldImageID string, oldEnv string, rebu
263263
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Hour)
264264
defer cancel()
265265

266-
cmd := exec.CommandContext(ctx, "docker-compose", "-f", composePath, "build")
266+
cmd := exec.CommandContext(ctx, "docker", "compose", "-f", composePath, "build")
267267
cmd.Stdout = logFile
268268
var stderrBuf bytes.Buffer
269269
multiWriterStderr := io.MultiWriter(&stderrBuf, logFile)

frontend/src/lang/modules/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ const message = {
306306
installerr: 'Installation failed',
307307
applyerror: 'Apply failed',
308308
systemrestart: 'Interrupted',
309+
starterr: 'Startup failed',
309310
},
310311
units: {
311312
second: 'Second',

frontend/src/lang/modules/ja.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ const message = {
300300
installerr: 'インストールに失敗しました',
301301
applyerror: '適用に失敗しました',
302302
systemrestart: '中断',
303+
starterr: '起動に失敗しました',
303304
},
304305
units: {
305306
second: '2番目|2番目|秒',

frontend/src/lang/modules/ko.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ const message = {
301301
installerr: '설치 실패',
302302
applyerror: '적용 실패',
303303
systemrestart: '중단됨',
304+
starterr: '시작 실패',
304305
},
305306
units: {
306307
second: '초 | 초 | 초',

frontend/src/lang/modules/ms.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ const message = {
307307
installerr: 'Pemasangan gagal',
308308
applyerror: 'Permohonan gagal',
309309
systemrestart: 'Dihentikan',
310+
starterr: 'Permulaan gagal',
310311
},
311312
units: {
312313
second: 'saat | saat | saat',

frontend/src/lang/modules/pt-br.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ const message = {
305305
installerr: 'Falha na instalação',
306306
applyerror: 'Falha na aplicação',
307307
systemrestart: 'Interrompido',
308+
starterr: 'Falha na inicialização',
308309
},
309310
units: {
310311
second: 'segundo | segundos | segundos',

frontend/src/lang/modules/ru.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ const message = {
301301
installerr: 'Ошибка установки',
302302
applyerror: 'Ошибка применения',
303303
systemrestart: 'Прервано',
304+
starterr: 'Ошибка запуска',
304305
},
305306
units: {
306307
second: ' секунда | секунда | секунд',

frontend/src/lang/modules/tw.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ const message = {
300300
installerr: '安裝失敗',
301301
applyerror: '申請失敗',
302302
systemrestart: '中斷',
303+
starterr: '啟動失敗',
303304
},
304305
units: {
305306
second: '秒',

frontend/src/lang/modules/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ const message = {
298298
installerr: '安装失败',
299299
applyerror: '申请失败',
300300
systemrestart: '中断',
301+
starterr: '启动失败',
301302
},
302303
units: {
303304
second: '秒',

0 commit comments

Comments
 (0)