Skip to content

Parametrize data source table for virtual routetrs to support migration #6220

@synergiator

Description

@synergiator

In a enterprise migration scenario, you could face a situation to restart hundreds of routers which may cause issues with operation of enterprise service like plannable downtime window, even if you split restart by zones.

The included scripted tool setup/bindir/cloud-sysvmadm sources routers list from the table cloud.vm_instance.

Possibly, there are many possible approaches how to establish partial batches if there are many routers.

For example:

  • Source alternatively from an external text file instead of direct DB connection
  • Parametrize table name allowing cloning subsets to temporary data tables in the DB
  • Provide a short list of router ID/names to restart individually

Here are some code lines how we implemented a parameter for an alternate table name, and it worked for us.

table="vm_instance"
..
while getopts 'sarhnvd:m:u:p:t:T:l:z:' OPTION
  T)	table="$OPTARG"
  		;;
  l)	LOGFILE="$OPTARG"
 ..

stop_start_system() {
secondary=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from $table ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions