You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Zameer Manji <zm...@apache.org> on 2017/03/30 03:26:09 UTC

Review Request 58066: Fix schema to allow multiple task volumes per task.

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

Review request for Aurora and Stephan Erb.


Bugs: AURORA-1914
    https://issues.apache.org/jira/browse/AURORA-1914


Repository: aurora


Description
-------

The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.

This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.


Diffs
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
  src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
  src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
  src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 


Diff: https://reviews.apache.org/r/58066/diff/1/


Testing
-------


Thanks,

Zameer Manji


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Zameer Manji <zm...@apache.org>.

> On March 30, 2017, 7:49 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java
> > Lines 33-34 (patched)
> > <https://reviews.apache.org/r/58066/diff/1/?file=1680697#file1680697line33>
> >
> >     Where would I find this name? Searching the code base for `CONSTRAINT_654B` does not return anything for mre.

It's located inside H2's information schema. To confirm this you can do the following:
1. Ensure that the scheduler is running with `-enable_h2_console=true`.
2. Go to the leader at the `/h2console` endpoint.
3. Run the following query: `SELECT * FROM INFORMATION_SCHEMA.CONSTRAINTS WHERE TABLE_NAME='TASK_CONFIG_VOLUMES' AND CONSTRAINT_TYPE='UNIQUE';`
4. Observe that the constraint name is `CONSTRAINT_654B`.


> On March 30, 2017, 7:49 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java
> > Lines 38-40 (patched)
> > <https://reviews.apache.org/r/58066/diff/1/?file=1680697#file1680697line38>
> >
> >     Assuming we perform:
> >     
> >     * up-grade
> >     * down-grade
> >     * up-grade
> >     
> >     We could end up with a different constraint name that will not be dropped properly. We should make sure the name is of the constraint is always consistently added during downgrades.

I have confirmed manually this is the case. In `/h2console` you can drop the constraint and then add it again and observe the constraint name is the same.


> On March 30, 2017, 7:49 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
> > Lines 89-93 (patched)
> > <https://reviews.apache.org/r/58066/diff/1/?file=1680699#file1680699line89>
> >
> >     It feeld weird to me that we are checkin for `image` when deciding if we should fill the (from a datastructure perspective) unrelated field `volumes`. 
> >     
> >     Would it be incorrect that we always populate the volumes?

It seems very wrong to specify volume mounts and not a filesystem image from the Mesos perspective.


- Zameer


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


On March 29, 2017, 8:26 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated March 29, 2017, 8:26 p.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Stephan Erb <se...@apache.org>.

> On March 30, 2017, 4:49 p.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
> > Lines 89-93 (patched)
> > <https://reviews.apache.org/r/58066/diff/1/?file=1680699#file1680699line89>
> >
> >     It feeld weird to me that we are checkin for `image` when deciding if we should fill the (from a datastructure perspective) unrelated field `volumes`. 
> >     
> >     Would it be incorrect that we always populate the volumes?
> 
> Zameer Manji wrote:
>     It seems very wrong to specify volume mounts and not a filesystem image from the Mesos perspective.

We are indeed using this in a form at the moment, even when runnign without filesystem images. 

We launch our agents with the following, so that each container gets a private `/tmp` and `/var/tmp`. W
```
    --default_container_info='{
            "type": "MESOS",
            "volumes": [
                {"host_path": "system/tmp",     "container_path": "/tmp",        "mode": "RW"},
                {"host_path": "system/vartmp",  "container_path": "/var/tmp",    "mode": "RW"}
            ]
        }'
```

When moving to images for some of our tasks, we will have to move those mounts to the job configuration for the remaining non-image tasks. It is therefore essential that we can this feature. On top, if we really wanted to deny that feature, we would have to prevent it at scheduler admission time, rather than on DB access of the DBTaskStore.


- Stephan


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


On March 30, 2017, 5:26 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated March 30, 2017, 5:26 a.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Zameer Manji <zm...@apache.org>.

> On March 30, 2017, 7:49 a.m., Stephan Erb wrote:
> > src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
> > Lines 89-93 (patched)
> > <https://reviews.apache.org/r/58066/diff/1/?file=1680699#file1680699line89>
> >
> >     It feeld weird to me that we are checkin for `image` when deciding if we should fill the (from a datastructure perspective) unrelated field `volumes`. 
> >     
> >     Would it be incorrect that we always populate the volumes?
> 
> Zameer Manji wrote:
>     It seems very wrong to specify volume mounts and not a filesystem image from the Mesos perspective.
> 
> Stephan Erb wrote:
>     We are indeed using this in a form at the moment, even when runnign without filesystem images. 
>     
>     We launch our agents with the following, so that each container gets a private `/tmp` and `/var/tmp`. W
>     ```
>         --default_container_info='{
>                 "type": "MESOS",
>                 "volumes": [
>                     {"host_path": "system/tmp",     "container_path": "/tmp",        "mode": "RW"},
>                     {"host_path": "system/vartmp",  "container_path": "/var/tmp",    "mode": "RW"}
>                 ]
>             }'
>     ```
>     
>     When moving to images for some of our tasks, we will have to move those mounts to the job configuration for the remaining non-image tasks. It is therefore essential that we can this feature. On top, if we really wanted to deny that feature, we would have to prevent it at scheduler admission time, rather than on DB access of the DBTaskStore.

This is a very valid usecase and I think we should support it. However in `MesosTaskFactory` we only set volumes if there is an image. I think the best course of action from here is the following:

1. Leave the conservative behaviour as is in this patch.
2. File a ticket to track your feature request.
3. Fix the problem with a real patch that address storage, `MesosTaskFactory` and adds the appropriate tests.


- Zameer


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


On March 29, 2017, 8:26 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated March 29, 2017, 8:26 p.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Stephan Erb <se...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58066/#review170579
-----------------------------------------------------------



LGTM to me in general.


src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java
Lines 33-34 (patched)
<https://reviews.apache.org/r/58066/#comment243436>

    Where would I find this name? Searching the code base for `CONSTRAINT_654B` does not return anything for mre.



src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java
Lines 38-40 (patched)
<https://reviews.apache.org/r/58066/#comment243435>

    Assuming we perform:
    
    * up-grade
    * down-grade
    * up-grade
    
    We could end up with a different constraint name that will not be dropped properly. We should make sure the name is of the constraint is always consistently added during downgrades.



src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java
Lines 89-93 (patched)
<https://reviews.apache.org/r/58066/#comment243437>

    It feeld weird to me that we are checkin for `image` when deciding if we should fill the (from a datastructure perspective) unrelated field `volumes`. 
    
    Would it be incorrect that we always populate the volumes?


- Stephan Erb


On March 30, 2017, 5:26 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated March 30, 2017, 5:26 a.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58066/#review171203
-----------------------------------------------------------


Ship it!




Master (656cf9a) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On April 6, 2017, 1:29 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated April 6, 2017, 1:29 p.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Stephan Erb <se...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58066/#review171202
-----------------------------------------------------------


Ship it!




Ship It!

- Stephan Erb


On April 6, 2017, 3:29 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated April 6, 2017, 3:29 p.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58066/#review171239
-----------------------------------------------------------


Ship it!




Master (656cf9a) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On April 6, 2017, 6:45 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated April 6, 2017, 6:45 p.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58066/
-----------------------------------------------------------

(Updated April 6, 2017, 11:45 a.m.)


Review request for Aurora and Stephan Erb.


Changes
-------

Update e2e


Bugs: AURORA-1914
    https://issues.apache.org/jira/browse/AURORA-1914


Repository: aurora


Description
-------

The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.

This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
  src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
  src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
  src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 


Diff: https://reviews.apache.org/r/58066/diff/3/

Changes: https://reviews.apache.org/r/58066/diff/2-3/


Testing
-------


Thanks,

Zameer Manji


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Zameer Manji <zm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58066/
-----------------------------------------------------------

(Updated April 6, 2017, 6:29 a.m.)


Review request for Aurora and Stephan Erb.


Changes
-------

Remove image check in db layer.


Bugs: AURORA-1914
    https://issues.apache.org/jira/browse/AURORA-1914


Repository: aurora


Description
-------

The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.

This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
  src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
  src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
  src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
  src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
  src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 


Diff: https://reviews.apache.org/r/58066/diff/2/

Changes: https://reviews.apache.org/r/58066/diff/1-2/


Testing
-------


Thanks,

Zameer Manji


Re: Review Request 58066: Fix schema to allow multiple task volumes per task.

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58066/#review170522
-----------------------------------------------------------


Ship it!




Master (3a9aabd) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot retry"

- Aurora ReviewBot


On March 30, 2017, 3:26 a.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58066/
> -----------------------------------------------------------
> 
> (Updated March 30, 2017, 3:26 a.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Bugs: AURORA-1914
>     https://issues.apache.org/jira/browse/AURORA-1914
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The original commit adding this feature added an artifical constraint to the schema that prevented more than one task volume per task. This is because there was a `UNIQUE` constraint between the volumes table and the task config table, preventing a task config from being associated with more than one volume.
> 
> This patch removes that constraint. As a result some of the MyBatis mappers had to change and a new migration was added.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/migration/V010_RemoveUniqueConstraint.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbContainer.java 6a36e276d85de7b463ff92e53f66e736c0823696 
>   src/main/java/org/apache/aurora/scheduler/storage/db/views/DbTaskConfig.java cf65a28c4eb89e8de77734c93b26bc7234b4f927 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/TaskConfigMapper.xml 97f6b80fa02ffb73671cf3c8b2aec32fe93a2030 
>   src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql ff1623acddf2ca2d59b5f987955005fe1e5d2bfd 
>   src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 80be33969d697ab7821eb0ef7cb5f7a7cb9ba61f 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora be43a099109d73b5dc34d8a66d2ca9782e025b0b 
> 
> 
> Diff: https://reviews.apache.org/r/58066/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>