[jira] [Created] (MESOS-6105) Introduce helper functions in `stout` to read pipes till we hit EOF

2016-08-29 Thread Avinash Sridharan (JIRA)
Avinash Sridharan created MESOS-6105:


 Summary: Introduce helper functions in `stout` to read pipes till 
we hit EOF
 Key: MESOS-6105
 URL: https://issues.apache.org/jira/browse/MESOS-6105
 Project: Mesos
  Issue Type: Improvement
  Components: general
 Environment: Linux
Reporter: Avinash Sridharan
Assignee: Avinash Sridharan
Priority: Minor


Currently, `stout` doesn't support reading from
 a file descriptor till it finds an EOF. Such a functionality would be useful 
for cases such as reading from STDIN, where the assumption is to read a limited 
number of bytes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MESOS-6104) Potential FD double close in libevent's implementation of `sendfile`.

2016-08-29 Thread Joseph Wu (JIRA)

[ 
https://issues.apache.org/jira/browse/MESOS-6104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15447617#comment-15447617
 ] 

Joseph Wu commented on MESOS-6104:
--

Note: Versions before 1.0.1 will not CHECK fail, as that CHECK was recently 
added.  The potential for double-close (and resulting undefined behavior) still 
exists though.

> Potential FD double close in libevent's implementation of `sendfile`.
> -
>
> Key: MESOS-6104
> URL: https://issues.apache.org/jira/browse/MESOS-6104
> Project: Mesos
>  Issue Type: Bug
>  Components: webui
>Affects Versions: 0.27.3, 0.28.2, 1.0.1
>Reporter: Joseph Wu
>Assignee: Joseph Wu
>Priority: Critical
>  Labels: mesosphere, ssl
>
> Repro copied from: https://reviews.apache.org/r/51509/
> It is possible to make the master CHECK fail by repeatedly hitting the web UI 
> and reloading the static assets:
> 1) Paste lots of text (16KB or more) of text into 
> `src/webui/master/static/home.html`.  The more text, the more reliable the 
> repro.
> 2) Start the master with SSL enabled:
> {code}
> LIBPROCESS_SSL_ENABLED=true LIBPROCESS_SSL_KEY_FILE=key.pem 
> LIBPROCESS_SSL_CERT_FILE=cert.pem bin/mesos-master.sh --work_dir=/tmp/master
> {code}
> 3) Run two instances of this python script repeatedly:
> {code}
> import socket
> import ssl
> s = ssl.wrap_socket(socket.socket())
> s.connect(("localhost", 5050))
> s.sendall("""GET /static/home.html HTTP/1.1
> User-Agent: foobar
> Host: localhost:5050
> Accept: */*
> Connection: Keep-Alive
> """)
> # The HTTP part of the response
> print s.recv(1000)
> {code}
> i.e. 
> {code}
> while python test.py; do :; done & while python test.py; do :; done
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MESOS-6104) Potential FD double close in libevent's implementation of `sendfile`.

2016-08-29 Thread Joseph Wu (JIRA)

 [ 
https://issues.apache.org/jira/browse/MESOS-6104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joseph Wu updated MESOS-6104:
-
Affects Version/s: 0.27.3
   0.28.2

> Potential FD double close in libevent's implementation of `sendfile`.
> -
>
> Key: MESOS-6104
> URL: https://issues.apache.org/jira/browse/MESOS-6104
> Project: Mesos
>  Issue Type: Bug
>  Components: webui
>Affects Versions: 0.27.3, 0.28.2, 1.0.1
>Reporter: Joseph Wu
>Assignee: Joseph Wu
>Priority: Critical
>  Labels: mesosphere, ssl
>
> Repro copied from: https://reviews.apache.org/r/51509/
> It is possible to make the master CHECK fail by repeatedly hitting the web UI 
> and reloading the static assets:
> 1) Paste lots of text (16KB or more) of text into 
> `src/webui/master/static/home.html`.  The more text, the more reliable the 
> repro.
> 2) Start the master with SSL enabled:
> {code}
> LIBPROCESS_SSL_ENABLED=true LIBPROCESS_SSL_KEY_FILE=key.pem 
> LIBPROCESS_SSL_CERT_FILE=cert.pem bin/mesos-master.sh --work_dir=/tmp/master
> {code}
> 3) Run two instances of this python script repeatedly:
> {code}
> import socket
> import ssl
> s = ssl.wrap_socket(socket.socket())
> s.connect(("localhost", 5050))
> s.sendall("""GET /static/home.html HTTP/1.1
> User-Agent: foobar
> Host: localhost:5050
> Accept: */*
> Connection: Keep-Alive
> """)
> # The HTTP part of the response
> print s.recv(1000)
> {code}
> i.e. 
> {code}
> while python test.py; do :; done & while python test.py; do :; done
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MESOS-6104) Potential FD double close in libevent's implementation of `sendfile`.

2016-08-29 Thread Joseph Wu (JIRA)

[ 
https://issues.apache.org/jira/browse/MESOS-6104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15447609#comment-15447609
 ] 

Joseph Wu commented on MESOS-6104:
--

Added some fail-fast code here: https://reviews.apache.org/r/51511/

> Potential FD double close in libevent's implementation of `sendfile`.
> -
>
> Key: MESOS-6104
> URL: https://issues.apache.org/jira/browse/MESOS-6104
> Project: Mesos
>  Issue Type: Bug
>  Components: webui
>Affects Versions: 1.0.1
>Reporter: Joseph Wu
>Assignee: Joseph Wu
>Priority: Critical
>  Labels: mesosphere, ssl
>
> Repro copied from: https://reviews.apache.org/r/51509/
> It is possible to make the master CHECK fail by repeatedly hitting the web UI 
> and reloading the static assets:
> 1) Paste lots of text (16KB or more) of text into 
> `src/webui/master/static/home.html`.  The more text, the more reliable the 
> repro.
> 2) Start the master with SSL enabled:
> {code}
> LIBPROCESS_SSL_ENABLED=true LIBPROCESS_SSL_KEY_FILE=key.pem 
> LIBPROCESS_SSL_CERT_FILE=cert.pem bin/mesos-master.sh --work_dir=/tmp/master
> {code}
> 3) Run two instances of this python script repeatedly:
> {code}
> import socket
> import ssl
> s = ssl.wrap_socket(socket.socket())
> s.connect(("localhost", 5050))
> s.sendall("""GET /static/home.html HTTP/1.1
> User-Agent: foobar
> Host: localhost:5050
> Accept: */*
> Connection: Keep-Alive
> """)
> # The HTTP part of the response
> print s.recv(1000)
> {code}
> i.e. 
> {code}
> while python test.py; do :; done & while python test.py; do :; done
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (MESOS-6104) Potential FD double close in libevent's implementation of `sendfile`.

2016-08-29 Thread Joseph Wu (JIRA)
Joseph Wu created MESOS-6104:


 Summary: Potential FD double close in libevent's implementation of 
`sendfile`.
 Key: MESOS-6104
 URL: https://issues.apache.org/jira/browse/MESOS-6104
 Project: Mesos
  Issue Type: Bug
  Components: webui
Affects Versions: 1.0.1
Reporter: Joseph Wu
Assignee: Joseph Wu
Priority: Critical


Repro copied from: https://reviews.apache.org/r/51509/

It is possible to make the master CHECK fail by repeatedly hitting the web UI 
and reloading the static assets:

1) Paste lots of text (16KB or more) of text into 
`src/webui/master/static/home.html`.  The more text, the more reliable the 
repro.

2) Start the master with SSL enabled:
{code}
LIBPROCESS_SSL_ENABLED=true LIBPROCESS_SSL_KEY_FILE=key.pem 
LIBPROCESS_SSL_CERT_FILE=cert.pem bin/mesos-master.sh --work_dir=/tmp/master
{code}

3) Run two instances of this python script repeatedly:
{code}
import socket
import ssl

s = ssl.wrap_socket(socket.socket())
s.connect(("localhost", 5050))

s.sendall("""GET /static/home.html HTTP/1.1
User-Agent: foobar
Host: localhost:5050
Accept: */*
Connection: Keep-Alive

""")

# The HTTP part of the response
print s.recv(1000)
{code}

i.e. 
{code}
while python test.py; do :; done & while python test.py; do :; done
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (MESOS-6103) Mesos version is not uptodate in getting-started page.

2016-08-29 Thread Shameera Rathnayaka (JIRA)
Shameera Rathnayaka created MESOS-6103:
--

 Summary: Mesos version is not uptodate in getting-started page. 
 Key: MESOS-6103
 URL: https://issues.apache.org/jira/browse/MESOS-6103
 Project: Mesos
  Issue Type: Documentation
  Components: documentation
Affects Versions: 1.0.1
Reporter: Shameera Rathnayaka
 Fix For: 1.0.2


In getting-started page http://mesos.apache.org/gettingstarted/ recommend to 
download mesos-0.28.0 , it should be 1.0.1 which is latest stable release. 
There is no mesos-agent.sh in 0.28.0 version instead it has mesos-slave.sh. 
Example section says to run ./bin/mesos-agent.sh which is new in latest 
releases.

1. Download the latest stable release from Apache (Recommended)
$ wget http://www.apache.org/dist/mesos/0.28.2/mesos-0.28.2.tar.gz
$ tar -zxf mesos-0.28.2.tar.gz


# Start mesos agent (Ensure work directory exists and has proper permissions).
$ ./bin/mesos-agent.sh --master=127.0.0.1:5050 --work_dir=/var/lib/mesos




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MESOS-6080) Expose metrics in scheduler library.

2016-08-29 Thread Abhishek Dasgupta (JIRA)

[ 
https://issues.apache.org/jira/browse/MESOS-6080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15446807#comment-15446807
 ] 

Abhishek Dasgupta commented on MESOS-6080:
--

RR: https://reviews.apache.org/r/51501/

> Expose metrics in scheduler library.
> 
>
> Key: MESOS-6080
> URL: https://issues.apache.org/jira/browse/MESOS-6080
> Project: Mesos
>  Issue Type: Improvement
>Reporter: Abhishek Dasgupta
>Assignee: Abhishek Dasgupta
>
> We are collecting metrics for scheduler 
> driver(https://github.com/apache/mesos/blob/master/src/sched/sched.cpp#L207) 
> but currently there is no way to expose metrics in scheduler 
> library(https://github.com/apache/mesos/blob/master/src/scheduler/scheduler.cpp).
>  So we need to expose metrics in scheduler library as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MESOS-355) Python 3.x support for C extensions

2016-08-29 Thread Matthew Rocklin (JIRA)

[ 
https://issues.apache.org/jira/browse/MESOS-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15446680#comment-15446680
 ] 

Matthew Rocklin commented on MESOS-355:
---

For what it's worth, many of the data-oriented Python library developers have 
switched to Python 3.  

It would be nice to see the priority of this issue bumped up above "trivial".

> Python 3.x support for C extensions
> ---
>
> Key: MESOS-355
> URL: https://issues.apache.org/jira/browse/MESOS-355
> Project: Mesos
>  Issue Type: Improvement
>  Components: python api
>Reporter: brian wickman
>Priority: Trivial
>
> Should be a minor change to compile against the 3.x C API, and with some 
> prodigious #ifdefs should be 2.x/3.x happy:
> http://docs.python.org/3.0/howto/cporting.html#cporting-howto



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MESOS-6098) Frameworks UI shows metrics for used resources plus offers

2016-08-29 Thread Miguel Bernadin (JIRA)

 [ 
https://issues.apache.org/jira/browse/MESOS-6098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Miguel Bernadin updated MESOS-6098:
---
Assignee: Joseph Wu  (was: Miguel Bernadin)

> Frameworks UI shows metrics for used resources plus offers
> --
>
> Key: MESOS-6098
> URL: https://issues.apache.org/jira/browse/MESOS-6098
> Project: Mesos
>  Issue Type: Improvement
>  Components: webui
>Affects Versions: 1.0.1
>Reporter: Miguel Bernadin
>Assignee: Joseph Wu
>Priority: Minor
>
> When a framework is receiving many offers and it is denying them, the 
> frameworks UI will show the metrics fluctuating for mem, cpu, gpu, and disk. 
> From a mesos perspective, those offers are given to the framework until the 
> framework declines them, so depending on the time the mesos UI gets updated, 
> its has combined all the used resources and offers (that have not been 
> accepted) to the framework and is reflected on the framework UI. If a 
> framework does not implement suppressiveOffers(), it will continue to deny 
> offers from mesos, which leads to the sporadic changes of metrics on the 
> framework UI. 
> From the operator's perspective, the user would expect to see used resources 
> consumed by the framework. Any offered resources can be viewed instead by 
> Mesos's Offers tab.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MESOS-6101) Add event for Framwork added to master operator API

2016-08-29 Thread Anand Mazumdar (JIRA)

 [ 
https://issues.apache.org/jira/browse/MESOS-6101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anand Mazumdar updated MESOS-6101:
--
Summary: Add event for Framwork added to master operator API  (was: Add 
event for FramworkInfo added to master operator API)

> Add event for Framwork added to master operator API
> ---
>
> Key: MESOS-6101
> URL: https://issues.apache.org/jira/browse/MESOS-6101
> Project: Mesos
>  Issue Type: Task
>Reporter: Zhitao Li
>
> Consider the following case:
> 1) a subscriber connects to master;
> 2) a new scheduler registered as a new framework;
> 3) a task is launched from this framework.
> In this sequence, subscriber does not have a way to know the FrameworkInfo 
> belonging to the FrameworkId.
> We should support an event (e.g. when framework info in master is 
> added/changed).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (MESOS-6102) Add event for agent added in master operator API

2016-08-29 Thread Zhitao Li (JIRA)
Zhitao Li created MESOS-6102:


 Summary: Add event for agent added in master operator API
 Key: MESOS-6102
 URL: https://issues.apache.org/jira/browse/MESOS-6102
 Project: Mesos
  Issue Type: Task
Reporter: Zhitao Li


Similar to MESOS-6101, we should support sending some event when `AgentInfo` is 
added to an AgentID so subscriber can get this information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MESOS-6101) Add event for FramworkInfo added to master operator API

2016-08-29 Thread Zhitao Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/MESOS-6101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhitao Li updated MESOS-6101:
-
Summary: Add event for FramworkInfo added to master operator API  (was: Add 
event for FramworkInfo added)

> Add event for FramworkInfo added to master operator API
> ---
>
> Key: MESOS-6101
> URL: https://issues.apache.org/jira/browse/MESOS-6101
> Project: Mesos
>  Issue Type: Task
>Reporter: Zhitao Li
>
> Consider the following case:
> 1) a subscriber connects to master;
> 2) a new scheduler registered as a new framework;
> 3) a task is launched from this framework.
> In this sequence, subscriber does not have a way to know the FrameworkInfo 
> belonging to the FrameworkId.
> We should support an event (e.g. when framework info in master is 
> added/changed).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (MESOS-6101) Add event for FramworkInfo added

2016-08-29 Thread Zhitao Li (JIRA)
Zhitao Li created MESOS-6101:


 Summary: Add event for FramworkInfo added
 Key: MESOS-6101
 URL: https://issues.apache.org/jira/browse/MESOS-6101
 Project: Mesos
  Issue Type: Task
Reporter: Zhitao Li


Consider the following case:
1) a subscriber connects to master;
2) a new scheduler registered as a new framework;
3) a task is launched from this framework.

In this sequence, subscriber does not have a way to know the FrameworkInfo 
belonging to the FrameworkId.

We should support an event (e.g. when framework info in master is 
added/changed).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (MESOS-6100) Make fails compiling 1.0.1

2016-08-29 Thread Gennady Feldman (JIRA)
Gennady Feldman created MESOS-6100:
--

 Summary: Make fails compiling 1.0.1 
 Key: MESOS-6100
 URL: https://issues.apache.org/jira/browse/MESOS-6100
 Project: Mesos
  Issue Type: Bug
Affects Versions: 1.0.1
 Environment: Alpine Linux  (Edge)
GCC 6.1.1
Reporter: Gennady Feldman


linux/fs.cpp: In static member function 'static 
Try 
mesos::internal::fs::MountInfoTable::read(const Option&, bool)':
linux/fs.cpp:152:27: error: 'rootParentId' may be used uninitialized in this 
function [-Werror=maybe-uninitialized]
 sortFrom(rootParentId);
   ^
cc1plus: all warnings being treated as errors

P.S. This is something new since I am able to compile 1.0.0 just fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)