You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/03/10 20:05:07 UTC
mesos git commit: Add 'name' field into NetworkInfo.
Repository: mesos
Updated Branches:
refs/heads/master 57a574fc9 -> 2a436e02f
Add 'name' field into NetworkInfo.
Review: https://reviews.apache.org/r/44004/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2a436e02
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2a436e02
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2a436e02
Branch: refs/heads/master
Commit: 2a436e02f7f475e2d7264c6a4b58dd557bfec883
Parents: 57a574f
Author: Qian Zhang <zh...@cn.ibm.com>
Authored: Thu Mar 10 11:04:59 2016 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Thu Mar 10 11:04:59 2016 -0800
----------------------------------------------------------------------
include/mesos/mesos.proto | 5 +++++
include/mesos/v1/mesos.proto | 5 +++++
src/common/http.cpp | 8 ++++++++
3 files changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 3d22ec3..56d456a 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -1581,6 +1581,11 @@ message NetworkInfo {
// this field is filled in automatically with the Agent IP address.
repeated IPAddress ip_addresses = 5;
+ // Name of the network which will be used by network isolator to determine
+ // the network that the container joins. It's up to the network isolator
+ // to decide how to interpret this field.
+ optional string name = 6;
+
// Specify IP address requirement. Set protocol to the desired value to
// request the network isolator on the Agent to assign an IP address to the
// container being launched. If a specific IP address is specified in
http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 31960a5..4fba774 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -1578,6 +1578,11 @@ message NetworkInfo {
// this field is filled in automatically with the Agent IP address.
repeated IPAddress ip_addresses = 5;
+ // Name of the network which will be used by network isolator to determine
+ // the network that the container joins. It's up to the network isolator
+ // to decide how to interpret this field.
+ optional string name = 6;
+
// Specify IP address requirement. Set protocol to the desired value to
// request the network isolator on the Agent to assign an IP address to the
// container being launched. If a specific IP address is specified in
http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/src/common/http.cpp
----------------------------------------------------------------------
diff --git a/src/common/http.cpp b/src/common/http.cpp
index be8538f..3e92979 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -203,6 +203,10 @@ JSON::Object model(const NetworkInfo& info)
object.values["ip_addresses"] = std::move(array);
}
+ if (info.has_name()) {
+ object.values["name"] = info.name();
+ }
+
return object;
}
@@ -528,6 +532,10 @@ void json(JSON::ObjectWriter* writer, const NetworkInfo& info)
}
});
}
+
+ if (info.has_name()) {
+ writer->field("name", info.name());
+ }
}
Re: mesos git commit: Add 'name' field into NetworkInfo.
Posted by Qian Zhang <zh...@gmail.com>.
Done, please review, thanks Neil and Jie.
https://reviews.apache.org/r/44696/
Thanks,
Qian Zhang
On Fri, Mar 11, 2016 at 3:13 AM, Jie Yu <yu...@gmail.com> wrote:
> Good catch.
>
> + Qian, could you please send a patch for that? Thanks!
>
> - Jie
>
> On Thu, Mar 10, 2016 at 11:08 AM, Neil Conway <ne...@gmail.com>
> wrote:
>
> > Should we also update docs/networking-for-mesos-managed-containers.md?
> > It contains a version of the NetworkInfo message definition.
> >
> > Neil
> >
> > On Thu, Mar 10, 2016 at 11:05 AM, <ji...@apache.org> wrote:
> > > Repository: mesos
> > > Updated Branches:
> > > refs/heads/master 57a574fc9 -> 2a436e02f
> > >
> > >
> > > Add 'name' field into NetworkInfo.
> > >
> > > Review: https://reviews.apache.org/r/44004/
> > >
> > >
> > > Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
> > > Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2a436e02
> > > Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2a436e02
> > > Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2a436e02
> > >
> > > Branch: refs/heads/master
> > > Commit: 2a436e02f7f475e2d7264c6a4b58dd557bfec883
> > > Parents: 57a574f
> > > Author: Qian Zhang <zh...@cn.ibm.com>
> > > Authored: Thu Mar 10 11:04:59 2016 -0800
> > > Committer: Jie Yu <yu...@gmail.com>
> > > Committed: Thu Mar 10 11:04:59 2016 -0800
> > >
> > > ----------------------------------------------------------------------
> > > include/mesos/mesos.proto | 5 +++++
> > > include/mesos/v1/mesos.proto | 5 +++++
> > > src/common/http.cpp | 8 ++++++++
> > > 3 files changed, 18 insertions(+)
> > > ----------------------------------------------------------------------
> > >
> > >
> > >
> >
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/mesos.proto
> > > ----------------------------------------------------------------------
> > > diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
> > > index 3d22ec3..56d456a 100644
> > > --- a/include/mesos/mesos.proto
> > > +++ b/include/mesos/mesos.proto
> > > @@ -1581,6 +1581,11 @@ message NetworkInfo {
> > > // this field is filled in automatically with the Agent IP address.
> > > repeated IPAddress ip_addresses = 5;
> > >
> > > + // Name of the network which will be used by network isolator to
> > determine
> > > + // the network that the container joins. It's up to the network
> > isolator
> > > + // to decide how to interpret this field.
> > > + optional string name = 6;
> > > +
> > > // Specify IP address requirement. Set protocol to the desired value
> > to
> > > // request the network isolator on the Agent to assign an IP address
> > to the
> > > // container being launched. If a specific IP address is specified
> in
> > >
> > >
> >
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/v1/mesos.proto
> > > ----------------------------------------------------------------------
> > > diff --git a/include/mesos/v1/mesos.proto
> b/include/mesos/v1/mesos.proto
> > > index 31960a5..4fba774 100644
> > > --- a/include/mesos/v1/mesos.proto
> > > +++ b/include/mesos/v1/mesos.proto
> > > @@ -1578,6 +1578,11 @@ message NetworkInfo {
> > > // this field is filled in automatically with the Agent IP address.
> > > repeated IPAddress ip_addresses = 5;
> > >
> > > + // Name of the network which will be used by network isolator to
> > determine
> > > + // the network that the container joins. It's up to the network
> > isolator
> > > + // to decide how to interpret this field.
> > > + optional string name = 6;
> > > +
> > > // Specify IP address requirement. Set protocol to the desired value
> > to
> > > // request the network isolator on the Agent to assign an IP address
> > to the
> > > // container being launched. If a specific IP address is specified
> in
> > >
> > >
> >
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/src/common/http.cpp
> > > ----------------------------------------------------------------------
> > > diff --git a/src/common/http.cpp b/src/common/http.cpp
> > > index be8538f..3e92979 100644
> > > --- a/src/common/http.cpp
> > > +++ b/src/common/http.cpp
> > > @@ -203,6 +203,10 @@ JSON::Object model(const NetworkInfo& info)
> > > object.values["ip_addresses"] = std::move(array);
> > > }
> > >
> > > + if (info.has_name()) {
> > > + object.values["name"] = info.name();
> > > + }
> > > +
> > > return object;
> > > }
> > >
> > > @@ -528,6 +532,10 @@ void json(JSON::ObjectWriter* writer, const
> > NetworkInfo& info)
> > > }
> > > });
> > > }
> > > +
> > > + if (info.has_name()) {
> > > + writer->field("name", info.name());
> > > + }
> > > }
> > >
> > >
> > >
> >
>
Re: mesos git commit: Add 'name' field into NetworkInfo.
Posted by Jie Yu <yu...@gmail.com>.
Good catch.
+ Qian, could you please send a patch for that? Thanks!
- Jie
On Thu, Mar 10, 2016 at 11:08 AM, Neil Conway <ne...@gmail.com> wrote:
> Should we also update docs/networking-for-mesos-managed-containers.md?
> It contains a version of the NetworkInfo message definition.
>
> Neil
>
> On Thu, Mar 10, 2016 at 11:05 AM, <ji...@apache.org> wrote:
> > Repository: mesos
> > Updated Branches:
> > refs/heads/master 57a574fc9 -> 2a436e02f
> >
> >
> > Add 'name' field into NetworkInfo.
> >
> > Review: https://reviews.apache.org/r/44004/
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
> > Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2a436e02
> > Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2a436e02
> > Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2a436e02
> >
> > Branch: refs/heads/master
> > Commit: 2a436e02f7f475e2d7264c6a4b58dd557bfec883
> > Parents: 57a574f
> > Author: Qian Zhang <zh...@cn.ibm.com>
> > Authored: Thu Mar 10 11:04:59 2016 -0800
> > Committer: Jie Yu <yu...@gmail.com>
> > Committed: Thu Mar 10 11:04:59 2016 -0800
> >
> > ----------------------------------------------------------------------
> > include/mesos/mesos.proto | 5 +++++
> > include/mesos/v1/mesos.proto | 5 +++++
> > src/common/http.cpp | 8 ++++++++
> > 3 files changed, 18 insertions(+)
> > ----------------------------------------------------------------------
> >
> >
> >
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/mesos.proto
> > ----------------------------------------------------------------------
> > diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
> > index 3d22ec3..56d456a 100644
> > --- a/include/mesos/mesos.proto
> > +++ b/include/mesos/mesos.proto
> > @@ -1581,6 +1581,11 @@ message NetworkInfo {
> > // this field is filled in automatically with the Agent IP address.
> > repeated IPAddress ip_addresses = 5;
> >
> > + // Name of the network which will be used by network isolator to
> determine
> > + // the network that the container joins. It's up to the network
> isolator
> > + // to decide how to interpret this field.
> > + optional string name = 6;
> > +
> > // Specify IP address requirement. Set protocol to the desired value
> to
> > // request the network isolator on the Agent to assign an IP address
> to the
> > // container being launched. If a specific IP address is specified in
> >
> >
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/v1/mesos.proto
> > ----------------------------------------------------------------------
> > diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
> > index 31960a5..4fba774 100644
> > --- a/include/mesos/v1/mesos.proto
> > +++ b/include/mesos/v1/mesos.proto
> > @@ -1578,6 +1578,11 @@ message NetworkInfo {
> > // this field is filled in automatically with the Agent IP address.
> > repeated IPAddress ip_addresses = 5;
> >
> > + // Name of the network which will be used by network isolator to
> determine
> > + // the network that the container joins. It's up to the network
> isolator
> > + // to decide how to interpret this field.
> > + optional string name = 6;
> > +
> > // Specify IP address requirement. Set protocol to the desired value
> to
> > // request the network isolator on the Agent to assign an IP address
> to the
> > // container being launched. If a specific IP address is specified in
> >
> >
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/src/common/http.cpp
> > ----------------------------------------------------------------------
> > diff --git a/src/common/http.cpp b/src/common/http.cpp
> > index be8538f..3e92979 100644
> > --- a/src/common/http.cpp
> > +++ b/src/common/http.cpp
> > @@ -203,6 +203,10 @@ JSON::Object model(const NetworkInfo& info)
> > object.values["ip_addresses"] = std::move(array);
> > }
> >
> > + if (info.has_name()) {
> > + object.values["name"] = info.name();
> > + }
> > +
> > return object;
> > }
> >
> > @@ -528,6 +532,10 @@ void json(JSON::ObjectWriter* writer, const
> NetworkInfo& info)
> > }
> > });
> > }
> > +
> > + if (info.has_name()) {
> > + writer->field("name", info.name());
> > + }
> > }
> >
> >
> >
>
Re: mesos git commit: Add 'name' field into NetworkInfo.
Posted by Neil Conway <ne...@gmail.com>.
Should we also update docs/networking-for-mesos-managed-containers.md?
It contains a version of the NetworkInfo message definition.
Neil
On Thu, Mar 10, 2016 at 11:05 AM, <ji...@apache.org> wrote:
> Repository: mesos
> Updated Branches:
> refs/heads/master 57a574fc9 -> 2a436e02f
>
>
> Add 'name' field into NetworkInfo.
>
> Review: https://reviews.apache.org/r/44004/
>
>
> Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
> Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2a436e02
> Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2a436e02
> Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2a436e02
>
> Branch: refs/heads/master
> Commit: 2a436e02f7f475e2d7264c6a4b58dd557bfec883
> Parents: 57a574f
> Author: Qian Zhang <zh...@cn.ibm.com>
> Authored: Thu Mar 10 11:04:59 2016 -0800
> Committer: Jie Yu <yu...@gmail.com>
> Committed: Thu Mar 10 11:04:59 2016 -0800
>
> ----------------------------------------------------------------------
> include/mesos/mesos.proto | 5 +++++
> include/mesos/v1/mesos.proto | 5 +++++
> src/common/http.cpp | 8 ++++++++
> 3 files changed, 18 insertions(+)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/mesos.proto
> ----------------------------------------------------------------------
> diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
> index 3d22ec3..56d456a 100644
> --- a/include/mesos/mesos.proto
> +++ b/include/mesos/mesos.proto
> @@ -1581,6 +1581,11 @@ message NetworkInfo {
> // this field is filled in automatically with the Agent IP address.
> repeated IPAddress ip_addresses = 5;
>
> + // Name of the network which will be used by network isolator to determine
> + // the network that the container joins. It's up to the network isolator
> + // to decide how to interpret this field.
> + optional string name = 6;
> +
> // Specify IP address requirement. Set protocol to the desired value to
> // request the network isolator on the Agent to assign an IP address to the
> // container being launched. If a specific IP address is specified in
>
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/include/mesos/v1/mesos.proto
> ----------------------------------------------------------------------
> diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
> index 31960a5..4fba774 100644
> --- a/include/mesos/v1/mesos.proto
> +++ b/include/mesos/v1/mesos.proto
> @@ -1578,6 +1578,11 @@ message NetworkInfo {
> // this field is filled in automatically with the Agent IP address.
> repeated IPAddress ip_addresses = 5;
>
> + // Name of the network which will be used by network isolator to determine
> + // the network that the container joins. It's up to the network isolator
> + // to decide how to interpret this field.
> + optional string name = 6;
> +
> // Specify IP address requirement. Set protocol to the desired value to
> // request the network isolator on the Agent to assign an IP address to the
> // container being launched. If a specific IP address is specified in
>
> http://git-wip-us.apache.org/repos/asf/mesos/blob/2a436e02/src/common/http.cpp
> ----------------------------------------------------------------------
> diff --git a/src/common/http.cpp b/src/common/http.cpp
> index be8538f..3e92979 100644
> --- a/src/common/http.cpp
> +++ b/src/common/http.cpp
> @@ -203,6 +203,10 @@ JSON::Object model(const NetworkInfo& info)
> object.values["ip_addresses"] = std::move(array);
> }
>
> + if (info.has_name()) {
> + object.values["name"] = info.name();
> + }
> +
> return object;
> }
>
> @@ -528,6 +532,10 @@ void json(JSON::ObjectWriter* writer, const NetworkInfo& info)
> }
> });
> }
> +
> + if (info.has_name()) {
> + writer->field("name", info.name());
> + }
> }
>
>
>