aboutsummaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorcdoern <cbdoer23@g.holycross.edu>2021-09-30 14:12:30 -0400
committercdoern <cdoern@redhat.com>2021-10-01 14:50:58 -0400
commit163d81cc0dd0139eb14dfcd6595c9eafb40472b2 (patch)
tree2051005b0798566930a6fa90b20c3b2416d894eb /pkg/specgen
parente9d8524af5122314e47385299bf9ae3d0b000096 (diff)
downloadpodman-163d81cc0dd0139eb14dfcd6595c9eafb40472b2.tar.gz
podman-163d81cc0dd0139eb14dfcd6595c9eafb40472b2.tar.bz2
podman-163d81cc0dd0139eb14dfcd6595c9eafb40472b2.zip
Pod Events Logging Fix
on create, libpod was only creating a new event if the pod had an infra container. now, pod creation triggers a new pod event with or without infra Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/generate/pod_create.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go
index e523aef42..a4027eae7 100644
--- a/pkg/specgen/generate/pod_create.go
+++ b/pkg/specgen/generate/pod_create.go
@@ -59,6 +59,12 @@ func MakePod(p *entities.PodSpec, rt *libpod.Runtime) (*libpod.Pod, error) {
if err != nil {
return nil, err
}
+ } else {
+ // SavePod is used to save the pod state and trigger a create event even if infra is not created
+ err := rt.SavePod(pod)
+ if err != nil {
+ return nil, err
+ }
}
return pod, nil
}