The Glance image service is the OpenStack service used to manage virtual machine images. By default, it runs on controller nodes.
The Glance service uses the local file system to store virtual
machine images and is not, by default, configured for high
availability (HA). To enable HA for Glance, you can use a shared
file system, such as NFS, mounted on
/var/lib/glance on each Glance node.
Alternatively, you can deploy Glance to a single node. This avoids any HA issues with file-based storage, though it also means that Glance is not HA-enabled. To deploy Glance to a single node, create a group which contains only Glance, and add one host to that group.
The glance_api container mounts the
/var/lib/glance directory on the host and
uses it to store virtual machine images. To provide for high
availability, you can mount a shared file system on
/var/lib/glance on each Glance host.
You must ensure that the file system is mounted before the
Glance containers are started because the Docker daemon does not
wait for file systems to be mounted before it starts the
containers. You can configure systemd to
check that a file system is mounted before starting the Docker
service. For example, if you have added an entry to
/etc/fstab to mount an NFS file system at boot
time, perform the following steps:
Configure
systemdto mount the NFS file system before starting thedockerservice.Create the drop-in file
/etc/systemd/system/docker.service.d/nfs.confwith the following content:[Unit] After=remote-fs.target
Reload
systemdmanager configuration.# systemctl daemon-reload
Restart the
dockerservice.# systemctl restart docker.service

