From 430d1ade67fcdbd46bc32ff484572c1b19655dac Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 27 May 2015 15:52:51 -0700 Subject: [PATCH] Review feedback: - Match verbiage with other output - Remove dead code and clearer flow Signed-off-by: Richard Scothern Upstream-commit: e817e08481b91638037e55b8d4855f56814c81f5 Component: engine --- components/engine/graph/pull.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/components/engine/graph/pull.go b/components/engine/graph/pull.go index 98831eba85..208cadd2f9 100644 --- a/components/engine/graph/pull.go +++ b/components/engine/graph/pull.go @@ -69,7 +69,7 @@ func (s *TagStore) Pull(image string, tag string, imagePullConfig *ImagePullConf } if v2mirrorEndpoint != nil { - logrus.Debugf("Attempting pull from v2 mirror: %s", v2mirrorEndpoint.URL) + logrus.Debugf("Attempting to pull from v2 mirror: %s", v2mirrorEndpoint.URL) return s.pullFromV2Mirror(v2mirrorEndpoint, v2mirrorRepoInfo, imagePullConfig, tag, sf, logName) } } @@ -138,12 +138,10 @@ func makeMirrorRepoInfo(repoInfo *registry.RepositoryInfo, mirror string) *regis func configureV2Mirror(repoInfo *registry.RepositoryInfo, s *registry.Service) (*registry.Endpoint, *registry.RepositoryInfo, error) { mirrors := repoInfo.Index.Mirrors - if len(mirrors) == 0 && !repoInfo.Index.Official { - officialIndex, err := s.ResolveIndex(registry.IndexServerName()) - if err != nil { - return nil, nil, err - } - mirrors = officialIndex.Mirrors + + if len(mirrors) == 0 { + // no mirrors configured + return nil, nil, nil } v1MirrorCount := 0