Browse Source

Limit etcd migration to swact actions

Currently the etcd migration will take place whenever
upgrade_swact_migration.py is called. Typically this is called during a
swact as part of etcd start. However the script can also be called
during etcd restart, which occurs as part of activating secured etcd.

The solution is to limit the etcd migration to controller-0. This will
ensure the action will only be taken during the swact to controller-0.

Closes-Bug: 1927508
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
Change-Id: I893eeaa7ddb0b600baa051498a30ed737c688151
changes/85/790085/1
David Sullivan 2 months ago
parent
commit
37d348ae6d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      controllerconfig/controllerconfig/scripts/upgrade_swact_migration.py

+ 5
- 0
controllerconfig/controllerconfig/scripts/upgrade_swact_migration.py View File

@ -10,6 +10,7 @@
import os
import shutil
import socket
import subprocess
import sys
import yaml
@ -73,6 +74,10 @@ def migrate_etcd_on_swact():
UPGRADE_ETCD_FILE)
return
if socket.gethostname() != 'controller-0':
LOG.info("Skipping etcd migration, not running on controller-0")
return
with open(UPGRADE_ETCD_FILE, 'r') as f:
document = yaml.safe_load(f)


Loading…
Cancel
Save