mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 58317: Prevent agent from crashing when the ID is longer than the maximum file name length.
Date Mon, 10 Apr 2017 21:18:51 GMT


> On April 10, 2017, 9:05 p.m., Aaron Wood wrote:
> > src/common/validation.cpp
> > Lines 40 (patched)
> > <https://reviews.apache.org/r/58317/diff/1/?file=1687524#file1687524line40>
> >
> >     Maybe it's better to put this check in `src/slave/paths.cpp` and add up the
length of `rootDir`, `slaveId`, `frameworkId`, `executorId`, and `containerId`? What I have
here doesn't really guard against the entire path being > 255, only individual pieces.
> >     
> >     I could add this check around here:
> >     ```
> >       const string directory =
> >         getExecutorRunPath(rootDir, slaveId, frameworkId, executorId, containerId);
> >     
> >       Try<Nothing> mkdir = os::mkdir(directory);
> >     ```
> >     
> >     Thoughts?

The path is allowed to be > 255 (typically 4K on Linux).


- James


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


On April 10, 2017, 6:16 p.m., Aaron Wood wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58317/
> -----------------------------------------------------------
> 
> (Updated April 10, 2017, 6:16 p.m.)
> 
> 
> Review request for mesos, Jie Yu and James Peach.
> 
> 
> Bugs: MESOS-7346
>     https://issues.apache.org/jira/browse/MESOS-7346
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When launching a task with a very long name `mkdir` will fail and crash the agent, making
it quick and easy to remotely crash any agent(s). This changes makes sure that we never exceed
the default file name limit of most of the file systems out there. If the limit is exceed
a `TASK_ERROR` is instead sent back to the client.
> 
> 
> Diffs
> -----
> 
>   src/common/validation.cpp 544d3a0bf 
> 
> 
> Diff: https://reviews.apache.org/r/58317/diff/1/
> 
> 
> Testing
> -------
> 
> Built Mesos, ran 1 master and 1 agent locally, and launched a task with a name > 255
characters through our own custom framework.
> 
> ```
> I0410 14:04:15.761109 28528 master.cpp:6323] Sending status update TASK_ERROR for task
tesijetjijwtjwitjweitjweitjwitjweitjtijeiojwetoijetweoijwilgjwkdgsjskd.nlskdgnldksnglsdkgndslgjdslgjsdlgjldskgjsdlkgjslkgjslkdgjsdlkgjskldgjweiojgoeiwgjweoigjewoitjweoitjewiotjewitjweitjewitjwewejiowejiewtiwethewothweuothewouthuthwouthwuothgwuoghwouhweouthewhtiewtwetwhtohwethwetwehtwehtwjethwejlthwejlthwejhtwejthwejkthwejkthwejkthwejthwkthwekthwtkjwthkwjehtjkwehtkjwehtkjwehtkjwehtkwejhtewjkthewkjthewjkthwekjthwekjthwekjthwekjthwekjhtwekhtewkapplication227741021670-4A491BFF-F50D-4F17-B304-AD23423F15EE
of framework 9e8d9439-7ed2-4968-a8cb-f46273c2d9af-0000 'ID must not be greater than 255 characters'
> ```
> 
> 
> Thanks,
> 
> Aaron Wood
> 
>


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