summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/auto-update.go3
-rw-r--r--pkg/domain/infra/abi/pods.go4
2 files changed, 6 insertions, 1 deletions
diff --git a/pkg/domain/entities/auto-update.go b/pkg/domain/entities/auto-update.go
index eed617bf8..5ea2cdf15 100644
--- a/pkg/domain/entities/auto-update.go
+++ b/pkg/domain/entities/auto-update.go
@@ -8,6 +8,9 @@ type AutoUpdateOptions struct {
// pending, it will be indicated in the Updated field of
// AutoUpdateReport.
DryRun bool
+ // If restarting the service with the new image failed, restart it
+ // another time with the previous image.
+ Rollback bool
}
// AutoUpdateReport contains the results from running auto-update.
diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go
index 9f033a4c0..055c495d5 100644
--- a/pkg/domain/infra/abi/pods.go
+++ b/pkg/domain/infra/abi/pods.go
@@ -250,7 +250,9 @@ func (ic *ContainerEngine) prunePodHelper(ctx context.Context) ([]*entities.PodP
func (ic *ContainerEngine) PodCreate(ctx context.Context, opts entities.PodCreateOptions) (*entities.PodCreateReport, error) {
podSpec := specgen.NewPodSpecGenerator()
- opts.ToPodSpecGen(podSpec)
+ if err := opts.ToPodSpecGen(podSpec); err != nil {
+ return nil, err
+ }
pod, err := generate.MakePod(podSpec, ic.Libpod)
if err != nil {
return nil, err