aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mehrdad Nurolahzade <mehr...@nurolahzade.com>
Subject Re: Review Request 50052: AURORA-1736 Display reservations and persistent volumes in /offers debug http endpoint
Date Tue, 19 Jul 2016 21:56:22 GMT


> On July 19, 2016, 2:13 p.m., Dmitriy Shirchenko wrote:
> > File Attachment: NEW - offers-new.json
> > <https://reviews.apache.org/r/50052/#fcomment103>
> >
> >     Why is there a double nested labels: labels array under reservation? Is this
just a carry over from how Aurora gets offers from Mesos?
> >     
> >     So there is a key `labels` and then underneath is there's another key `labels`
whose value is an array. Seems like one of them is not necessary.
> >     
> >     ```json
> >     reservation: {
> >     labels: {
> >     labels: [
> >     {
> >     key: "job",
> >     value: "devcluster/www-data/prod/hello"
> >     }
> >     ]
> >     }
> >     }
> >     ```

This is a question we have to put to Mesos people, it's a weired design. I can confirm that
it is not due to our rendering of their protobuf structures.

To verify I played with their ```src/tests/reservation_endpoints_tests.cpp``` tests and dumped
their ```ReservationInfo``` structures and noticed the same weired nest behavior. Also, if
you try to set labels through supplied http endpoints ```/reserve``` you would notice the
call would fail unless you supply nested labels:
```
curl -i \
      -d slaveId="d091a635-33c8-4409-989f-9bef16e36f34-S0" \
      -d resources='[
        {
          "name": "disk",
          "type": "SCALAR",
          "scalar": { "value": 128 },
          "role": "aurora-role",
         "reservation": {
	   "labels": {
	     "labels" : [{"key": "job", "value": "devcluster/www-data/prod/hello"}]
           }
         }
        }
      ]' \
      -X POST http://192.168.33.7:5050/master/reserve
```


- Mehrdad


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50052/#review142830
-----------------------------------------------------------


On July 18, 2016, 7:12 p.m., Mehrdad Nurolahzade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50052/
> -----------------------------------------------------------
> 
> (Updated July 18, 2016, 7:12 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Stephan Erb.
> 
> 
> Bugs: AURORA-1736
>     https://issues.apache.org/jira/browse/AURORA-1736
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1736 Display reservations and persistent volumes in /offers debug http endpoint
> 
> 
> Diffs
> -----
> 
>   config/legacy_untested_classes.txt 1ea2183ab20cc5c6bca147bcea4e5c708d576b62 
>   src/main/java/org/apache/aurora/scheduler/http/Offers.java 80f082410896a50d86c7886736caf79581f5051c

>   src/test/java/org/apache/aurora/scheduler/http/OffersTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/50052/diff/
> 
> 
> Testing
> -------
> 
> Manual, Jenkins, and end_to_end
> 
> 
> File Attachments
> ----------------
> 
> CURRENT
>   https://reviews.apache.org/media/uploaded/files/2016/07/18/1de4c357-c932-4c84-962f-4209a5b679bc__offers-old.json
> NEW
>   https://reviews.apache.org/media/uploaded/files/2016/07/19/799bcd1f-f9c8-4b6e-bbaa-ce8022b1dac1__offers-new.json
> 
> 
> Thanks,
> 
> Mehrdad Nurolahzade
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message