Skip to content

Add additional features to the storage rebalancer

Nels Nelson requested to merge storage_rebalance_work into master

Additional features include -

  • Add a modular namespace
  • Support additional cli runtime arguments
  • Add application logging support
  • Support project statistics refresh job invocation
  • Support the appropriate use of the staging API
  • Support the listing of all available/known file storage nodes in the appropriate environment
  • Support rudimentary verification of project migration to a destination storage node

New usage:

Usage: /var/opt/gitlab/scripts/storage_rebalance.rb [options] --current-file-server <servername> --target-file-server <servername>
        --current-file-server=<SERVERNAME>
                                     Source storage node server
        --target-file-server=<SERVERNAME>
                                     Destination storage node server
    -d, --dry-run=[yes/no]           Show what would have been done; default: yes
        --list-nodes                 List all known repository storage nodes
    -r, --refresh-stats              Refresh all project statistics; WARNING: ignores --dry-run
    -N, --count                      How many projects are on current file server
    -m, --move-amount=<N>            Gigabytes of repo data to move; default: 0, or largest single repo if 0
    -w, --wait=<N>                   Timeout in seconds for migration completion; default: 10
    -V, --verify-only                Verify that projects have successfully migrated
    -f, --max-failures=<N>           Maximum failed migrations; default: 3
        --group=<GROUPNAME>          Filter projects by group
        --staging                    Use the staging environment
    -v, --verbose                    Increase logging verbosity
    -?, --help                       Show this message

TODO:

  • Add support for automatic clean-up.

Merge request reports