Skip to content

changeOfferingForVolume does not reject the same custom offering and size (GiB/bytes mix-up) #14749

Open

Description

@bhouse-nexthop

problem

changeOfferingForVolume to the volume's current custom-size offering, with the same size, is not rejected.

step value
validateVolumeResizeWithNewDiskOfferingAndLoad converts the custom size from GiB to bytes
checkIfVolumeCanResizeWithNewDiskOffering compares volume.getSize() with newSize << 30, so bytes are shifted a second time
result the "Volume ... is already having disk offering ..." guard never matches for custom offerings; the request runs the full change path

versions

4.22 (the same code is on main).

The steps to reproduce the bug

  1. Create a data volume on a custom-size disk offering, 10 GiB.
  2. changeOfferingForVolume id=<vol> diskofferingid=<same offering> size=10.
  3. The call is accepted instead of being rejected as unchanged.

What to do about it?

Compare bytes with bytes. Only reject when min/max IOPS are also unchanged, so IOPS-only changes keep working, and leave compute-only offerings alone (their size is taken from the volume, and scale VM to the same custom service offering goes through this path).

Activity

  1. github-actions commented on Nov 24, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    changeOfferingForVolume to the same custom offering and size is not rejected. validateVolumeResizeWithNewDiskOfferingAndLoad converts GiB to bytes, then checkIfVolumeCanResizeWithNewDiskOffering shifts the size again, so the "already having disk offering" guard never matches for custom offerings.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug Same-offering guard never fires for custom-size offerings
    Component component:storage Volume disk offering change path
    Severity Severity:Minor Redundant change is accepted; no data loss reported
    Labels type:bug, component:storage, Severity:Minor Based on the issue text
    Coding agent Suitable Fix is specified: compare bytes with bytes, and leave IOPS-only and compute-only changes alone

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: create a data volume on a 10 GiB custom offering, then call changeOfferingForVolume with the same offering and size=10.
    • Also test the IOPS-only change path, which the reporter says must keep working.

    Generated by Daily Issue Triage · copilot · haiku55 · ~6 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
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