GLANCE-SCRUBBER(1)
π NAME π
glance-scrubber β the Glance Scrubber Service, aka the little cleanup fairy that actually deletes your deleted images π
β¨ GLANCE SCRUB SERVICE β¨
okay so before we even get into it, here's the whole vibe-check card for this page:
- Author β OpenStack Glance Project Team π«Ά
- Contact β
<glance@lists.launchpad.net> - Date β
2025-04-02 - Copyright β OpenStack Foundation
- Version β
30.0.0 - Manual section β
1 - Manual group β cloud computing βοΈ
π¦ SYNOPSIS π¦
glance-scrubber [options]
π DESCRIPTION π
so glance-scrubber is this utility that lets an operator set Glance up for asynchronous deletion of images, or flip an image's status back from pending_delete to active. whether that even makes sense for your deployment is lowkey a whole question β it depends on the storage backend you're using and how big your typical images are in your Glance installation. like, your mileage genuinely varies β¨
so here's the tea: an image in glance is really two things β an image record (living in the database) and a file of image data (living in a storage backend). under normal operation, the image-delete call is synchronous, which means Glance gets the DELETE request, deletes the image data from the storage backend, then deletes the image record from the database, and finally returns a 204 as the result of the call. if the backend is fast and deletion time isn't a function of data size, all of this happens basically instantly, no notes π
BUT. for backends where deletion time is a function of data size, the image-delete operation can take a significant amount of time to complete β to the point where a client may timeout waiting for the response. and that, bestie, leads to user dissatisfaction π not the vibe.
to dodge this whole problem, Glance has a delayed_delete configuration option (False by default) that you can set in the glance-api.conf file. with this option enabled, when Glance receives a DELETE request, it only does the database part of the request β marking the image's status as pending_delete β and returns immediately. (btw the pending_delete status is not visible to users; an image-show request for such an image will return 404.) however!! important!! when delayed_delete is enabled, Glance does not delete image data from the storage backend. and that's exactly where the glance-scrubber comes in π§
the glance-scrubber cleans up images that have been deleted. if you run Glance with delayed_delete enabled, you must run the glance-scrubber occasionally or your storage backend will eventually fill up with "deleted" image data. fr fr, it will just keep hoarding π
the glance-scrubber can also revert a image to active if operators delete the image by mistake and the pending-delete is enabled in Glance. please make sure the glance-scrubber is not running before restoring the image to avoid image data inconsistency. like, actually. don't.
configuration of glance-scrubber is done in the glance-scrubber.conf file. options are explained in detail in comments in the sample configuration file, so we only point out a few of them here:
scrub_timeβ minimum time in seconds that an image will stay inpending_deletestatus (default is0)scrub_pool_sizeβ configures a thread pool so that scrubbing can be performed in parallel (default is1, that is, serial scrubbing)daemonβ a boolean indicating whether the scrubber should run as a daemon (default isFalse)wakeup_timeβ time in seconds between runs when the scrubber is run in daemon mode (ignored if the scrubber is not being run in daemon mode)metadata_encryption_keyβ If yourglance-api.confsets a value for this option (the default is to leave it unset), you must include the same setting in yourglance-scrubber.confor the scrubber won't be able to determine the locations of your image data. πrestoreβ reset the specified image's status from'pending_delete'to'active'when the image is deleted by mistake.[database]β As of the Queens release of Glance (16.0.0), theglance-scrubberdoes not use the deprecated Glance registry, but instead contacts the Glance database directly. Thus yourglance-scrubber.conffile must contain a[database]section specifying the relevant information.[glance_store]β This section of the file contains the configuration information for the storage backends used by your Glance installation.
the usual situation is that whatever your glance-api.conf has for the [database] and [glance_store] configuration groups should go into your glance-scrubber.conf, too. of course, if you have heavily customized your setup, you know better than we do what you are doing β main character energy, respect π«‘ the key thing is that the scrubber needs to be able to access the Glance database to determine what images need to be scrubbed (and to mark them as deleted once their associated data has been removed from the storage backend), and it needs the glance_store information so it can delete the image data.
π OPTIONS π
β¨ General options β¨
-h,--helpβ Show the help message and exit--versionβ Print the version number and exit-v,--verboseβ Print more verbose output--noverboseβ Disable verbose output-d,--debugβ Print debugging output (set logging level toDEBUGinstead of defaultWARNINGlevel)--nodebugβ Disable debugging output--use-syslogβ Use syslog for logging--nouse-syslogβ Disable the use of syslog for logging--syslog-log-facility SYSLOG_LOG_FACILITYβ syslog facility to receive log lines--config-dir DIRβ Path to a config directory to pull*.conffiles from. This file set is sorted, to provide a predictable parse order if individual options are over-ridden. The set is parsed after the file(s) specified via previous--config-file, arguments hence over-ridden options in the directory take precedence. This means that configuration from files in a specifiedconfig-dirwill always take precedence over configuration from files specified by--config-file, regardless to argument order.--config-file PATHβ Path to a config file to use. Multiple config files can be specified by using this flag multiple times, for example,--config-file <file1> --config-file <file2>. Values in latter files take precedence.--log-config-append PATH,--log-config PATHβ The name of logging configuration file. It does not disable existing loggers, but just appends specified logging configuration to any other existing logging options. Please see the Python logging module documentation for details on logging configuration files. Thelog-configname for this option is deprecated.--log-format FORMATβ Alogging.Formatterlog message format string which may use any of the availablelogging.LogRecordattributes. Default:None--log-date-format DATE_FORMATβ Format string for%(asctime)sin log records. Default:None--log-file PATH,--logfile PATHβ (Optional) Name of log file to output to. If not set, logging will go to stdout.--log-dir LOG_DIR,--logdir LOG_DIRβ (Optional) The directory to keep log files in (will be prepended to--log-file)-D,--daemonβ Run as a long-running process. When not specified (the default) run the scrub operation once and then exits. When specified do not exit and run scrub onwakeup_timeinterval as specified in the config.--nodaemonβ The inverse of--daemon. Runs the scrub operation once and then exits. This is the default.--restore <IMAGE_ID>β Restore the specified image status from'pending_delete'to'active'.
π FILES π
/etc/glance/glance-scrubber.confβ Default configuration file for the Glance Scrubber
π SEE ALSO π
- OpenStack Glance β
http://glance.openstack.org
π BUGS π
- Glance bugs are tracked in Launchpad so you can view current bugs at OpenStack Glance β
http://bugs.launchpad.net/glance
π Author π
OpenStack
π Copyright π
2010-present, OpenStack Foundation.
and that's the whole page bestie π«Ά the footer says33.0.0andSep 30, 2026, which is a different number than the30.0.0up in the version block β the manpage has two numbers and I am simply reporting both, no notes, I don't make the rules π anyways go run your scrubber, your storage backend will thank you β¨πΈ
π¦ where this page comes from
- ubuntu stonking: glance-common 2:33.0.0-0ubuntu1 Β· Apache-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms