|
|
@ -83,6 +83,7 @@ func ExecutePreUpdateCommand(client container.Client, container container.Contai
|
|
|
|
// ExecutePostUpdateCommand tries to run the post-update lifecycle hook for a single container.
|
|
|
|
// ExecutePostUpdateCommand tries to run the post-update lifecycle hook for a single container.
|
|
|
|
func ExecutePostUpdateCommand(client container.Client, newContainerID types.ContainerID) {
|
|
|
|
func ExecutePostUpdateCommand(client container.Client, newContainerID types.ContainerID) {
|
|
|
|
newContainer, err := client.GetContainer(newContainerID)
|
|
|
|
newContainer, err := client.GetContainer(newContainerID)
|
|
|
|
|
|
|
|
timeout := newContainer.PostUpdateTimeout()
|
|
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.WithField("containerID", newContainerID.ShortID()).Error(err)
|
|
|
|
log.WithField("containerID", newContainerID.ShortID()).Error(err)
|
|
|
@ -97,7 +98,7 @@ func ExecutePostUpdateCommand(client container.Client, newContainerID types.Cont
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
clog.Debug("Executing post-update command.")
|
|
|
|
clog.Debug("Executing post-update command.")
|
|
|
|
_, err = client.ExecuteCommand(newContainerID, command, 1)
|
|
|
|
_, err = client.ExecuteCommand(newContainerID, command, timeout)
|
|
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
clog.Error(err)
|
|
|
|
clog.Error(err)
|
|
|
|