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

Ensure that graceful start-up is informed of unused SSH listener #20877

Merged
merged 1 commit into from
Aug 20, 2022
Merged

Ensure that graceful start-up is informed of unused SSH listener #20877

merged 1 commit into from
Aug 20, 2022

Conversation

eeyrjmr
Copy link
Contributor

@eeyrjmr eeyrjmr commented Aug 20, 2022

The graceful manager waits for 4 listeners to be created or to be told that they are not needed. If it is not told about them it will indefinitely and timeout.

This leads to SVC hosts not being told of being in the readyState but on Unix would lead to the termination of the process.

There was an unfortunate regression in #20299 which missed this subtly and in the case whereby SSH is disabled the builtinUnused() is not called.

This PR adds a call to builtinUnused() when not using the builtin ssh to allow createServerWaitGroup.Done() to be called.

In addition it was noted that the if/else clauses for timeout informing of the SVC host were in the wrong order. These have been swapped.

Fix #20609

This is to ensure any ServerWaitGroups complete

svc.Status called with the StartupTimeout if the setting is nonzero

correct gofmt
@eeyrjmr eeyrjmr changed the title Fix win service never finishing (#20609) Fix win service never finishing Aug 20, 2022
@zeripath zeripath changed the title Fix win service never finishing Ensure that graceful start-up is informed of unused SSH listener Aug 20, 2022
@zeripath zeripath added this to the 1.18.0 milestone Aug 20, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 20, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 20, 2022
@zeripath zeripath merged commit cb37c6b into go-gitea:main Aug 20, 2022
@zeripath
Copy link
Contributor

Please send backport

@eeyrjmr eeyrjmr deleted the fix_winSrvNeverFinishing branch August 20, 2022 21:14
@wxiaoguang wxiaoguang mentioned this pull request Aug 21, 2022
wxiaoguang pushed a commit that referenced this pull request Aug 21, 2022
)

The graceful manager waits for 4 listeners to be created or to be told that they are not needed. If it is not told about them it will indefinitely and timeout. 

This leads to SVC hosts not being told of being in the readyState but on Unix would lead to the termination of the process.

There was an unfortunate regression in #20299 which missed this subtly and in the case whereby SSH is disabled the `builtinUnused()` is not called.

This PR adds a call to `builtinUnused()` when not using the builtin ssh to allow `createServerWaitGroup.Done()` to be called. 

In addition it was noted that the if/else clauses for timeout informing of the SVC host were in the wrong order. These have been swapped.

Fix #20609
@zeripath zeripath added the backport/done All backports for this PR have been created label Aug 21, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 22, 2022
* giteaofficial/main:
  update current stable version
  [skip ci] Updated translations via Crowdin
  Fix mirror address setting not working (go-gitea#20850)
  Support Proxy protocol (go-gitea#12527)
  Fix SQL Query for `SearchTeam` (go-gitea#20844)
  Double check CloneURL is acceptable (go-gitea#20869)
  Fix graceful doc (go-gitea#20883)
  Pad GPG Key ID with preceding zeroes (go-gitea#20878)
  [skip ci] Updated translations via Crowdin
  call builtinUnused() if internal SSH is disabled (go-gitea#20877)
  Don't open new page for ext wiki on same repository (go-gitea#20725)
  [skip ci] Updated translations via Crowdin
  Fix the mode of custom dir to 0700 in docker-rootless (go-gitea#20861)
  Fix UI mis-align for PR commit history (go-gitea#20845)
vsysoev pushed a commit to IntegraSDL/gitea that referenced this pull request Aug 28, 2022
The graceful manager waits for 4 listeners to be created or to be told that they are not needed. If it is not told about them it will indefinitely and timeout. 

This leads to SVC hosts not being told of being in the readyState but on Unix would lead to the termination of the process.

There was an unfortunate regression in go-gitea#20299 which missed this subtly and in the case whereby SSH is disabled the `builtinUnused()` is not called.

This PR adds a call to `builtinUnused()` when not using the builtin ssh to allow `createServerWaitGroup.Done()` to be called. 

In addition it was noted that the if/else clauses for timeout informing of the SVC host were in the wrong order. These have been swapped.

Fix go-gitea#20609
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The status of gitea 1.17 service is always "starting" in windows when SSH is Disabled
4 participants