Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0922181E4 for ; Mon, 3 Aug 2015 19:37:16 +0000 (UTC) Received: (qmail 49199 invoked by uid 500); 3 Aug 2015 19:37:10 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 49176 invoked by uid 500); 3 Aug 2015 19:37:10 -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 49163 invoked by uid 99); 3 Aug 2015 19:37:10 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2015 19:37:10 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B043FD8D40; Mon, 3 Aug 2015 19:37:08 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6387102273439474989==" MIME-Version: 1.0 Subject: Re: Review Request 37024: Add an endpoint that exposes component version. From: "Ben Mahler" To: "Ben Mahler" Cc: "haosdent huang" , "mesos" Date: Mon, 03 Aug 2015 19:37:08 -0000 Message-ID: <20150803193708.4206.93780@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Ben Mahler" X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/37024/ X-Sender: "Ben Mahler" References: <20150802101628.4205.68429@reviews.apache.org> In-Reply-To: <20150802101628.4205.68429@reviews.apache.org> Reply-To: "Ben Mahler" X-ReviewRequest-Repository: mesos --===============6387102273439474989== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37024/#review93947 ----------------------------------------------------------- Thanks! Let's include the git / build information as well. Another question, how are you planning to add this to the scheduler driver and executor driver? In these cases, it is likely better to create a 'Version' Process with process id "version" that routes an endpoint at "/" (so just "/version" should route to this). If we go with this approach, we just have to start a 'Version' Process from the master/slave entrypoints and the drivers' initialization. src/master/http.cpp (lines 526 - 542) Could you include these fields as well? They capture "version" / "build" information. Once you do, perhaps it is worth adding a '`JSON::Object version()`' helper in common/http.hpp. - Ben Mahler On Aug. 2, 2015, 10:16 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37024/ > ----------------------------------------------------------- > > (Updated Aug. 2, 2015, 10:16 a.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-1841 > https://issues.apache.org/jira/browse/MESOS-1841 > > > Repository: mesos > > > Description > ------- > > Add an endpoint that exposes component version. > > > Diffs > ----- > > src/master/http.cpp 3772e39015a22655dcad00ad844dc5ddc90db43f > src/master/master.hpp ea18c4e0bb0743747401b9cd5ea14ae9b56ae3cc > src/master/master.cpp 351a3c2b5f551ad065682cea601d2436258e4544 > src/slave/http.cpp b0fe5f520dfca156548ba8c436d42fc432223f3d > src/slave/slave.hpp 41d09497be313819a9c78361b8595f6f26dc8460 > src/slave/slave.cpp 6b21db973dc95dd5eb2238eebe697db9dd063ef1 > > Diff: https://reviews.apache.org/r/37024/diff/ > > > Testing > ------- > > Manual test result: > > ``` > $ curl http://localhost:5050/slave(1)/version.json 2>/dev/null|jq . > { > "version": "0.24.0" > } > ``` > > ``` > $ curl http://localhost:5050/master/version.json 2>/dev/null|jq . > { > "version": "0.24.0" > } > ``` > > > Thanks, > > haosdent huang > > --===============6387102273439474989==--