Glance pods fail with "Datacenter reference cannot be None"
search cancel

Glance pods fail with "Datacenter reference cannot be None"

book

Article ID: 321689

calendar_today

Updated On:

Products

VMware Integrated OpenStack

Issue/Introduction

Symptoms:
  • Glance store service can not run and can not be restarted
# kubectl -n openstack get pods -w | grep glance
glance-api-697479f8b7-fzq2f               1/2     CrashLoopBackOff   6    12m
glance-bootstrap-4b9qv                    0/1     CrashLoopBackOff    5    4m11s
glance-vmw-replicator-7c88f7b7d5-9mjv5    0/1     CrashLoopBackOff    6    12m
  • Glance-api pod shows the error:
#oslog glance-api-697479f8b7-fzq2f -c glance-api | grep -i error
2019-11-27 14:30:19.026 1 DEBUG glance_store.capabilities [-] Store glance_store._drivers.vmware_template.Store doesn't support updating dynamic storage capabilities. Please overwrite 'update_capabilities' method of the store to implement updating logics if needed. update_capabilities /usr/lib/python2.7/site-packages/glance_store/capabilities.py:97
ERROR: Datacenter reference cannot be None


Environment

7.x

Cause

  • Datastore was renamed in vCenter after VIO deployment
  • Datacenter was renamed in vCenter after VIO deployment

Resolution

  1. Verify the name of the datastore to match vCenter
For example
#kubectl -n openstack get glance.vio.vmware.com glance1 -o yaml | grep -i datastore
vmware_datastores: DC:nfs_datastore2:100
Note: The format of vmware_datastores is <datacenter name>:<datastore name>:100
  1. Edit glance configuration with the correct datastore name
#kubectl -n openstack edit glance glance1
...
   backends:
      vmware0:
        vmware_datastores: DC:nfs_datastore1:100
....
  1. Observe changes with status ContainerCreating and check glance log
#kubectl -n openstack get pods -w  
#kubectl logs -n openstack glance-api-697479f8b7-fzq2f glance-api -f