Changing glance backend from file to nfs

asked 2019-12-29 02:26:14 -0600

osstreak gravatar image

Hello,

I have a production openstack (rocky) deployed using openstack-ansible (the environment is yet to be used for prod). Most of the configuration matches https://docs.openstack.org/openstack-ansible/rocky/user/prod/example.html (https://docs.openstack.org/openstack-...) except that I did not deploy cinder service & used file as the backend for glance.

The openstack deployment went through fine without any errors. And I can provision the VM's (from glance images stored as files) as well.

I am planning to change the glance backend to nfs using openstack-ansilbe. I have tried modifying my openstack_user_config.yml file by adding glance_nfs_client in image_hosts for all my infra hosts. When I run the os-glance-install.yml with these changes the playbook runs fine. And the glance container mounts the nfs mount from server:remote_path on to local_path just fine, however when I create/import a new qcow2 image glance still uses /var/lib/glance/images instead of the local_path (the nfs mount) to store the images. Am I missing something ? Any pointers will be greatly appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-01-08 21:43:45 -0600

osstreak gravatar image

Tried a few things:

  1. Destroyed the glance container & recreated it with nfs options in openstack_user_config.yml, no luck. Glance still used /var/lib/glance/images instead of local_path (from openstack_user_config.yml). This is a bit odd (and possibly a bug in glance playbook ?) since I would expect the glance playbook to reconfigure filesystem_store_datadir which did not happen even after recreating the container.

  2. Manually changed the filesystem_store_datadir entries in glance-api.conf on all glance containers (its a 3 infra node cluster) & restarted all glance containers. This worked. All glance imported images are now appearing in the nfs storage.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2019-12-29 02:26:14 -0600

Seen: 175 times

Last updated: Dec 29 '19