[jira] [Commented] (MESOS-5384) Improve error message for missing resources file
[ https://issues.apache.org/jira/browse/MESOS-5384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15620335#comment-15620335 ] Kris Paprocki commented on MESOS-5384: --- Hi Benjamin and John, thanks for the comments. I very much support the idea of not breaking backwards compatibility. However, just adding an error message at fetch/parse level is not going to work due to flags which contain directory path in format /path/to/directory (i.e. launcher_dir). There is a potential solution to that: flags with directory paths could be a type of Path (from ), currently these flags are type of std::string. Then, as flags::fetch is specialized for Path type, we could add the error message in generic flags::fetch when he finds '/' at the beginning of the string. But I'm not sure if there are any other cases in which flags may contain '/' at the beginning. Do you see any blocker for this approach? Going for this solution would involve a number of other changes in order to adapt existing code to Path type instead of std::string (for these flags which are directory paths). I'm willing to do the changes, but then maybe this shall be a part of a new ticket? As for this ticket, I could adapt the documentation. We could then later update this ticket when the proper solution is applied. > Improve error message for missing resources file > > > Key: MESOS-5384 > URL: https://issues.apache.org/jira/browse/MESOS-5384 > Project: Mesos > Issue Type: Bug > Components: general >Affects Versions: 0.28.1 > Environment: Centos 7 >Reporter: John Yost >Assignee: Kris Paprocki >Priority: Minor > Labels: easyfix, newbie > > Attempting to specify resources file via > --resources=/etc/mesos-slave/small-slave-config.json threw the following > error: > Failed to determine slave resources: Bad value for resources, missing or > extra ':' in /etc/mesos-slave/small-slave-config.json > I confirmed I had valid JSON: > [ > { > "name": "cpus", > "type": "SCALAR", > "scalar": { > "value": 0.5 > } > }, > { > "name": "mem", > "type": "SCALAR", > "scalar": { > "value": 512 > } > } > ] > In actuality, I misread to docs with my file pattern. Once I changed to > resources=file:///etc/mesos-slave/small-slave-config.json the mesos slave > started up fine. Just need a missing file check and corresponding error > message to fix this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-5384) Improve error message for missing resources file
[ https://issues.apache.org/jira/browse/MESOS-5384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15495703#comment-15495703 ] Kris Paprocki commented on MESOS-5384: --- Looking for a shepherd for this issue. > Improve error message for missing resources file > > > Key: MESOS-5384 > URL: https://issues.apache.org/jira/browse/MESOS-5384 > Project: Mesos > Issue Type: Bug > Components: general >Affects Versions: 0.28.1 > Environment: Centos 7 >Reporter: John Yost >Assignee: Kris Paprocki >Priority: Minor > Labels: easyfix, newbie > > Attempting to specify resources file via > --resources=/etc/mesos-slave/small-slave-config.json threw the following > error: > Failed to determine slave resources: Bad value for resources, missing or > extra ':' in /etc/mesos-slave/small-slave-config.json > I confirmed I had valid JSON: > [ > { > "name": "cpus", > "type": "SCALAR", > "scalar": { > "value": 0.5 > } > }, > { > "name": "mem", > "type": "SCALAR", > "scalar": { > "value": 512 > } > } > ] > In actuality, I misread to docs with my file pattern. Once I changed to > resources=file:///etc/mesos-slave/small-slave-config.json the mesos slave > started up fine. Just need a missing file check and corresponding error > message to fix this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-5384) Improve error message for missing resources file
[ https://issues.apache.org/jira/browse/MESOS-5384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15461069#comment-15461069 ] Kris Paprocki commented on MESOS-5384: -- Actually, documentation/code says: "To use JSON, pass a JSON-formatted string or use --resources=filepath to specify the resources via a file containing a JSON-formatted string. 'filepath' can be of the form file:///path/to/file or /path/to/file." Is the /path/to/file generally allowed/deprecated/not-supported? Additionally, in the code we give "deprecated" warning when the path is specified without 'file://', however only when parsing JSON::Array and JSON::Object (see 3rdparty/stout/include/stout/flags/parse.hpp). Wouldn't it make sense to make this as a generic rule when reading from /path/to/file? Also, if we set a generic rule, I propose to move reading the content of the /path/to/file from 3rdparty/stout/include/stout/flags/parse.hpp to 3rdparty/stout/include/stout/flags/fetch.hpp. It was a little bit surprising to find another reading hidden in parse.hpp file. > Improve error message for missing resources file > > > Key: MESOS-5384 > URL: https://issues.apache.org/jira/browse/MESOS-5384 > Project: Mesos > Issue Type: Bug > Components: general >Affects Versions: 0.28.1 > Environment: Centos 7 >Reporter: John Yost >Assignee: Kris Paprocki >Priority: Minor > Labels: easyfix, newbie > > Attempting to specify resources file via > --resources=/etc/mesos-slave/small-slave-config.json threw the following > error: > Failed to determine slave resources: Bad value for resources, missing or > extra ':' in /etc/mesos-slave/small-slave-config.json > I confirmed I had valid JSON: > [ > { > "name": "cpus", > "type": "SCALAR", > "scalar": { > "value": 0.5 > } > }, > { > "name": "mem", > "type": "SCALAR", > "scalar": { > "value": 512 > } > } > ] > In actuality, I misread to docs with my file pattern. Once I changed to > resources=file:///etc/mesos-slave/small-slave-config.json the mesos slave > started up fine. Just need a missing file check and corresponding error > message to fix this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-5384) Improve error message for missing resources file
[ https://issues.apache.org/jira/browse/MESOS-5384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15435549#comment-15435549 ] Kris Paprocki commented on MESOS-5384: -- This looks like a good 'warm-up' task for a newbie, assigned to myself. > Improve error message for missing resources file > > > Key: MESOS-5384 > URL: https://issues.apache.org/jira/browse/MESOS-5384 > Project: Mesos > Issue Type: Bug > Components: general >Affects Versions: 0.28.1 > Environment: Centos 7 >Reporter: John Yost >Assignee: Kris Paprocki >Priority: Minor > Labels: easyfix, newbie > > Attempting to specify resources file via > --resources=/etc/mesos-slave/small-slave-config.json threw the following > error: > Failed to determine slave resources: Bad value for resources, missing or > extra ':' in /etc/mesos-slave/small-slave-config.json > I confirmed I had valid JSON: > [ > { > "name": "cpus", > "type": "SCALAR", > "scalar": { > "value": 0.5 > } > }, > { > "name": "mem", > "type": "SCALAR", > "scalar": { > "value": 512 > } > } > ] > In actuality, I misread to docs with my file pattern. Once I changed to > resources=file:///etc/mesos-slave/small-slave-config.json the mesos slave > started up fine. Just need a missing file check and corresponding error > message to fix this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (MESOS-5384) Improve error message for missing resources file
[ https://issues.apache.org/jira/browse/MESOS-5384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kris Paprocki reassigned MESOS-5384: Assignee: Kris Paprocki > Improve error message for missing resources file > > > Key: MESOS-5384 > URL: https://issues.apache.org/jira/browse/MESOS-5384 > Project: Mesos > Issue Type: Bug > Components: general >Affects Versions: 0.28.1 > Environment: Centos 7 >Reporter: John Yost >Assignee: Kris Paprocki >Priority: Minor > Labels: easyfix, newbie > > Attempting to specify resources file via > --resources=/etc/mesos-slave/small-slave-config.json threw the following > error: > Failed to determine slave resources: Bad value for resources, missing or > extra ':' in /etc/mesos-slave/small-slave-config.json > I confirmed I had valid JSON: > [ > { > "name": "cpus", > "type": "SCALAR", > "scalar": { > "value": 0.5 > } > }, > { > "name": "mem", > "type": "SCALAR", > "scalar": { > "value": 512 > } > } > ] > In actuality, I misread to docs with my file pattern. Once I changed to > resources=file:///etc/mesos-slave/small-slave-config.json the mesos slave > started up fine. Just need a missing file check and corresponding error > message to fix this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)