[PUP-7840] Mount point: file contents under /tasks in modules Created: 2017/08/02  Updated: 2017/09/14  Resolved: 2017/08/23

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 5.2.0

Type: Story Priority: Normal
Reporter: Lizzi Lindboe Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
PUP-7874 Docs for tasks file serving end point Sub-task Closed  
Epic Link: Puppet Server API for Tasks
Team: Organizational Scale
Story Points: 5
Sprint: Org Scale Red Team 2017-08-22, Org Scale Red Team 2017-09-05
Release Notes: New Feature
Release Notes Summary: A new mount point has been added to the file serving endpoints to access task files in modules. The mount point format is `tasks/<module>`, and it is loaded by default.
QA Risk Assessment: Needs Assessment


Allow task file content to be fetched.


  • Will allow access to the raw content of any file within the /tasks subdirectory of a module.
  • Does not allow access to any other files.

There's prior art for this in the file_content mount point for /files and /plugins.

Confirmed with the Direct Change team that we need not worry about the existing issues with these endpoints – namely, that they load entire files into memory. This will be fixed later.

Open questions:

  • Are we going to be required to implement behavior for any other endpoints we don't care about, but are related, like file_metadata?

Comment by Lizzi Lindboe [ 2017/08/02 ]

Again, uncertainty on estimate for this. Possibly 3, but mount points have potential to have a large breadth of scope (5).

Comment by Lizzi Lindboe [ 2017/08/10 ]

Description updated. Still need to confirm a path forward as a team.

Comment by Lizzi Lindboe [ 2017/08/14 ]

Josh Cooper FYI – spoke with the direct change team, and their preference would be to use the existing Ruby mount points. A mostly Clojure implementation has a number of issues/complexity in implementation, and they're okay with the existing risks in Ruby.

Comment by Dan Lidral-Porter [ 2017/08/14 ]

There's a file serving mount "protocol" that's used to serve files from modules. Looks like we'll just need an implementation of it for tasks.

Comment by Lizzi Lindboe [ 2017/08/14 ]

The mount point code is a little confusing; we have some conditionals here that are unclear: https://github.com/puppetlabs/puppet/blob/5b8386ce9edf944ceee8328526dbb9f238c1403a/lib/puppet/file_serving/configuration.rb#L57 and another file that also seems to do some mount point initialization (https://github.com/puppetlabs/puppet/blob/5b8386ce9edf944ceee8328526dbb9f238c1403a/lib/puppet/file_serving/configuration/parser.rb#L91). What's the pattern here?

Comment by Moses Mendoza [ 2017/08/16 ]

merged to puppet/master at https://github.com/puppetlabs/puppet/commit/f1e8e5a2fd867ca625cb24c609de5279fc3cdf97

Comment by Kenn Hussey [ 2017/08/21 ]

Lizzi Lindboe Moses Mendoza if a PR has been merged, should this issue be moved to 'Ready for CI', or is additional information/work required here?

Comment by Dan Lidral-Porter [ 2017/08/22 ]

This is in 'Needs Information' to reflect it being blocked on puppet agent CI problems – the last passing puppet-agent build is from August 11th, before this was merged.

Comment by Lizzi Lindboe [ 2017/08/22 ]

We never discussed pre-docs work for this. As well, I think Puppet Server may need an update to its default tk-auth rules to allow access to this endpoint, unless the endpoint is under /file_content and this rule is sufficient?

Comment by Dan Lidral-Porter [ 2017/08/23 ]

This endpoint is covered by that file_content rule (it's not so much a new endpoint as a new behavior of the file content endpoint), so no new TK-Auth rules are necessary. This was confirmed by Michael Smith during the review.

Comment by Kenn Hussey [ 2017/08/28 ]

Dan Lidral-Porter please add release notes for this issue, if needed.

Comment by Dan Lidral-Porter [ 2017/08/28 ]

Might want to link to the file serving documentation, which has more detail on how paths mount to the tasks files in a module?

Comment by Dan Lidral-Porter [ 2017/08/28 ]

Kenn Hussey so added

Generated at Thu Nov 21 03:30:57 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.