Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for custom hostname #188

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

andyxning
Copy link
Member

@andyxning andyxning commented Aug 2, 2017

pynsq now only supports override user_agent and not supporting override hostname.

In cases we run a consumer in a container, the hostname shell command will return a docker id which is a random string. When we check the client info in nsqadmin we can not get any useful info about the host name where consumer running.

With enable override hostname, we can set the consumer, running in a container, hostname to the host name where the container is running which is helpful when we want to determine which host to get the consumers.

/cc @mreiferson @alpaker

@andyxning andyxning force-pushed the add_costom_hostname branch 6 times, most recently from 43c1d7a to 60c6b44 Compare August 2, 2017 16:02
@andyxning
Copy link
Member Author

@mreiferson @alpaker

The error in travis ci seems nothing to do with the change. Could you please take a look at this?

@ploxiln
Copy link
Member

ploxiln commented Aug 2, 2017

Just looking at the test matrix, it seems to be the combo of python-3.5 and tornado-3.2 that fails.

@andyxning
Copy link
Member Author

@ploxiln Can you please help to figure out why it is failed.

@andyxning andyxning force-pushed the add_costom_hostname branch from 60c6b44 to 35c2a6b Compare August 3, 2017 08:21
@andyxning
Copy link
Member Author

andyxning commented Aug 3, 2017

@ploxiln I am not familiar with tornado. I googled the error and change the test by adding a single IOLoop instance according to tornado #663 comment.

Also according to this google group thread, it means that run_sync with a coroutine that also calls run_sync for TimeoutError: Operation timed out after None seconds error.

@mreiferson @alpaker could you please take a look at this?

@ploxiln
Copy link
Member

ploxiln commented Aug 3, 2017

We'll investigate, it'll just be a couple days ...

@andyxning
Copy link
Member Author

@ploxiln Thanks.

BTW, could you also please take a look at nsq #921.

@mreiferson
Copy link
Member

@andyxning thanks for the contribution!

I reran those broken builds and they worked, which means the issue is transient. From reading the links you've pasted, it looks like we've got some object(s) somewhere that aren't using the correct IOLoop instance.

I'm not particularly concerned with fully investigating this and fixing it "correctly", so I'd rather just leave the test code alone for now. Can you remove those changes and we can land this?

@andyxning andyxning force-pushed the add_costom_hostname branch from 35c2a6b to 254dfd1 Compare August 4, 2017 02:18
@andyxning
Copy link
Member Author

andyxning commented Aug 4, 2017

@mreiferson I have removed the changes to test. But it will error again in CI. PTAL.

@mreiferson mreiferson merged commit 31a80a7 into nsqio:master Aug 4, 2017
@andyxning andyxning deleted the add_costom_hostname branch August 4, 2017 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants