7.2.2. Command-line options for Image service caching
You can use the glance client to manage cached images. Because image cache is local to each node, you must perform cache operations on each node locally. If your Red Hat OpenStack Services on OpenShift (RHOSO) deployment has high availability with three, five, or seven controllers, then you specify the host address by using the --os-image-url option when running cache operations.
Example:
$ glance --os-image-url=<image_url> cache-list
-
Replace
<image_url>with the URL for your image, for example"http://REPLICA""0.{REPLICA}""0.REPLICA""0.DOMAIN:9292", whereREPLICAis aglanceAPIreplica that does not own the data andDOMAINis the service hostname associated with a specificglanceAPI.
If you have cachemanage middleware enabled, you can use the glance-cache-manage program to manage cached images. You can run the glance-cache-manage program from a different host than the host that contains the image cache.
| Command | Description |
|---|---|
|
| Queue an image for immediate caching. |
|
| List all images that are currently cached. |
|
| Delete one or more cached images or images that are queued for caching from the cache directory. |
|
| Remove all cached images and images that are queued for caching from the cache directory. |
|
| Remove all cached images from the cache directory. |
|
| Remove all images that are queued for caching from the cache directory. |
| Command | Description |
|---|---|
|
| List all images that are currently cached on a specific host. |
|
| List all images that are currently queued for caching on a specific host. |
|
| Queue an image for caching on a specific host. |
|
| Delete an image from the cache or cache queue of a specific host. |
|
| Remove all images from the cache on a specific host. |
|
| Deleted an image from the cache queue on a specific host. |
|
| Deleted all images from the cache queue on a specific host. |