Skip to content

Commit 6221e63

Browse files
Merge pull request #22985 from lambinoo/fix-hang-boot-podman
Fix hang boot podman
2 parents abf0350 + c819c7a commit 6221e63

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

libpod/runtime.go

+5
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,11 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
613613
// refresh runs.
614614
runtime.valid = true
615615

616+
// Setup the worker channel early to start accepting jobs from refresh,
617+
// but do not start to execute the jobs right away. The runtime is not
618+
// ready at this point.
619+
runtime.setupWorkerQueue()
620+
616621
// If we need to refresh the state, do it now - things are guaranteed to
617622
// be set up by now.
618623
if doRefresh {

libpod/runtime_worker.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
package libpod
44

5-
func (r *Runtime) startWorker() {
5+
func (r *Runtime) setupWorkerQueue() {
66
r.workerChannel = make(chan func(), 10)
7+
}
8+
9+
func (r *Runtime) startWorker() {
710
go func() {
811
for w := range r.workerChannel {
912
w()

0 commit comments

Comments
 (0)