Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0C94C200C63 for ; Thu, 27 Apr 2017 00:30:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0B179160BB4; Wed, 26 Apr 2017 22:30:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 51D68160BA8 for ; Thu, 27 Apr 2017 00:30:53 +0200 (CEST) Received: (qmail 61060 invoked by uid 500); 26 Apr 2017 22:30:52 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 61049 invoked by uid 99); 26 Apr 2017 22:30:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Apr 2017 22:30:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E516DC0DB2; Wed, 26 Apr 2017 22:30:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.451 X-Spam-Level: **** X-Spam-Status: No, score=4.451 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id JaCNU7GR5GE5; Wed, 26 Apr 2017 22:30:50 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 129BB5F342; Wed, 26 Apr 2017 22:30:50 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A88A1E0185; Wed, 26 Apr 2017 22:30:49 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 581C6C40124; Wed, 26 Apr 2017 22:30:49 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2129574732825856167==" MIME-Version: 1.0 Subject: Re: Review Request 58747: Fixed docker uri fetcher strict v2 schema 1 check. From: Gilbert Song To: Jie Yu , Chun-Hung Hsiao , Ilya Pronin Cc: Gilbert Song , mesos Date: Wed, 26 Apr 2017 22:30:49 -0000 Message-ID: <20170426223049.64641.91303@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Gilbert Song X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/58747/ X-Sender: Gilbert Song References: <20170426200150.64641.97633@reviews-vm2.apache.org> In-Reply-To: <20170426200150.64641.97633@reviews-vm2.apache.org> Reply-To: Gilbert Song X-ReviewRequest-Repository: mesos archived-at: Wed, 26 Apr 2017 22:30:54 -0000 --===============2129574732825856167== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > On April 26, 2017, 1:01 p.m., Ilya Pronin wrote: > > We can check if we got a schema 1 manifest by parsing manifest JSON first and checking `schemaVersion` field in it as I did here: https://reviews.apache.org/r/53850/diff/1#0 Otherwise we may get a cryptic error message saying that some fields are missing. What do you think? > > Jie Yu wrote: > Also related to https://reviews.apache.org/r/58725 > > Maybe we should just land Ilya's scheme 2 support? Gilbert, thouughts? Thank you guys. I think they are separate issues. There is a bug in the check after reading the docker spec doc: In https://docs.docker.com/registry/spec/manifest-v2-1/: ``` Manifest Type Media Type manifest “application/vnd.docker.distribution.manifest.v1+json” signed manifest “application/vnd.docker.distribution.manifest.v1+prettyjws” Note that “application/json” will also be accepted for schema 1. ``` The check introduced in r/53848 does not capture the `Note` that `“application/json” will also be accepted for schema 1`. This supposes to be the backward compactible note for old registries < 2.3. I would +1 to land Ilya's schema 2 support, but it may not catch up with 1.3 release. Should we land this quick fix first then land the schema 2 support? - Gilbert ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58747/#review173085 ----------------------------------------------------------- On April 26, 2017, 12:14 p.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58747/ > ----------------------------------------------------------- > > (Updated April 26, 2017, 12:14 p.m.) > > > Review request for mesos, Chun-Hung Hsiao, Ilya Pronin, and Jie Yu. > > > Bugs: MESOS-7272 > https://issues.apache.org/jira/browse/MESOS-7272 > > > Repository: mesos > > > Description > ------- > > This check was introduced from this patch: > https://reviews.apache.org/r/53848/ > > The check on registry v2 schema 1 is too strict. It does not work > for registries that are older version < 2.3, because the ContentType > header may be something like this "application/json; charset=utf-8". > No schema information is included in the manifest header for old > registries. > > > Diffs > ----- > > src/uri/fetchers/docker.cpp 1c6ab929deacfc29aa6b4f1df04c2b9782044a90 > > > Diff: https://reviews.apache.org/r/58747/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Gilbert Song > > --===============2129574732825856167==--