Skip to content

Commit

Permalink
fix: fixed unexpected error logs from reading grpc container when it …
Browse files Browse the repository at this point in the history
…hasn't started, fixes RHOAIENG-15573 (#159)

Signed-off-by: Dhiraj Bokde <[email protected]>
  • Loading branch information
dhirajsb authored Nov 7, 2024
1 parent 57094ff commit 9f9501a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/controller/modelregistry_controller_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ const (
ReasonResourcesAvailable = "ResourcesAvailable"
ReasonResourcesUnavailable = "ResourcesUnavailable"

grpcContainerName = "grpc-container"
grpcContainerName = "grpc-container"
containerCreatingReason = "ContainerCreating"
)

// errRegexp is based on the CHECK_EQ macro output used by mlmd container.
Expand Down Expand Up @@ -231,8 +232,8 @@ func (r *ModelRegistryReconciler) CheckPodStatus(ctx context.Context, req ctrl.R
failedContainers := make(map[string]string)
for _, s := range p.Status.ContainerStatuses {
if !s.Ready {
// look for MLMD container errors
if s.Name == grpcContainerName {
// look for MLMD container errors, make sure it has also been created
if s.Name == grpcContainerName && s.State.Waiting != nil && s.State.Waiting.Reason != containerCreatingReason {
// check container log for MLMD errors
dbError, err := r.getGrpcContainerDBerror(ctx, p)
if err != nil {
Expand Down

0 comments on commit 9f9501a

Please sign in to comment.