Skip to content

resizeVolume with automigrate throws NullPointerException when the migration returns no volume #14751

Open

Description

@bhouse-nexthop

problem

resizeVolume with automigrate=true throws a NullPointerException when the volume has to move to another pool and migrateVolume returns no volume.

step code
migration result volume = (result != null) ? _volsDao.findById(result.getId()) : null;
error built in the try volume.getUuid() on a null volume
error built in the catch volume.getUuid() again, so the NPE escapes

migrateVolume returns null on the VM work-job path when the job result is not a volume id.

changeOfferingForVolume has the same block. It does not NPE, but its message prints volume: null and names suitableStoragePools.get(0) instead of the pool that was tried.

versions

4.22 (the same code is on main).

The steps to reproduce the bug

  1. Resize a volume attached to a VM so that its pool lacks space, with automigrate=true.
  2. Have the migrate job finish without returning a volume id.
  3. The API returns a NullPointerException instead of a migration error.

What to do about it?

Keep the original volume reference for the message, report the pool that was actually tried, and keep the migration failure as the cause.

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

    resizeVolume with automigrate=true throws an NPE when migrateVolume returns no volume. The result is null-checked, but both the try and catch error messages call volume.getUuid() on the null volume, so the NPE escapes. changeOfferingForVolume has the same block, which prints volume: null and names the wrong pool.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug NPE in error handling replaces a migration error
    Component component:storage Volume resize and migration path
    Severity Severity:Minor Wrong error returned; no data loss reported
    Labels type:bug, component:storage, Severity:Minor Based on the issue text and the reporter's code references
    Coding agent Suitable Fix is specified: keep the original volume reference, report the pool tried, keep the migration failure as cause

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: resize an attached volume where its pool lacks space, with automigrate=true, and make the migrate job finish without a volume id.
    • Fix changeOfferingForVolume in the same change, as the reporter notes.

    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