diff options
Diffstat (limited to 'docs/how-to/migration-scripts/run-migration-analysis.sh')
| -rwxr-xr-x | docs/how-to/migration-scripts/run-migration-analysis.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/how-to/migration-scripts/run-migration-analysis.sh b/docs/how-to/migration-scripts/run-migration-analysis.sh index 65d9d17..b2ca142 100755 --- a/docs/how-to/migration-scripts/run-migration-analysis.sh +++ b/docs/how-to/migration-scripts/run-migration-analysis.sh | |||
| @@ -548,6 +548,34 @@ run_phase_4() { | |||
| 548 | return 0 | 548 | return 0 |
| 549 | fi | 549 | fi |
| 550 | 550 | ||
| 551 | # Validate service name before running Phase 4 | ||
| 552 | # Structured logging only exists in ngit-grasp, not ngit-relay | ||
| 553 | if [[ "$SERVICE_NAME" == *"ngit-relay"* ]]; then | ||
| 554 | log_error "SERVICE_NAME appears to be ngit-relay: $SERVICE_NAME" | ||
| 555 | log_error "" | ||
| 556 | log_error "Phase 4 requires an ngit-grasp service with structured logging." | ||
| 557 | log_error "Structured logging ([PARSE_FAIL], [PURGATORY_EXPIRED]) only exists" | ||
| 558 | log_error "in ngit-grasp services, NOT in ngit-relay services." | ||
| 559 | log_error "" | ||
| 560 | log_error "Please update --service to use the ngit-grasp archive service." | ||
| 561 | log_error "" | ||
| 562 | log_error "To find the correct service name:" | ||
| 563 | log_error " systemctl list-units 'ngit-grasp*' --all" | ||
| 564 | log_error "" | ||
| 565 | log_error "Common ngit-grasp service names:" | ||
| 566 | log_error " - ngit-grasp.service" | ||
| 567 | log_error " - ngit-grasp-relay-ngit-dev.service (NixOS multi-instance)" | ||
| 568 | log_error " - ngit-grasp-archive.service" | ||
| 569 | return 1 | ||
| 570 | fi | ||
| 571 | |||
| 572 | # Warn if service name doesn't look like ngit-grasp | ||
| 573 | if [[ "$SERVICE_NAME" != *"ngit-grasp"* && "$SERVICE_NAME" != *"grasp"* ]]; then | ||
| 574 | log_warn "SERVICE_NAME doesn't contain 'ngit-grasp': $SERVICE_NAME" | ||
| 575 | log_warn "Structured logging only exists in ngit-grasp services." | ||
| 576 | log_warn "If this is not an ngit-grasp service, Phase 4 will find no logs." | ||
| 577 | fi | ||
| 578 | |||
| 551 | local cmds=() | 579 | local cmds=() |
| 552 | 580 | ||
| 553 | cmds+=("'$SCRIPT_DIR/30-extract-parse-failures.sh' '$SERVICE_NAME' '$OUTPUT_DIR/logs'") | 581 | cmds+=("'$SCRIPT_DIR/30-extract-parse-failures.sh' '$SERVICE_NAME' '$OUTPUT_DIR/logs'") |