lablup / lablup/backend.ai

Create migration script for legacy etcd configuration

Open
#7,464 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Motivation

With the new configuration system introduced in version 25.8, etcd keys have changed from legacy prefix (`/sorna/local/config/...`) to new prefix (`/sorna/ai/backend/config/manager/...`). The legacy prefix is **not watched** by the config watcher, so configurations stored there won't trigger automatic reload. A migration script is needed to help administrators transition existing deployments to the new format.

## Objective

Create a migration script to migrate legacy etcd configurations to the new format, enabling live configuration updates for existing deployments.

## Details

### Migration Script Requirements

1. Read all configurations from legacy etcd paths
1. Transform keys to the new prefix format
1. Write configurations to new etcd paths
1. Support dry-run mode to preview changes without applying
1. Provide verbose output showing migration progress

### Key Mapping Examples

- `config/redis/addr` → `ai/backend/config/manager/redis/addr`
- `config/manager/...` → `ai/backend/config/manager/...`

### Safety Features

- Backup option before migration
- Validation of migrated configurations
- Rollback capability in case of errors
- Skip already-migrated keys option

## Impact

- Administrators can seamlessly transition existing deployments from legacy to new configuration format
- Enables live configuration reload functionality for migrated settings
- Reduces manual work and potential errors during configuration migration

JIRA Issue: BA-3469

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.