Skip to content

Commit 41991c6

Browse files
Merge pull request #88 from benluddy/bz-1968700
Bug 1968700: Fix nil pointer dereference while reporting bundle unpack status.
2 parents 44c25e2 + 4b4a763 commit 41991c6

File tree

2 files changed

+16
-6
lines changed
  • staging/operator-lifecycle-manager/pkg/controller/bundle
  • vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/controller/bundle

2 files changed

+16
-6
lines changed

staging/operator-lifecycle-manager/pkg/controller/bundle/bundle_unpacker.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,15 @@ func (c *ConfigMapUnpacker) pendingContainerStatusMessages(job *batchv1.Job) (st
525525
continue
526526
}
527527

528+
msg := fmt.Sprintf("Unpack pod(%s/%s) container(%s) is pending", pod.Namespace, pod.Name, ic.Name)
529+
waiting := ic.State.Waiting
530+
if waiting != nil {
531+
msg = fmt.Sprintf("Unpack pod(%s/%s) container(%s) is pending. Reason: %s, Message: %s",
532+
pod.Namespace, pod.Name, ic.Name, waiting.Reason, waiting.Message)
533+
}
534+
528535
// Aggregate the wait reasons for all pending containers
529-
containerStatusMessages = append(containerStatusMessages,
530-
fmt.Sprintf("Unpack pod(%s/%s) container(%s) is pending. Reason: %s, Message: %s",
531-
pod.Namespace, pod.Name, ic.Name, ic.State.Waiting.Reason, ic.State.Waiting.Message))
536+
containerStatusMessages = append(containerStatusMessages, msg)
532537
}
533538
}
534539

vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/controller/bundle/bundle_unpacker.go

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)