[Bug 2149798] Re: EC2 metadata ami-id returns wrong value in multi-cell deployments with centralized nova-metadata

Shi Yan 2149798 at bugs.launchpad.net
Wed Apr 22 23:51:42 UTC 2026


Sorry reported the bug in the wrong queue. Have changed the bug report
to invalid.

** Changed in: nova (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to nova in Ubuntu.
https://bugs.launchpad.net/bugs/2149798

Title:
  EC2 metadata ami-id returns wrong value in multi-cell deployments with
  centralized nova-metadata

Status in nova package in Ubuntu:
  Invalid

Bug description:
  ------
  Description

    In a Nova cells v2 deployment using centralized nova-metadata
  (local_metadata_per_cell=False), the ami-id returned at
  169.254.169.254/latest/meta-data/ami-id is incorrect when the same
  Glance image is used across multiple cells.

  ------
  Root Cause

    glance_id_to_id() in nova/objects/ec2.py is decorated with @memoize,
  which caches results using only the Glance UUID as the cache key:

    key = "%s:%s" % (func.__name__, reqid)
    # → "glance_id_to_id:<glance-uuid>"

    In a multi-cell deployment, each cell has its own independent
  s3_images table with its own auto-increment sequence. The same Glance
  image UUID maps to different integer IDs in different cells. The
  memoize cache contains no cell context, so whichever cell is queried
  first populates the cache for all subsequent requests — regardless of
  which cell the requesting instance lives in.

  ------
  Steps to Reproduce

    1. Deploy Nova with cells v2 and centralized nova-metadata
    2. Boot instances using the same Glance image in at least two different cells
    3. From each instance, run:
    curl http://169.254.169.254/latest/meta-data/ami-id
    4. Both instances return the same ami-id even though their cells' s3_images.id values for that UUID differ

  ------
  Actual Behaviour

    All instances sharing the same Glance image UUID receive the ami-id
  of whichever cell first populated the memoize cache, regardless of
  which cell they belong to. And the value could change when the cache
  is expired or reset.

  ------
  Environment

  - Nova 2024.1(2025.1 and master has the same code)
  - Cells v2 with multiple cells
  - Centralized nova-metadata (local_metadata_per_cell=False)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nova/+bug/2149798/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list