You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jian Qiu (JIRA)" <ji...@apache.org> on 2015/11/18 14:18:10 UTC
[jira] [Comment Edited] (MESOS-3792) flags.acls in /state.json
response is not the flag value passed to Mesos master
[ https://issues.apache.org/jira/browse/MESOS-3792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14970753#comment-14970753 ]
Jian Qiu edited comment on MESOS-3792 at 11/18/15 1:17 PM:
-----------------------------------------------------------
many values (maybe all) in flags has the same issue, I tried --firewall_rules and query /state which return something as below
{code}
"firewall_rules":"disabled_endpoints {
paths: "/files/browse"
paths: "/slave(0)/stats.json"
}"
{code}
The reason is that the value in flag returned by /state (also /flag) is stringified, however, if the value is a protobuf message, it should be converted into JSON object rather than string.
I would like to take a try, anyone can help shepherding?
was (Author: qiujian):
many values (maybe all) in flags has the same issue, I tried --firewall_rules and query /state which return something as below
{code}
"firewall_rules":"disabled_endpoints {
paths: "/files/browse"
paths: "/slave(0)/stats.json"
}"
{code}
The reason is that the value in flag returned by /state (also /flag) is stringified, however, if the value is a protobuf message, it should be converted into JSON object rather than string. Maybe we should add functions in stout/flag.hpp like:
{code}
struct Flag
{
...
bool protobuf;
lambda::function<Option<JSON::Object>(const FlagsBase&)> jsonfy;
...
};
{code}
So if a flag is protobuf message, it will be converted to a JSON object. I would like to take try, anyone can help shepherding?
> flags.acls in /state.json response is not the flag value passed to Mesos master
> -------------------------------------------------------------------------------
>
> Key: MESOS-3792
> URL: https://issues.apache.org/jira/browse/MESOS-3792
> Project: Mesos
> Issue Type: Bug
> Reporter: James Fisher
> Assignee: Jian Qiu
>
> Steps to reproduce: Start Mesos master with the `--acls` flag set to the following value:
> {code}
> { "run_tasks": [ { "principals": { "values": ["foo", "bar"] }, "users": { "values": ["alice"] } } ] }
> {code}
> Then make a request to {{http://mesosmaster:5050/state.json}} and extract the value for key `flags.acls` from the JSON body of the response.
> Expected behavior: the value is the same JSON string passed on the command-line.
> Actual behavior: the value is this string in some unknown syntax:
> {code}
> run_tasks {
> principals {
> values: "foo"
> values: "bar"
> }
> users {
> values: "alice"
> }
> }
> {code}
> I don't know what this is, but it's not an ACL expression according to the documentation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)