> On Feb. 24, 2015, 10:57 p.m., Timothy Chen wrote:
> > src/docker/docker.cpp, line 791
> > <https://reviews.apache.org/r/31125/diff/2/?file=875320#file875320line791>
> >
> >     This also assumes ID is the first column and the ID is always 10 width, 
> > I thought this patch is going to not expect any column ordering?
> >     
> >     And in fact, I think the easiest is just to do a find_first_of("NAMES") 
> > and then find the end of that column by either finding a non empty or end 
> > of line right?

No at all. The docker ps output has currently the "CONTAINER ID" as its first 
column. Without skipping the very first space, you end up with two columns, 
"CONTAINER" and "ID". That's what I wrote in the comment. 

I am not familiar enough with find_first_of("NAMES") to understand how you 
would use this. Care to elaborate more?


- Henning


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


On Feb. 24, 2015, 10:45 p.m., Henning Schmiedehausen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31125/
> -----------------------------------------------------------
> 
> (Updated Feb. 24, 2015, 10:45 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-2357
>     https://issues.apache.org/jira/browse/MESOS-2357
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Parse the docker ps format correctly (identify the columns by the
> header names), then find the NAMES column for the container names and
> parse container names out.
> 
> This ensures that, when docker adds more columns to the ps output,
> the parsing will not break.
> 
> Also issue the --no-trunc command line option to have the output
> columns not truncated by docker.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.cpp 94f16e701f89367b599f0bd8f44c2f1de21a8e20 
> 
> Diff: https://reviews.apache.org/r/31125/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Henning Schmiedehausen
> 
>

Reply via email to