1. 12 Sep, 2022 1 commit
  2. 09 Sep, 2022 4 commits
    • MVernon's avatar
      add --rebalance · ac314f08
      MVernon authored
      This lets us rebalance the rings without making any changes to device
      weights (useful because often a series of weight changes will result
      in rings that need rebalancing).
      Bug: T317409
    • MVernon's avatar
      Split tmpdir preparation into separate function (nfc) · 497708e8
      MVernon authored
      Make the process of creating tmpdir and populating it with rings into
      a separate function, so we can call it outside of run_srb.
      No functional change in this commit.
    • MVernon's avatar
      Merge branch '4%_tests' into 'main' · dfda4263
      MVernon authored
      Update tests to reflect gradual=0.04
      See merge request !5
    • MVernon's avatar
      Update tests to reflect gradual=0.04 · b9fd4f6e
      MVernon authored
      We're using this in prod, and it makes sense for the tests to reflect
      a 4% change not the 2% change we were using when we wrote the tests.
      No functional change.
  3. 27 Jul, 2022 3 commits
  4. 26 Jul, 2022 1 commit
    • MVernon's avatar
      Set back to 4% per change · 08bd7ee9
      MVernon authored
      We've adjust min_part_hours on ms clusters to 12h, so this is back to a full drain/load taking 12-13 days
  5. 19 May, 2022 1 commit
  6. 18 May, 2022 2 commits
    • MVernon's avatar
      increase fraction of move per step · ffe7a71b
      MVernon authored
      Currently, prod rings are only changeable every 24 hours, so at 0.02,
      that's 50 days for a change. We are moving towards more like 0.08/0.10
      (12.5/10 days), and 0.04 (25 days) is the first step, to check this
      remains non-disruptive.
    • MVernon's avatar
      update example hosts.yaml path · cea74549
      MVernon authored
  7. 25 Mar, 2022 1 commit
  8. 24 Mar, 2022 1 commit
    • MVernon's avatar
      Add -o/--out-dir argument · 6de07142
      MVernon authored
      We want to sometimes be able to put the new rings tarball somewhere
      other than swiftdir; add an optional CLI argument to do so.
  9. 23 Mar, 2022 1 commit
  10. 22 Mar, 2022 3 commits
  11. 11 Mar, 2022 2 commits
  12. 10 Mar, 2022 1 commit
    • MVernon's avatar
      Add a -s/--syslog option to log to syslog not stdout · e2f75dbb
      MVernon authored
      As part of deployment, we want an option to log to syslog (and be
      silent on stdout in normal operation, so not producing cron-mail).
      This doesn't change output when -s is not specified, tested on python
      2 and 3.
  13. 16 Feb, 2022 2 commits
    • MVernon's avatar
      Be pickier about what return codes are allowed · 2cb33cb7
      MVernon authored
      swift-ring-builder returns 1 (warning) incorrectly in a number of
      cases, including a number of unhandled exceptions e.g. because a
      builder file cannot be written.
      In practice, only with "rebalance" do we need to accept rc 1 for no
      change to a ring (swift-ring-builder set_weight that makes no change
      still returns 0); so be more restrictive except in that case.
    • MVernon's avatar
      Deployment, via making swiftdir/new_rings.tar.bz2 · 37993ebe
      MVernon authored
      The deployment approach is that a puppetmaster will periodically rsync
      new_rings.tar.bz2 from each swift_ring_manager host, and then deploy
      it to swift servers as rings.tar.bz2 (with suitable handling to untar
      this file into /etc/swift when it changes). The aim is to avoid any
      race conditions where e.g. .ring.bz and .builder files are deployed
      out of sync with each other.
      So deploy_rings() now tars up the .builder and .ring.gz files from
      tmpdir, and then renames the tarball into swiftdir (ensuring any
      readers will either get entirely the old rings or entirely the new
  14. 11 Feb, 2022 1 commit
    • MVernon's avatar
      Copy all rings to tmpdir, not just modified ones · fa33c008
      MVernon authored
      We are going to deploy via updating a tarball of all rings (rather
      than just coping modified rings around), so rather than just copying
      rings into tmpdir as we come to modify them instead copy all the rings
      into tmpdir at the point we are creating it (i.e. doing the first
      This means rebalance() will rebalance all rings, not just ones we've
      changed, but this is harmless - swift-ring-builder exits 1 and says
      its made no changes in this case, and that's OK.
  15. 11 Jan, 2022 1 commit
  16. 05 Jan, 2022 1 commit
    • MVernon's avatar
      Use a named tuple class for (weight,immediate); no functional change · 490f5df7
      MVernon authored
      Make the WeightChange class, which is a collections.namedtuple. This
      lets us access the weight and immediate members by name, making the
      code clearer. It also reduces some confusion in the previous code
      where (immediate[,weight]) was used for overrides and
      (weight,immediate) was used for desired weight changes (i.e. after
      applying those overrides).
      This change has been tested against the test suite on both python2 and
  17. 06 Dec, 2021 1 commit
  18. 02 Dec, 2021 1 commit
  19. 01 Dec, 2021 3 commits
  20. 30 Nov, 2021 2 commits
  21. 29 Nov, 2021 7 commits