[jira] [Commented] (MESOS-3210) DiscoveryInfo is broken in state.json
[ https://issues.apache.org/jira/browse/MESOS-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14660354#comment-14660354 ] Tomás Senart commented on MESOS-3210: - I agree that this looks wrong and confusing to consumers who should not be impacted by internal implementation details. > DiscoveryInfo is broken in state.json > - > > Key: MESOS-3210 > URL: https://issues.apache.org/jira/browse/MESOS-3210 > Project: Mesos > Issue Type: Bug > Components: master >Affects Versions: 0.23.0 >Reporter: Dr. Stefan Schimanski > > The DiscoveryInfo field of a task in state.json is broken: ports and labels > fields are nested once too much. > Got: > {code} > "discovery" : { > "name" : "docker", > "labels" : { > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > }, > "visibility" : "CLUSTER", > "ports" : { > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] > } >}, > {code} > Expected: > {code} > "discovery" : { > "name" : "docker", > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > "visibility" : "CLUSTER", > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] >}, > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3210) DiscoveryInfo is broken in state.json
[ https://issues.apache.org/jira/browse/MESOS-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659621#comment-14659621 ] haosdent commented on MESOS-3210: - Hm, I think it is not bug. According this review board about DiscoveryInfo https://reviews.apache.org/r/29473/diff/1/ > DiscoveryInfo is broken in state.json > - > > Key: MESOS-3210 > URL: https://issues.apache.org/jira/browse/MESOS-3210 > Project: Mesos > Issue Type: Bug > Components: master >Affects Versions: 0.23.0 >Reporter: Dr. Stefan Schimanski > > The DiscoveryInfo field of a task in state.json is broken: ports and labels > fields are nested once too much. > Got: > {code} > "discovery" : { > "name" : "docker", > "labels" : { > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > }, > "visibility" : "CLUSTER", > "ports" : { > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] > } >}, > {code} > Expected: > {code} > "discovery" : { > "name" : "docker", > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > "visibility" : "CLUSTER", > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] >}, > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3210) DiscoveryInfo is broken in state.json
[ https://issues.apache.org/jira/browse/MESOS-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659601#comment-14659601 ] Dr. Stefan Schimanski commented on MESOS-3210: -- If this structure is intended, it's completely fine. We will base Mesos-DNS DiscoveryInfo support on this and wanted to be sure that this is no bug. > DiscoveryInfo is broken in state.json > - > > Key: MESOS-3210 > URL: https://issues.apache.org/jira/browse/MESOS-3210 > Project: Mesos > Issue Type: Bug > Components: master >Affects Versions: 0.23.0 >Reporter: Dr. Stefan Schimanski > > The DiscoveryInfo field of a task in state.json is broken: ports and labels > fields are nested once too much. > Got: > {code} > "discovery" : { > "name" : "docker", > "labels" : { > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > }, > "visibility" : "CLUSTER", > "ports" : { > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] > } >}, > {code} > Expected: > {code} > "discovery" : { > "name" : "docker", > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > "visibility" : "CLUSTER", > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] >}, > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3210) DiscoveryInfo is broken in state.json
[ https://issues.apache.org/jira/browse/MESOS-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658498#comment-14658498 ] haosdent commented on MESOS-3210: - Because we use a general function convert discovery protobuf to json, and {quote} "ports" : { "ports" : [ { "name" : "health", "number" : 1080, "protocol" : "http" } ] } {quote} is match the protobuf message struct. Suppose we add "notes" to ports in protobuf, the struct would change to {quote} "ports" : { "notes": "This is a note." "ports" : [ { "name" : "health", "number" : 1080, "protocol" : "http" } ] } {quote} it would not compatible with your expected struct. So I think keep current struct would be better, unless we change the protobuf of DiscoveryInfo. > DiscoveryInfo is broken in state.json > - > > Key: MESOS-3210 > URL: https://issues.apache.org/jira/browse/MESOS-3210 > Project: Mesos > Issue Type: Bug > Components: master >Affects Versions: 0.23.0 >Reporter: Dr. Stefan Schimanski > > The DiscoveryInfo field of a task in state.json is broken: ports and labels > fields are nested once too much. > Got: > {code} > "discovery" : { > "name" : "docker", > "labels" : { > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > }, > "visibility" : "CLUSTER", > "ports" : { > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] > } >}, > {code} > Expected: > {code} > "discovery" : { > "name" : "docker", > "labels" : [ > { >"key" : "canary", >"value" : "Mallorca" > } > ] > "visibility" : "CLUSTER", > "ports" : [ > { >"name" : "health", >"number" : 1080, >"protocol" : "http" > } > ] >}, > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)