Image Download Fails With 504 Gateway Timeout

Problem

When attempting to download an image from Image service, the operation fails with a 504 Gateway Time-out error.

Command
Copy

Environment

  • Image Service
  • Private Cloud Director Virtualization - v2025.4 and Higher
  • Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher

Cause

The active Image Library node was not using the shared NFS mount for the image directory; instead, it was using local storage.

As a result, when an image stored on the shared NFS was requested via the API endpoint on the image library node, failed to retrieve the image, leading to the 504 timeout error.

Diagnostics

  1. Verify the image status and ID:
Command
Copy
  1. Check the Image service endpoint configuration:
Command
Copy

Confirm that the IP-Address mentioned in the IMAGE-ENDPOINT-URL should belong to the correct Image Library node

  1. Confirm if the image file exists:
Image (Glance) Node
Copy

Image not found locally. However, the image found on another Image Library node.

  1. Check the mount status of the "images" directory on the Image node:
Image (Glance) Node
Copy

/etc/fstab has no NFS entry for the image directory. Whereas the other Image Library node has the NFS entry.

The below glance-api log is visible only to Self-Hosted PCD-V environments. For SaaS environments, reach out to the Platform9 support team for further assistance.

  1. Log confirmation from glance-apilog:
Management Plane
Copy

Resolution

Perform the following steps on the Image Library node:

New image creation will be halted during this procedure. Perform during a maintenance window.

  1. Stop Image Library API service to prevent new image operations:
Image (Glance) Node
Copy
  1. Backup the existing local image directory:
Image (Glance) Node
Copy
  1. Create a new directory for NFS mount and set correct permissions:
Image (Glance) Node
Copy
  1. Update /etc/fstab with the correct NFS share entry:
Image (Glance) Node
Copy
  1. Mount all file systems:
Image (Glance) Node
Copy
  1. Verify that the mount is active:
Image (Glance) Node
Copy
Expected output
Copy
  1. Sync old local images (if any) to the NFS mount:
Image (Glance) Node
Copy
  1. Restart the Image Library service:
Image (Glance) Node
Copy
  1. Validate image access:

Attempt to download the image again:

Command
Copy
  1. (Optional) After validation, remove the old directory to free up space:
Image (Glance) Node
Copy

Additional Information

  • Ensure all Image Library nodes are configured consistently with the same NFS mount points for /var/lib/glance/images and /opt/data/instances.
  • This issue commonly occurs after a node rebuild or reconfiguration, where /etc/fstab entries may have been lost or skipped.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard