Skip to content

Commit ee04f4a

Browse files
fix: fix issue with add node do not restart docker (#8838)
1 parent 7bcfa78 commit ee04f4a

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

agent/app/service/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ func (u *DockerService) UpdateConf(req dto.SettingUpdate, withRestart bool) erro
147147
}
148148
daemonMap := make(map[string]interface{})
149149
_ = json.Unmarshal(file, &daemonMap)
150-
151150
switch req.Key {
152151
case "Registries":
153152
req.Value = strings.TrimSuffix(req.Value, ",")
@@ -480,6 +479,7 @@ func getDockerRestartCommand() (string, error) {
480479
}
481480

482481
func restartDocker() error {
482+
global.LOG.Info("restart docker")
483483
restartCmd, err := getDockerRestartCommand()
484484
if err != nil {
485485
return err

frontend/src/api/interface/setting.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ export namespace Setting {
245245
nodeID: number;
246246
licenseID: number;
247247
syncList: string;
248-
withRestartDocker: boolean;
248+
withDockerRestart: boolean;
249249
}
250250
export interface LicenseUnbind {
251251
id: number;
252252
force: boolean;
253-
withRestartDocker: boolean;
253+
withDockerRestart: boolean;
254254
}
255255
}

frontend/src/views/setting/license/bind/xpack.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,11 @@ const onBind = async (formEl: FormInstance | undefined) => {
9595
9696
const submit = async () => {
9797
loading.value = true;
98-
console.log(withDockerRestart.value);
9998
await bindLicense({
10099
licenseID: form.licenseID,
101100
nodeID: form.nodeID,
102101
syncList: form.syncList,
103-
withRestartDocker: withDockerRestart.value,
102+
withDockerRestart: withDockerRestart.value,
104103
})
105104
.then(() => {
106105
loading.value = false;

frontend/src/views/setting/license/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const submitUnbind = async () => {
192192
await unbindLicense({
193193
id: unbindRow.value.id,
194194
force: forceUnbind.value,
195-
withRestartDocker: withDockerRestart.value,
195+
withDockerRestart: withDockerRestart.value,
196196
})
197197
.then(() => {
198198
loading.value = false;

0 commit comments

Comments
 (0)