Skip to content

fix: Ignore supervisor "already started" when ensuring edxapp workers…#358

Merged
srathod-apphelix merged 2 commits into
masterfrom
srathod/GSRE-4236-edxapp-ignore-workers-already-started
Jul 21, 2026
Merged

fix: Ignore supervisor "already started" when ensuring edxapp workers…#358
srathod-apphelix merged 2 commits into
masterfrom
srathod/GSRE-4236-edxapp-ignore-workers-already-started

Conversation

@srathod-apphelix

Copy link
Copy Markdown
Member

Summary

  • Treat supervisor ERROR (already started) as success when ensuring edxapp_worker processes are started.
  • Keep the existing deploy flow: config update → ensure running → restart to load new code.
  • Apply the same fix in all edxapp deploy.yml role copies.

Jira - GSRE-4236

Purpose

CreateSandbox fails only when enable_datadog=true because Datadog changes worker startup scripts (ddtrace-run), so supervisorctl update starts the workers, and the later ensure edxapp_workers has started task fails with:
edxapp_worker:cms_default_1: ERROR (already started)
This change makes that condition non-fatal so sandbox provisioning can continue, while the final restart edxapp_workers task still reloads the newly deployed code.

Changes

  • playbooks/roles/edxapp/tasks/deploy.yml

Copilot AI review requested due to automatic review settings July 20, 2026 18:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the edxapp deploy flow to tolerate Supervisor’s ERROR (already started) when ensuring edxapp_worker processes are started, preventing sandbox provisioning failures when Datadog instrumentation causes workers to be started earlier in the run.

Changes:

  • Registers the supervisorctl “ensure edxapp_workers has started” task result.
  • Adds a failed_when guard to treat “already started” as non-fatal for that task.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread playbooks/roles/edxapp/tasks/deploy.yml Outdated
Comment thread playbooks/roles/edxapp/tasks/deploy.yml Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 06:33
@srathod-apphelix
srathod-apphelix force-pushed the srathod/GSRE-4236-edxapp-ignore-workers-already-started branch from 6733eac to 2cc5d94 Compare July 21, 2026 06:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

playbooks/roles/edxapp/tasks/deploy.yml:509

  • failed_when references edxapp_workers_start.failed directly. In Ansible, registered results may not have a failed attribute on success, and accessing a missing attribute inside a conditional can raise an error (elsewhere in this repo, similar logic is guarded with ...failed is defined, e.g. playbooks/roles/mongo_7_0/tasks/main.yml:102). Guard the access so successful runs don’t error while evaluating this expression.
  failed_when: >
    edxapp_workers_start is failed and
    'already started' not in edxapp_workers_start.msg

Copilot AI review requested due to automatic review settings July 21, 2026 06:36
@srathod-apphelix
srathod-apphelix merged commit b1d3738 into master Jul 21, 2026
2 of 4 checks passed
@srathod-apphelix
srathod-apphelix deleted the srathod/GSRE-4236-edxapp-ignore-workers-already-started branch July 21, 2026 06:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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.

3 participants