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

Disable allow_reuse_address (SO_REUSEADDR) on Windows #10955

Merged
merged 3 commits into from Nov 5, 2019

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Oct 23, 2019

Fix #10578: az login hangs when more than one instances of az login are launched at the same time on Windows or WSL

The root cause is that HTTPServer can't detect port is in-use on Windows.

To repro, launch az login but do not continue in the browser. Then run az login from another terminal and continue with the login. One of the az instance will get stuck.

This PR disables HTTPServer.allow_reuse_address so that the correct routine is resumed.


This checklist is used to make sure that common guidelines for a pull request are followed.

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

  • I adhere to the Command Guidelines.

@jiasli jiasli requested review from yugangw-msft, qwordy, tjprescott and mmyyrroonn and removed request for tjprescott October 23, 2019 06:51
@yugangw-msft
Copy link
Contributor

Try to test CI, will close and re-open

Copy link
Member

@qwordy qwordy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for testing.

@qwordy qwordy self-requested a review October 24, 2019 02:31
@qwordy
Copy link
Member

qwordy commented Oct 24, 2019

I can't cancel my approval now, which can be done before the permission change. Please don't merge before a real approval.

@qwordy
Copy link
Member

qwordy commented Oct 24, 2019

I think we don't need to support multiple az login at same time since we don't support multiple accounts. We can let all other az login fail if there is an az login running. az login should not interleave.
And if we support multiple az login, add write locks to token files. I've seen broken accessTokens.json because of concurrent write. The content is interleaving.

Copy link
Member

@qwordy qwordy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test how to revoke approval.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -395,16 +395,21 @@ def _get_platform_info():
return platform_name.lower(), release.lower()


def _is_wsl(platform_name, release):
def is_wsl():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why the original _is_wsl() is ignoring the passed in perameter platform_name, release and calls _get_platform_info() to overwrite them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be some forgotten logic.

@jiasli
Copy link
Member Author

jiasli commented Oct 14, 2021

@welersonlisboa
Copy link

#26180

@jiasli
Copy link
Member Author

jiasli commented Apr 20, 2023

@welersonlisboa, this PR is not relevant to #26180.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

az login hangs after selecting account
5 participants