Provided that I'm not familiar at all with mesos-tail and/or mesos-resolve,
you are correct in that this is due to the recent changes (in 0.24) to the
way we write MasterInfo data to ZooKeeper.

This is a genuine bug, thanks for reporting: would you mind terribly to
file a Jira and assign to me, please?
(marco-mesos)

Thanks!

*Marco Massenzio*

*Distributed Systems Engineerhttp://codetrips.com <http://codetrips.com>*

On Tue, Sep 29, 2015 at 6:28 AM, Rad Gruchalski <[email protected]>
wrote:

> Thank you, that’s some progress:
>
> I changed the code at this line:
>
>
> https://github.com/mesosphere/mesos-cli/blob/master/mesos/cli/master.py#L107
>
> to:
>
>             try:
>                 parsed =  json.loads(val)
>                 return parsed["address"]["ip"] + ":" +
> str(parsed["address"]["port"])
>             except Exception:
>                 return val.split("@")[-1]
>
> And now it gives me the correct master. However, executing mesos-tail or
> mesos-ps does not do anything, just hangs there without any output.
> Something obviously does not work as advertised.
> Or I should possibly switch to https://github.com/mesosphere/dcos-cli (
> https://pypi.python.org/pypi/dcoscli), but will this work with just a
> regular mesos 0.24.1 installation?
>
> Kind regards,
> Radek Gruchalski
> [email protected] <[email protected]>
> de.linkedin.com/in/radgruchalski/
>
>
> *Confidentiality:*This communication is intended for the above-named
> person and may be confidential and/or legally privileged.
> If it has come to you in error you must take no action based on it, nor
> must you copy or show it to anyone; please delete/destroy and inform the
> sender immediately.
>
> On Tuesday, 29 September 2015 at 15:20, haosdent wrote:
>
> I think the problem here is you use zk as schema in your config file(
> .mesos.json) or MESOS_CLI_CONFIG (
> https://github.com/mesosphere/mesos-cli/blob/master/mesos/cli/cfg.py#L42
> and
> https://github.com/mesosphere/mesos-cli/blob/master/mesos/cli/master.py#L119).
> Not because 0.24.1, you use 0.24.0 should have same issue.
>
> On Tue, Sep 29, 2015 at 9:14 PM, haosdent <[email protected]> wrote:
>
> I think you install mesos-cli from https://github.com/mesosphere/mesos-cli
>
> On Tue, Sep 29, 2015 at 8:51 PM, Rad Gruchalski <[email protected]>
> wrote:
>
> It seems that I found the reason for this behaviour.
> When I execute mesos-resolve, I get an output like this:
>
> 10.100.1.100:5050","port":5050,"version":"0.24.1"}
>
> I managed to get to the python sources on the machine, especially
> master.py. I verified that in my case the zookeeper_resolver is used.
> However, what gets returned from zookeeper resolver is:
>
>     return val.split("@")[-1]
>
> Where the val is a JSON string:
>
>
>  
> {"address":{"hostname”:”mesos-master","ip":"10.100.1.100","port":5050},"hostname”:”mesos-master","id":"20150929-113531-244404234-5050-18065","ip”:...,"pid":"
> [email protected]:5050","port":5050,"version":"0.24.1”}
>
> Looking at these two, it is obvious why it does not work. I’m trying to
> find the code for master.py but it does not exist in
> https://github.com/apache/mesos/tree/master/src/python/interface/src/mesos/interface
> .
> Where does it come from? Is it somehow generated or is it a separate repo?
>
> Kind regards,
> Radek Gruchalski
> [email protected] <[email protected]>
> de.linkedin.com/in/radgruchalski/
>
>
> *Confidentiality:*This communication is intended for the above-named
> person and may be confidential and/or legally privileged.
> If it has come to you in error you must take no action based on it, nor
> must you copy or show it to anyone; please delete/destroy and inform the
> sender immediately.
>
> On Tuesday, 29 September 2015 at 13:02, Rad Gruchalski wrote:
>
> Hi everyone,
>
> I have upgraded my development mesos environment to 0.24.1 this morning.
> It’s a clean installation with new zookeeper and everything.
> Since the upgrade I get an error while executing mesos-tail:
>
> mesos-master ~$ mesos tail -f -n 50 service
> Traceback (most recent call last):
>   File "/usr/local/bin/mesos-tail", line 11, in <module>
>     sys.exit(main())
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/cli.py", line 61,
> in wrapper
>     return fn(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/cmds/tail.py",
> line 55, in main
>     args.task, args.file, fail=(not args.follow)):
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/cluster.py", line
> 27, in files
>     tlist = MASTER.tasks(fltr)
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/master.py", line
> 174, in tasks
>     self._task_list(active_only))))
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/master.py", line
> 153, in _task_list
>     *[util.merge(x, *keys) for x in self.frameworks(active_only)])
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/master.py", line
> 185, in frameworks
>     return util.merge(self.state, *keys)
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/util.py", line
> 58, in __get__
>     value = self.fget(inst)
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/master.py", line
> 123, in state
>     return self.fetch("/master/state.json").json()
>   File "/usr/local/lib/python2.7/dist-packages/mesos/cli/master.py", line
> 64, in fetch
>     return requests.get(urlparse.urljoin(self.host, url), **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 69,
> in get
>     return request('get', url, params=params, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 50,
> in request
>     response = session.request(method=method, url=url, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line
> 451, in request
>     prep = self.prepare_request(req)
>   File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line
> 382, in prepare_request
>     hooks=merge_hooks(request.hooks, self.hooks),
>   File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line
> 304, in prepare
>     self.prepare_url(url, params)
>   File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line
> 357, in prepare_url
>     raise InvalidURL(*e.args)
> requests.exceptions.InvalidURL: Failed to parse: 10.100.1.100:5050
> ","port":5050,"version":"0.24.1"}
>
> I used mesos-deb-packaging for packaging this release, exactly the same
> way as 0.24.0, which works without the problem. Is this a known issue?
>
> Kind regards,
> Radek Gruchalski
> [email protected] <[email protected]>
> de.linkedin.com/in/radgruchalski/
>
>
> *Confidentiality:*This communication is intended for the above-named
> person and may be confidential and/or legally privileged.
> If it has come to you in error you must take no action based on it, nor
> must you copy or show it to anyone; please delete/destroy and inform the
> sender immediately.
>
>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>
>
>

Reply via email to