diff --git a/controllers/appmgr_controller.go b/controllers/appmgr_controller.go index 9d57fd7..1b85ccf 100644 --- a/controllers/appmgr_controller.go +++ b/controllers/appmgr_controller.go @@ -970,20 +970,7 @@ func (r *ApplicationManagerController) pollDownloadProgress(ctx context.Context, offset int64 total int64 } - maxImageSize := int64(0) - - for _, nodeName := range im.Spec.Nodes { - for _, ref := range im.Spec.Refs { - size := im.Status.Conditions[nodeName][ref.Name]["total"] - if size == "" { - continue - } - total, _ := strconv.ParseInt(size, 10, 64) - if total > maxImageSize { - maxImageSize = total - } - } - } + maxImageSize := int64(50173680066) nodeMap := make(map[string]*progress) for _, nodeName := range im.Spec.Nodes { diff --git a/pkg/images/jobs.go b/pkg/images/jobs.go index 970a760..9c427f1 100644 --- a/pkg/images/jobs.go +++ b/pkg/images/jobs.go @@ -258,7 +258,7 @@ func updateProgress(statuses []StatusInfo, ongoing *jobs, seen map[string]int64, } offset += status.Offset } - if doneLayer == statusesLen { + if doneLayer == statusesLen && doneLayer != 0 { offset = imageSize } if imageSize != 0 {