Skip to content

Validate attached volume types for cross-HV resize - #657

Open
anokfireball wants to merge 2 commits into
stable/2023.2-m3from
fix/cross-hv-attached-volume-type-check
Open

Validate attached volume types for cross-HV resize#657
anokfireball wants to merge 2 commits into
stable/2023.2-m3from
fix/cross-hv-attached-volume-type-check

Conversation

@anokfireball

@anokfireball anokfireball commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

Cross-HV resize supports only FCD-backed Cinder volumes at this time.

This change uses the newly introduced [cross_hv] fcd_volume_type to validate all attached Cinder volumes during cross-HV resize. Nova now rejects the resize if any attached volume does not use the configured FCD volume type. This covers:

  • BFV instances
  • Image-backed instances with attached Cinder volumes

Same-HV resize behavior does not change. We currently only have one FCD volume type.

Change-Id: I6103d68443bb422ad203a44c3145bdb8c1632379
@anokfireball
anokfireball force-pushed the fix/cross-hv-attached-volume-type-check branch from 3e72d93 to b4046dd Compare August 21, 2026 09:33
@anokfireball
anokfireball marked this pull request as ready for review August 24, 2026 08:51
bdms = self._get_bdms()
return bdms.root_bdm()

def _get_cross_hv_expected_volume_type(self):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we cache the result? Volume types should be basically static and I don't think we should rely on the configured volume type becoming available after we rolled out Nova.

@anokfireball anokfireball Aug 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. The first successful lookup is now cached for all successive operations. This also allows implicit retries in case initial lookups fail (e.g. cinder down).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there private data that could be available to a non-admin token if the first lookup is by an admin token?
Would it make sense to limit the cached data to id and name, because that's the only attributes we care about? (minimal less memory, mitigating the first concern - future use-cases will have to explicitly add some attributes)

get_cross_hv_expected_volume_type() called get_all_volume_types() on
every cross-HV resize attempt. A missing configured type would start
working silently once an operator created the type, without a restart.

Add a conductor-process cache in ComputeTaskManager. The first
successful get_all_volume_types() call stores the result for the
process lifetime. A Cinder failure is not cached so a later resize
can retry. The cache is intentionally permanent until restart so
that a misconfigured type cannot silently become valid after
deployment.

Pass the cache accessor into MigrationTask as get_volume_types_fn.
The task falls back to a direct Cinder call when the function is
not supplied, keeping all existing task tests unchanged.

Change-Id: Ie913bc97311e014c6e4bb068df868fb64b7e4ddc
@anokfireball
anokfireball force-pushed the fix/cross-hv-attached-volume-type-check branch from 1cef125 to a4ad370 Compare August 28, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants