Skip to content

add documentation for logicalcluster migration#4242

Merged
kcp-ci-bot merged 2 commits into
kcp-dev:mainfrom
xrstf:migration-docs
Jul 15, 2026
Merged

add documentation for logicalcluster migration#4242
kcp-ci-bot merged 2 commits into
kcp-dev:mainfrom
xrstf:migration-docs

Conversation

@xrstf

@xrstf xrstf commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds basic documentation on how the cluster migration works.

What Type of PR Is This?

/kind documentation

Related Issue(s)

Fixes #4203

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 2, 2026
@xrstf

xrstf commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@xrstf

xrstf commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@ntnn

ntnn commented Jul 9, 2026

Copy link
Copy Markdown
Member
 tar: kcp/audit-1.log: file changed as we read it 

/test pull-kcp-test-e2e-sharded

@ntnn ntnn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just two comments, thanks for adding the docs!

Comment on lines +33 to +34
- The `migration.kcp.io` API is bound in the workspace where you want to create the
`LogicalClusterMigration` resource (typically the parent of the workspace being migrated)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- The `migration.kcp.io` API is bound in the workspace where you want to create the
`LogicalClusterMigration` resource (typically the parent of the workspace being migrated)
- The `migration.kcp.io` API is bound in the workspace where you want to create the `LogicalClusterMigration` resource

I wouldn't give a recommendation where to bind the API. I can see e.g. an operator that rebalances shards to get a workspaces to themselves just for LogicalClusterMigrations or admins manually creating them in the root workspace, ...

server
- The `migration.kcp.io` API is bound in the workspace where you want to create the
`LogicalClusterMigration` resource (typically the parent of the workspace being migrated)
- No other migration is currently in progress for the same logical cluster

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- No other migration is currently in progress for the same logical cluster

The process ensures that only one LCM affects an LC - if an LCM for an LC in migration is created it is placed into a failstate.
Though we should have a test for that, I don't think we do at the moment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I added a ticket for that test #4255

Comment on lines +39 to +48
The migration proceeds through several phases:

| Phase | Description |
|-------|-------------|
| `Preparing` | Origin shard marks the logical cluster as migrating, cancels active connections, and purges informer caches |
| `Migrating` | Destination shard pulls all etcd data from the origin via the migration virtual workspace |
| `OriginCleanup` | Origin shard deletes all etcd data belonging to the logical cluster |
| `DestinationFinalize` | Destination shard removes the migration annotation and updates informers |
| `Completed` | Migration finished successfully |
| `Failed` | Migration encountered an unrecoverable error |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it'd be better to just link the doc.go in the logicalclustermigration package, iirc @SimonTheLeg is already adding some more phases for defensiveness.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yup there will be new phases introduced. So probably makes the most sense

@ntnn ntnn added this to tbd Jul 10, 2026
@ntnn ntnn moved this to Reviewing in tbd Jul 10, 2026
xrstf added 2 commits July 13, 2026 10:48
On-behalf-of: @SAP christoph.mewes@sap.com

Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
On-behalf-of: @SAP christoph.mewes@sap.com

Signed-off-by: Christoph Mewes <christoph@kubermatic.com>

@ntnn ntnn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/approve

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 61ee331eea2f66297e06c6959271d549065facc6

@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ntnn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2026
@xrstf

xrstf commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@xrstf

xrstf commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@xrstf

xrstf commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@kcp-ci-bot
kcp-ci-bot merged commit ff4c335 into kcp-dev:main Jul 15, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewing to Done in tbd Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: logical cluster migration docs

4 participants