Skip to content

Commit 471c46f

Browse files
author
OpenShift Bot
authored
Merge pull request #11950 from danwinship/fix-docker-restart-1.4
Merged by openshift-bot
2 parents 5c9d014 + 11a1f61 commit 471c46f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/sdn/plugin/node.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ func (node *OsdnNode) dockerPreCNICleanup() error {
126126
// "systemctl restart" will bail out (unnecessarily) in the
127127
// OpenShift-in-a-container case, so we work around that by sending
128128
// the messages by hand.
129-
if err := osexec.Command("dbus-send", "--system", "--print-reply", "--reply-timeout=2000", "--type=method_call", "--dest=org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager.Reload"); err != nil {
129+
if _, err := osexec.Command("dbus-send", "--system", "--print-reply", "--reply-timeout=2000", "--type=method_call", "--dest=org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager.Reload").CombinedOutput(); err != nil {
130130
log.Error(err)
131131
}
132-
if err := osexec.Command("dbus-send", "--system", "--print-reply", "--reply-timeout=2000", "--type=method_call", "--dest=org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager.RestartUnit", "string:'docker.service' string:'replace'"); err != nil {
132+
if _, err := osexec.Command("dbus-send", "--system", "--print-reply", "--reply-timeout=2000", "--type=method_call", "--dest=org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager.RestartUnit", "string:'docker.service' string:'replace'").CombinedOutput(); err != nil {
133133
log.Error(err)
134134
}
135135

0 commit comments

Comments
 (0)