Skip to content

Change disk offering migrates and resizes a volume twice on main #14759

Open

Description

@bhouse-nexthop

problem

On main, VolumeApiServiceImpl.changeDiskOfferingForVolumeInternal runs its last block twice in a row. The block is the no-op check, then the migrate step, then the resize step.

effect on main
offering change needs a migration volume is migrated twice. The second target comes from the pool list computed before the first move.
offering change needs a resize volume is resized twice
4.22 not affected, the block is there once
4.23.0.0 affected (the release contains 82bfa9f)

Cause: merge 82bfa9f ("Merge branch '4.22'"). 9c0c8da on 4.22 wrapped the method body in a reservation try/finally. The merge kept main's re-indented copy and also 4.22's copy below it.

versions

main (24.0.0-SNAPSHOT) since 82bfa9f. 4.22 is not affected.

The steps to reproduce the bug

  1. Volume on pool A. Disk offering B whose tags only match pool B.
  2. changeOfferingForVolume id=<vol> diskofferingid=<B> automigrate=true
  3. migrateVolume runs twice. The second run picks again from the stale pool list.

What to do about it?

Delete the second copy. Keep the first, which has main's newer messages from bc76f20 (#12367).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions