Skip to content

Use docker's new mounts API instead of Binds#1563

Merged
stevvooe merged 1 commit intomoby:masterfrom
cpuguy83:use_docker_mounts_api
Mar 30, 2017
Merged

Use docker's new mounts API instead of Binds#1563
stevvooe merged 1 commit intomoby:masterfrom
cpuguy83:use_docker_mounts_api

Conversation

@cpuguy83
Copy link
Member

Closes #1308 -- though this will be handled in the engine itself instead of the agent/exec interface. Not sure if we also want to check this in the agent.

@cpuguy83 cpuguy83 force-pushed the use_docker_mounts_api branch from 24f863f to c2b9963 Compare September 22, 2016 15:49
@codecov-io
Copy link

codecov-io commented Sep 22, 2016

Codecov Report

Merging #1563 into master will increase coverage by 0.04%.
The diff coverage is 43.18%.

@@            Coverage Diff             @@
##           master    #1563      +/-   ##
==========================================
+ Coverage   54.64%   54.68%   +0.04%     
==========================================
  Files         114      114              
  Lines       19679    19688       +9     
==========================================
+ Hits        10754    10767      +13     
+ Misses       7646     7635      -11     
- Partials     1279     1286       +7

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a733b6f...e0eb0d0. Read the comment docs.

@cpuguy83 cpuguy83 force-pushed the use_docker_mounts_api branch from c2b9963 to 2efe868 Compare September 22, 2016 18:41
}
case enginemount.TypeBind:
t.Logf("expected bind opts: %+v, got: %+v", c.x.BindOptions, mounts[0].BindOptions)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe:

default:
        t.Logf("unknown type %+v", c.x.Type)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type will be in the log call above.
This just makes it so the person running the test can see the actual details of these structs instead of a memory address.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@stevvooe
Copy link
Contributor

LGTM

case api.MountTypeVolume:
mount.Type = enginemount.TypeVolume
default:
panic("cannot convert type %s")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is panicking really the right thing to do here? The spec is user data, so as I understand it we'd be panicing on bad input.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yep, I meant to take that out.

@stevvooe
Copy link
Contributor

@cpuguy83 This still looks fine but should we wait for 1.13 release before merging into swarmkit or did you want to use this as a test bed? I have no opinion either way expect that it is hard to run dev version on mac.

@aluzzardi
Copy link
Member

Friendly ping :)

The train for 1.13 is leaving soon, we have to make a quick decision about this

@stevvooe
Copy link
Contributor

@aluzzardi That is not the issue. The problem is that you won't be able to run swarmkit executor against a 1.12 engine with this change. This isn't production code, so we can merge after 1.13 release.

The equivalent change should make it into docker.

@aaronlehmann
Copy link
Collaborator

What's the status of this PR? 1.13 has come and gone. Do we still want to pursue the changes?

@stevvooe
Copy link
Contributor

@aaronlehmann This is still valid and relevant. Should be even easier to get working now that 1.13 is out.

@cpuguy83 Do you have time to update this?

@cpuguy83 cpuguy83 force-pushed the use_docker_mounts_api branch from 2efe868 to e0eb0d0 Compare March 30, 2017 19:50
@cpuguy83
Copy link
Member Author

Forgot about this thing.

Looks like we'll also be able to move tmpfs over to the new format as well. Can follow up with that.

@cpuguy83
Copy link
Member Author

Rebased.

@stevvooe
Copy link
Contributor

LGTM

@aaronlehmann
Copy link
Collaborator

LGTM

Are there any analagous changes to make in the executor in docker, or is this specific to the dockerapi executor?

@stevvooe
Copy link
Contributor

Are there any analagous changes to make in the executor in docker, or is this specific to the dockerapi executor?

These have already been done. I think the issue with making this change is that the API required 1.13 (or 17.03) or later.

@stevvooe stevvooe merged commit b74ec2b into moby:master Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants