-
Notifications
You must be signed in to change notification settings - Fork 8
Reorg sync #355
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
base: main
Are you sure you want to change the base?
Reorg sync #355
Conversation
removed config from device was not removed from running config, due to the path attribute of the sync not being maintained
the synctree lock was not properly returned in some error cases
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
PR #355 Test Results - Reorg Sync (Issue #366 Resolution)Date: 2026-01-09 Executive Summary✅ PR #355 SUCCESSFULLY RESOLVES Issue #366 (datastores not recreated after config-server crash/restart) Key Findings:
Test EnvironmentInfrastructure
Network Devices
Sync Configuration
Build ProcessDocker Image Build (Critical: Architecture Mismatch Caught)Initial Attempt (FAILED): docker build -t data-server:reorg-sync .
# ERROR: exec format error (ARM64 binary on x86_64 KinD)Corrected Build (SUCCESS): docker buildx build --platform linux/amd64 -t data-server:reorg-sync-amd64 --load .
# Image: sha256:80a16324736f61e403fe624c8221394194efecc65c18f3185024849f1812a8d6
# Size: 44MBLesson Learned: When building on ARM64 host (macOS M1/M2/M3) for x86_64 KinD cluster, always specify Deployment# Load image into KinD cluster
kind load image-archive /tmp/data-server-reorg-sync-amd64.tar --name arista-lab
# Update deployment
kubectl set image deployment/config-server data-server=data-server:reorg-sync-amd64 -n sdc
kubectl patch deployment config-server -n sdc --type=json \
-p='[{"op":"add","path":"/spec/template/spec/containers/1/imagePullPolicy","value":"Never"}]'
# Result: deployment "config-server" successfully rolled out
# Pod status: 2/2 Running, 0 restartsTest ExecutionPre-Restart BaselineBefore simulating Issue #366: $ kubectl get targets -n sdc
NAME READY REASON PROVIDER VERSION
leaf-1 True srl.nokia.sdcio.dev 24.10.1
leaf-1-arista True eos.arista.sdcio.dev 4.34.1F
leaf-2 True srl.nokia.sdcio.dev 24.10.1
leaf-2-arista True eos.arista.sdcio.dev 4.34.1F
spine-1 True srl.nokia.sdcio.dev 24.10.1
spine-1-arista True eos.arista.sdcio.dev 4.34.1F
spine-2 True srl.nokia.sdcio.dev 24.10.1All 7 targets: READY=True ✅ Restart Simulation (Issue #366 Test)Simulated crash: $ kubectl delete pod config-server-7c9dc9ff54-d797z -n sdc
pod "config-server-7c9dc9ff54-d797z" deleted
# Kubernetes automatically recreated pod
$ kubectl get pods -n sdc
NAME READY STATUS RESTARTS AGE
config-server-7c9dc9ff54-ggzd2 2/2 Running 0 45sPost-Restart Results (CRITICAL TEST)Immediate check (30s after pod restart): $ kubectl get targets -n sdc
NAME READY REASON PROVIDER VERSION
leaf-1 True srl.nokia.sdcio.dev 24.10.1
leaf-1-arista True eos.arista.sdcio.dev 4.34.1F
leaf-2 True srl.nokia.sdcio.dev 24.10.1
leaf-2-arista True eos.arista.sdcio.dev 4.34.1F
spine-1 True srl.nokia.sdcio.dev 24.10.1
spine-1-arista True eos.arista.sdcio.dev 4.34.1F
spine-2 True srl.nokia.sdcio.dev 24.10.1✅ RESULT: All 7 targets returned to READY=True automatically! No manual intervention required:
RunningConfig Sync ValidationNokia SR Linux Targets (SUCCESS)$ for target in spine-1 spine-2 leaf-1 leaf-2; do
kubectl get runningconfig $target -n sdc -o jsonpath='{.status.value}' | wc -c
done
spine-1 (Nokia): 29652 bytes ✅
spine-2 (Nokia): 29652 bytes ✅
leaf-1 (Nokia): 29647 bytes ✅
leaf-2 (Nokia): 29647 bytes ✅Sample config content (spine-1): status:
value:
acl:
acl-filter:
- entry:
- action: accept
description: Accept incoming ICMP unreachable messages
interface:
- name: ethernet-1/1
admin-state: enable
[... full 29KB config ...]Arista cEOS Targets (EXPECTED LIMITATION)$ for target in spine-1-arista leaf-1-arista leaf-2-arista; do
kubectl get runningconfig $target -n sdc -o jsonpath='{.status.value}' | wc -c
done
spine-1-arista (Arista): 2 bytes (empty: {})
leaf-1-arista (Arista): 2 bytes (empty: {})
leaf-2-arista (Arista): 2 bytes (empty: {})Note: Arista targets show empty RunningConfig due to Issue #372 (schema parsing error), which is unrelated to PR #355's scope. PR #355 focuses on datastore recreation, not schema fixes. Logs Analysisdata-server Container (PR #355)Datastore creation logs (all 7 targets): {"time":"2026-01-09T19:48:52Z","level":"INFO","msg":"new deviation client","datastore-name":"sdc.spine-1","logger":"datastore"}
{"time":"2026-01-09T19:48:52Z","level":"INFO","msg":"new deviation client","datastore-name":"sdc.spine-2","logger":"datastore"}
{"time":"2026-01-09T19:48:52Z","level":"INFO","msg":"new deviation client","datastore-name":"sdc.leaf-1","logger":"datastore"}
{"time":"2026-01-09T19:48:52Z","level":"INFO","msg":"new deviation client","datastore-name":"sdc.leaf-2","logger":"datastore"}
{"time":"2026-01-09T19:48:52Z","level":"INFO","msg":"new deviation client","datastore-name":"sdc.spine-1-arista","logger":"datastore"}
{"time":"2026-01-09T19:48:52Z","level":"INFO","msg":"new deviation client","datastore-name":"sdc.leaf-1-arista","logger":"datastore"}
{"time":"2026-01-09T19:48:52Z","level":"INFO","msg":"new deviation client","datastore-name":"sdc.leaf-2-arista","logger":"datastore"}GetIntent queries (proving datastores operational): {"time":"2026-01-09T19:48:56Z","level":"INFO","msg":"GetIntent","intent-datastore":"sdc.spine-1","intent-name":"running"}
{"time":"2026-01-09T19:48:56Z","level":"INFO","msg":"GetIntent","intent-datastore":"sdc.spine-1-arista","intent-name":"running"}
[... all 7 targets queried successfully ...]config-server ContainerDeviation processing (indicating active sync): {"time":"2026-01-09T19:54:28Z","level":"INFO","message":"target device deviations","controller":"TargetDataStoreController","req":{"Name":"spine-1"},"devs":746}
{"time":"2026-01-09T19:54:57Z","level":"INFO","message":"target device deviations","controller":"TargetDataStoreController","req":{"Name":"leaf-2"},"devs":746}Nokia targets: 746 deviations detected (healthy sync activity) Comparison: Before vs After PR #355
Technical InsightsKey PR #355 Features Validated
Architecture Mismatch (Critical Catch)Problem: Building on ARM64 host (macOS M1/M2) produces incompatible binary for x86_64 KinD. Impact: Without correct architecture, deployment would have failed silently with CrashLoopBackOff. RecommendationsFor SDC Team
For Users
ConclusionPR #355 (Reorg Sync) SUCCESSFULLY RESOLVES Issue #366. Test verdict: ✅ PASS Evidence:
Recommendation: APPROVE for merge to main branch. Appendix: Reproduction StepsFor SDC community members wanting to reproduce this test: # 1. Clone data-server repo
git clone https://github.com/sdcio/data-server.git
cd data-server
git checkout reorgSync
# 2. Build for correct architecture
docker buildx build --platform linux/amd64 -t data-server:reorg-sync-amd64 --load .
# 3. Load into KinD cluster
kind load image-archive <(docker save data-server:reorg-sync-amd64) --name <cluster-name>
# 4. Update deployment
kubectl set image deployment/config-server data-server=data-server:reorg-sync-amd64 -n sdc
kubectl patch deployment config-server -n sdc --type=json \
-p='[{"op":"add","path":"/spec/template/spec/containers/1/imagePullPolicy","value":"Never"}]'
# 5. Wait for rollout
kubectl rollout status deployment/config-server -n sdc
# 6. Verify targets READY
kubectl get targets -n sdc
# 7. Simulate crash (Issue #366 test)
kubectl delete pod -n sdc -l app.kubernetes.io/name=config-server
# 8. Wait 30s and verify auto-recovery
sleep 30
kubectl get targets -n sdc
# Expected: All targets READY=True without manual intervention
# 9. Validate RunningConfig sync
kubectl get runningconfig <target-name> -n sdc -o jsonpath='{.status.value}' | wc -cTest conducted by: Lab Kubenet Team |
No description provided.