Skip to content

feat: add resource migration job and troubleshooting section for upgrade failures#289

Open
mrMigles wants to merge 3 commits into
mainfrom
fix/statefulset_migrator
Open

feat: add resource migration job and troubleshooting section for upgrade failures#289
mrMigles wants to merge 3 commits into
mainfrom
fix/statefulset_migrator

Conversation

@mrMigles
Copy link
Copy Markdown
Member

@mrMigles mrMigles commented Mar 9, 2026

Introduced a new resource migration job to handle OpenSearch StatefulSets during upgrades, along with a troubleshooting section in the documentation addressing potential upgrade failures due to pre-deploy migration hooks. This includes detailed descriptions, stack traces, solutions, and recommendations for successful upgrades.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

TDB

Related Tickets & Documents

  • Related Issue #
  • Closes #

QA Instructions, Screenshots, Recordings

Please replace this line with instructions on how to test your changes, a note
on the devices and browsers this has been tested on, as well as any relevant
images for UI changes.

Breaking Change checklist

If your PR includes any deployment or processing changes, please utilize this checklist:

  • Does it change any deployment parameters, logic of their working or rename them?
  • Did update from previous version tested with the same set of deployment parameters?

Added/updated tests?

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

[optional] Are there any things to highlight or double check?

[optional] What gif best describes this PR or how it makes you feel?

…ade failures

Introduced a new resource migration job to handle OpenSearch StatefulSets during upgrades, along with a troubleshooting section in the documentation addressing potential upgrade failures due to pre-deploy migration hooks. This includes detailed descriptions, stack traces, solutions, and recommendations for successful upgrades.
@github-actions github-actions Bot added the enhancement New feature or request label Mar 9, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7bd3c87855

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…arch upgrades

Introduced a new section detailing the resource migration job that automatically handles the removal of incompatible OpenSearch 1.x StatefulSets during upgrades to 2.x. This section explains the job's functionality, parameters, and how it integrates with ArgoCD to ensure a smooth upgrade process without manual intervention.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Mar 9, 2026
@PhBouzid
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	docs/public/troubleshooting.md

Co-authored-by: PhBouzid <15084032+PhBouzid@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts in commit 1148ac0. The only conflict was in docs/public/troubleshooting.md — the changes from main (corrected TOC anchor and reformatted "Recommendations" paragraph) were merged together with our new "Upgrade Failed Due to Pre-Deploy Migration Hook" section.

@github-actions
Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (mrMigles)[https://github.com/mrMigles]
❌ @Copilot
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

| `integrationTests.securityContext` | object | no | {} | The pod-level security attributes and common container settings for the OpenSearch integration tests pod. |
| `integrationTests.priorityClassName` | string | no | "" | The priority class to be used by the OpenSearch integration tests pods. You should create the priority class beforehand. For more information about this feature, refer to [https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/). |

## Resource Migration
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

New chapters are not added to the TOC

| `integrationTests.securityContext` | object | no | {} | The pod-level security attributes and common container settings for the OpenSearch integration tests pod. |
| `integrationTests.priorityClassName` | string | no | "" | The priority class to be used by the OpenSearch integration tests pods. You should create the priority class beforehand. For more information about this feature, refer to [https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/). |

## Resource Migration
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please, move this section after Tags Description of integration tests.

{{- if .Values.resourceMigration.runAsNonRoot }}
securityContext:
runAsNonRoot: true
seccompProfile: { type: RuntimeDefault }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe just

        seccompProfile:
          type: RuntimeDefault

?


# 'node.master' env is a marker of OpenSearch 1.x StatefulSets that must be
# recreated during upgrade to 2.x because ArgoCD merge cannot remove extra envs.
NODE_MASTER="$(printf '%s' "$STS_JSON" \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we use just echo "$STS_JSON" instead of printf '%s' "$STS_JSON"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants