Skip to content

add exec option to tmpfs#2647

Merged
dperny merged 1 commit intomoby:masterfrom
adshmh:add-exec-option-to-tmpfs
Nov 5, 2018
Merged

add exec option to tmpfs#2647
dperny merged 1 commit intomoby:masterfrom
adshmh:add-exec-option-to-tmpfs

Conversation

@adshmh
Copy link
Copy Markdown
Contributor

@adshmh adshmh commented May 24, 2018

Added exec option to tmpfs mounts, part of work on moby PR to add exec option to tmpfs mounts
Signed-off-by: Arash Deshmeh adeshmeh@ca.ibm.com

- What I did
Added exec/noexec option to Tmpfs

- How I did it
Modified the API and the agent/exec/dockerapi package. Also added the corresponding unit tests. Also added the exec/noexec option to flagparser.

- How to test it

- Description for the changelog
Added exec option to tmpfs mounts

@adshmh adshmh changed the title added exec option to tmpfs add exec option to tmpfs May 24, 2018
@thaJeztah
Copy link
Copy Markdown
Member

ping @anshulpundir @dperny PTAL; this is related to a PR in moby; moby/moby#36720

@thaJeztah
Copy link
Copy Markdown
Member

/cc @cpuguy83 @kolyshkin

@dperny
Copy link
Copy Markdown
Collaborator

dperny commented Jun 7, 2018

I'd rather not see a raw_options field in the proto message. I commented on the moby PR this same thing, but it's even more important in swarmkit, I think, to have all of the options structured. I find that when we store data as unstructured strings or maps, we tend to regret it later. I'd rather see it as a boolean.

// allow execution of binaries from the tmpfs
bool exec = 3;

@thaJeztah
Copy link
Copy Markdown
Member

@dperny see moby/moby#36720 (comment) - is this a blocker for you?

@dperny
Copy link
Copy Markdown
Collaborator

dperny commented Oct 11, 2018

@thaJeztah Nah, it's not a blocker.

@adshmh Let's rebase, rebuild protos, and I'll give it one last once-over before we ship.

@thaJeztah
Copy link
Copy Markdown
Member

ping @adshmh could you rebase this PR so that we can move it forward? 🤗

@adshmh adshmh force-pushed the add-exec-option-to-tmpfs branch from cee19f5 to 4e9e450 Compare October 25, 2018 19:33
@adshmh
Copy link
Copy Markdown
Contributor Author

adshmh commented Oct 25, 2018

Sorry for the delay. Rebased.

@thaJeztah
Copy link
Copy Markdown
Member

Whoops; looks like there's an issue with the vendor directory; there's no change in vendor.conf here, but you pulled in a modified file in moby/moby;

diff -r vendor/github.com/docker/docker/api/types/mount/mount.go .vendor.bak/github.com/docker/docker/api/types/mount/mount.go
111a112,114
> 	// Raw options passed to tmpfs mount
> 	RawOptions string `json:",omitempty"`
> 
+ inconsistent dependencies! what you have in vendor.conf does not match with what you have in vendor
make: *** [dep-validate] Error 1
Exited with code 2

@adshmh adshmh force-pushed the add-exec-option-to-tmpfs branch from 4e9e450 to 67741d8 Compare October 25, 2018 20:21
@adshmh
Copy link
Copy Markdown
Contributor Author

adshmh commented Oct 25, 2018

Thanks for the review. Fixed (The modified file from moby/moby was not needed, as conversion will be done on moby/moby not swarmkit).

Latest build failure is from a timeout in running unit tests which does not happen in my local test environment.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 25, 2018

Codecov Report

Merging #2647 into master will increase coverage by 0.1%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #2647     +/-   ##
=========================================
+ Coverage   61.87%   61.97%   +0.1%     
=========================================
  Files         136      136             
  Lines       21926    21933      +7     
=========================================
+ Hits        13566    13594     +28     
+ Misses       6896     6874     -22     
- Partials     1464     1465      +1

Comment thread api/api.pb.txt
}
}
}
message_type {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wondering why these changes are here; this could be if you're using a different version of protobuf (see #2503), could you check what version you're using to regenerate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you. Fixed. Seems the build uses protoc 3.6.1 now (on both containerized builds and CircleCI).

Perhaps the BUILDING.md file needs an update, as it refers to 3.x or higher versions of protoc:

https://github.com/docker/swarmkit/blob/master/BUILDING.md#regenerating-protobuf-bindings

I think a link to the option of building in a container, showing up at the top of the BUILDING.md, could be useful as well (I can submit a PR for that if it sounds like a good idea)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, yes, that would be a good thing to do. I also think that @dperny was working on a containerised version a while back (so that the version could be "pinned" in that container)

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
@adshmh adshmh force-pushed the add-exec-option-to-tmpfs branch from 67741d8 to 0c73108 Compare October 26, 2018 16:10
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@thaJeztah
Copy link
Copy Markdown
Member

ping @dperny @anshulpundir PTAL

@denismakogon
Copy link
Copy Markdown

Hi! Are there any estimates on when this is going to be merged? Since moby/moby#36720 heavily depends on this PR. Would be nice to get this merged as soon as possible. Thanks.

@dperny dperny merged commit bc032e2 into moby:master Nov 5, 2018
@denismakogon
Copy link
Copy Markdown

@dperny thank you.

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.

4 participants