Return-Path: X-Original-To: apmail-mesos-issues-archive@minotaur.apache.org Delivered-To: apmail-mesos-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83CC01989A for ; Wed, 13 Apr 2016 16:12:26 +0000 (UTC) Received: (qmail 7639 invoked by uid 500); 13 Apr 2016 16:12:25 -0000 Delivered-To: apmail-mesos-issues-archive@mesos.apache.org Received: (qmail 7517 invoked by uid 500); 13 Apr 2016 16:12:25 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 7287 invoked by uid 99); 13 Apr 2016 16:12:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2016 16:12:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 75E2D2C14E1 for ; Wed, 13 Apr 2016 16:12:25 +0000 (UTC) Date: Wed, 13 Apr 2016 16:12:25 +0000 (UTC) From: "Klaus Ma (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (MESOS-5184) Mesos does not validate role info when framework registered with specified role MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-5184?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Klaus Ma reassigned MESOS-5184: ------------------------------- Assignee: Klaus Ma > Mesos does not validate role info when framework registered with specifie= d role > -------------------------------------------------------------------------= ------ > > Key: MESOS-5184 > URL: https://issues.apache.org/jira/browse/MESOS-5184 > Project: Mesos > Issue Type: Bug > Components: general > Affects Versions: 0.28.0 > Reporter: Liqiang Lin > Assignee: Klaus Ma > Fix For: 0.29.0 > > > When framework registered with specified role, Mesos does not validate th= e role info. It will accept the subscription and send unreserved resources = as offer to the framework. > {code} > # cat register.json > { > "framework_id": {"value" : "test1"}, > "type":"SUBSCRIBE", > "subscribe":{ > "framework_info":{ > "user":"root", > "name":"test1", > "failover_timeout":60, > "role":"/test/test1", > "id":{"value":"test1"}, > "principal":"test1", > "capabilities":[{"type":"REVOCABLE_RESOURCES"}] > }, > "force":true > } > } > # curl -v http://192.168.56.110:5050/api/v1/scheduler -H "Content-type: = application/json" -X POST -d @register.json > * Hostname was NOT found in DNS cache > * Trying 192.168.56.110... > * Connected to 192.168.56.110 (192.168.56.110) port 5050 (#0) > > POST /api/v1/scheduler HTTP/1.1 > > User-Agent: curl/7.35.0 > > Host: 192.168.56.110:5050 > > Accept: */* > > Content-type: application/json > > Content-Length: 265 > > > * upload completely sent off: 265 out of 265 bytes > < HTTP/1.1 200 OK > < Date: Wed, 06 Apr 2016 21:34:18 GMT > < Transfer-Encoding: chunked > < Mesos-Stream-Id: 8b2c6740-b619-49c3-825a-e6ae780f4edc > < Content-Type: application/json > < > 69 > {"subscribed":{"framework_id":{"value":"test1"}},"type":"SUBSCRIBED"}20 > {"type":"HEARTBEAT"}1531 > {"offers":{"offers":[{"agent_id":{"value":"2cd5576e-6260-4262-a62c-b0dc45= c86c45-S0"},"attributes":[{"name":"mesos_agent_type","text":{"value":"IBM_M= ESOS_EGO"},"type":"TEXT"},{"name":"hostname","text":{"value":"mesos2"},"typ= e":"TEXT"}],"framework_id":{"value":"test1"},"hostname":"mesos2","id":{"val= ue":"5b84aad8-dd60-40b3-84c2-93be6b7aa81c-O0"},"resources":[{"name":"disk",= "role":"*","scalar":{"value":20576.0},"type":"SCALAR"},{"name":"ports","ran= ges":{"range":[{"begin":31000,"end":32000}]},"role":"*","type":"RANGES"},{"= name":"mem","role":"*","scalar":{"value":3952.0},"type":"SCALAR"},{"name":"= cpus","role":"*","scalar":{"value":4.0},"type":"SCALAR"}],"url":{"address":= {"hostname":"mesos2","ip":"192.168.56.110","port":5051},"path":"\/slave(1)"= ,"scheme":"http"}},{"agent_id":{"value":"2cd5576e-6260-4262-a62c-b0dc45c86c= 45-S1"},"attributes":[{"name":"mesos_agent_type","text":{"value":"IBM_MESOS= _EGO"},"type":"TEXT"},{"name":"hostname","text":{"value":"mesos1"},"type":"= TEXT"}],"framework_id":{"v > alue":"test1"},"hostname":"mesos1","id":{"value":"5b84aad8-dd60-40b3-84c2= -93be6b7aa81c-O1"},"resources":[{"name":"disk","role":"*","scalar":{"value"= :21468.0},"type":"SCALAR"},{"name":"ports","ranges":{"range":[{"begin":3100= 0,"end":32000}]},"role":"*","type":"RANGES"},{"name":"mem","role":"*","scal= ar":{"value":3952.0},"type":"SCALAR"},{"name":"cpus","role":"*","scalar":{"= value":4.0},"type":"SCALAR"}],"url":{"address":{"hostname":"mesos1","ip":"1= 92.168.56.111","port":5051},"path":"\/slave(1)","scheme":"http"}}]},"type":= "OFFERS"}20 > {"type":"HEARTBEAT"}20 > {code} > As you see, the role under which framework register is "/test/test1", wh= ich is an invalid role according to [#MESOS-2210|https://issues.apache.org/= jira/browse/MESOS-2210] > And Mesos master log > {code} > I0407 05:34:18.132333 20672 master.cpp:2107] Received subscription reques= t for HTTP framework 'test1' > I0407 05:34:18.133515 20672 master.cpp:2198] Subscribing framework 'test1= ' with checkpointing disabled and capabilities [ REVOCABLE_RESOURCES ] > I0407 05:34:18.135027 20674 hierarchical.cpp:264] Added framework test1 > I0407 05:34:18.138746 20672 master.cpp:5659] Sending 2 offers to framewor= k test1 (test1) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)