-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Windows] mongo service will be disabled by default on August, 8th #5949
Comments
Hi @ddobranic, I'm currently experiencing an error that might be related. CONTEXT: I'm building this image in azure devops pipeline to store it in an Azure image gallery. Based on this https://github.com/YannickRe/azuredevops-buildagents |
@dsfrederic, pull the latest changes from main branch. It has been fixed in #6030 |
we make a release once a week when a new image version is being released. For your specific error it looks like the codql archive seems to be inconsistent, try again, please. |
Hi - I've updated my CI today with Run Start-Service -Name mongodb
Start-Service: D:\a\_temp\5bb2a[14](https://github.com/SMI/SmiServices/runs/7769010886?check_suite_focus=true#step:8:15)0-67d9-46e9-a0e4-447e48467acf.ps1:2
Line |
2 | Start-Service -Name mongodb
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Service 'MongoDB Server (MongoDB) (mongodb)' cannot be started due to the following error: Cannot
| start service 'mongodb' on computer '.'.
Error: Process completed with exit code 1. (https://github.com/SMI/SmiServices/runs/7769010886?check_suite_focus=true#step:8:1) Any ideas? Thanks. |
@rkm, it should be:
|
@al-cheb Have tried this now, but still encountering the issue |
Please provide a link to the build. |
Here's our most recent instance https://github.com/SMI/SmiServices/runs/7771359161?check_suite_focus=true |
@jas88, just for curiosity, what happens when you move this step right after the checkout step? |
@al-cheb Tried it; both runs completed OK this time, but that doesn't say much since most but not all of the last few runs worked... |
Both images have been deployed with a disabled mongo service by default. |
As documented in https://github.com/orgs/community/discussions/30083, I encounter the same issue as @rkm described in #5949 (comment):
This happens using the instructions provided by @al-cheb, with this step: - name: Start MongoDB (Windows)
run: |
Set-Service mongodb -StartupType Automatic
Start-Service -Name mongodb
if: ${{ env.RUNNER_OS }} == 'Windows' And yields the exact same result as what I had before finding this issue, that is using only What can we do to bring Mongo back to Windows? Currently, the only option left seems to be to disable MongoDB-related tests in CI, which plays strongly against GitHub Actions. Note on processI am a bit confused about how I can get notified of such major, breaking changes. Our builds started failing on Windows with no clear reason, and it took us two half days to identify the root cause (MongoDB not being started anymore on Windows) since it coincided with a major MongoDB release and we did not suspect that GitHub Actions would change its infrastructure this way. There is no documentation on how to start the service in the image description nor in the Actions doc. This issue itself was referred to me by a colleague, and I did not manage to find it through different searches. In the end, the proposed workaround does not seem to work. More generally, this issue was opened on 22/07 for deployment on 08/08, and the rationale for such a breaking change with no clear workaround at the time of writing is “mongodb service on Windows Server is running but it should be disabled by default”. This does not make it very clear why we have to pay such a strong adaptation cost on short notice. What is the way we, as users, are expected to follow with such breaking changes? The volume of issues makes it impractical to watch the repository. Should we check this repository weekly for “Announcement”-tagged issues? 🙂 |
@MattiSG, could you add the start mongodb service step right after checkout or the first one? |
Follow instructions from actions/runner-images#5949 (comment)
Thank you @al-cheb for your quick reply! I thought I got it to work by adjusting your instructions to use the case-sensitive version of the service name (with
Done in this run. It took two minutes of waiting before the step finally output “WARNING: Waiting for service 'MongoDB Server (MongoDB) (MongoDB)' to start...”, but it passed. However, I don't know how reliable a positive result can be considering my and @jas88’s experience with random results 😕 I will run a few more iterations and report. @al-cheb Could you please clarify the rationale behind starting the service as early as possible in the process? I assume this is because it might take some time for the server to start, and our tests might fail earlier than that. However, in our case, dependencies are installed and a first series of tests are executed in-between the service start and the usage of MongoDB, averaging over a minute, which should be enough for the MongoDB server to be up.
since I am not familiar with Windows services, is there any reason why this could work if |
I confirm that on a second run, even as “first step after checkout”, the service start fails. |
@MattiSG, Could you check?
|
Follow instructions in actions/runner-images#5949 (comment)
With On a first run, the service did start and logged:
However, all sorts of weird, never-seen-before errors appeared in the run. Those did not seem to be directly related to MongoDB. On a second run, the service started and logged the exact same lines (except for the PID of course) and all tests passed. On a third run, same as second. On a fourth run, same as second. |
Follow instructions in actions/runner-images#5949 (comment)
The The duration for starting up the MongoDB service is between 1 and 3 minutes, leading to a significant slowdown of our pipeline: Following this change, we are considering disabling MongoDB tests on Windows. This is disappointing and plays against GitHub Actions as a cross-platform CI engine. |
Follow instructions in actions/runner-images#5949 (comment)
Follow instructions in actions/runner-images#5949 (comment)
Stability report after running 10 times each syntaxThe following syntaxes were run in GitHub Actions on The test suite itself is not inherently flaky, as each run was also run in In almost two years of running this test suite cross-platform, Windows tests had only one moment of diverging failure a few months ago. This observed increase to 10% failure rate seems to be a consequence of the change introduced here. I will report in a few days or weeks if this data changes.
|
Same failure rate (~10%) See actions/runner-images#5949 (comment) for a benchmark
Implement the GitHub Actions recommended solution following an update to their infrastructure. The expected result is to drop failure rate from 100% down to 10%. See actions/runner-images#5949 (comment) for details. Upgrade CI Windows from Server 2019 to Server 2022. Speed up Linux CI. Test on MongoDB v5 instead of v4 on Linux.
This issue seems to have resurfaced for us unfortunately. Example run here. Our workflow file is unchanged, and contains: - name: "[windows] start MongoDB service"
if: ${{ matrix.os == 'windows' }}
shell: pwsh
run: |
Set-Service mongodb -StartupType Automatic
Start-Service -Name mongodb |
This has also recently restarted for a project I'm working on. |
@al-cheb is there any more information we could provide to help diagnose this issue? |
@rkm , could you please check?
|
@ddobranic We've changed to the [SC] ChangeServiceConfig SUCCESS
[SC] StartService FAILED 1053:
The service did not respond to the start or control request in a timely fashion. Example run: https://github.com/SMI/SmiServices/actions/runs/4563723915/jobs/8052574736?pr=1489#step:4:17 |
This is based on suggestions from actions/runner-images#5949
Breaking changes
mongodb service on Windows Server which is currently running will be disabled
Target date
The propagation is starting on August, 8th and will take 2-3 days
The motivation for the changes
Currently, mongodb service on Windows Server is running but it should be disabled by default
Possible impact
The mongodb service is disabled and all related processes
Platforms affected
Virtual environments affected
Mitigation ways
The text was updated successfully, but these errors were encountered: