Skip to content

Commit

Permalink
Disable Glance web-download by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kayrus committed Jun 16, 2021
1 parent 46e666e commit 8388ce8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Here comes cyclone (**C**loud **Clone** or cclone) to help you with this task. I

## Help

By default the tool uses a Glance V2 [web-download](https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html#image-import-methods) method to clone images. This method allows Glance to download an image using a remote URL. Set the `--image-web-download` option to **false** to use the default download/upload method. In this case the whole image data will be streamed through cyclone.
By default Glance image data will be streamed through cyclone and the traffic will be consumed on the execution side. To enable the Glance V2 [web-download](https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html#image-import-methods) method, set the `--image-web-download` flag. This method allows Glance to download an image using a remote URL. It is not recommended to use **web-download** method for images bigger than 1-10GiB, since Glance service will try to download the image to its intermediate local storage and may cause insufficient disk space error.

A remote URL can be generated using a Swift [Temporary URL](https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html).

Expand Down Expand Up @@ -45,7 +45,7 @@ Available Commands:
Flags:
-d, --debug print out request and response objects
-h, --help help for cyclone
--image-web-download use Glance web-download image import method (default true)
--image-web-download use Glance web-download image import method
-n, --no assume "no" to all questions
--timeout-backup string timeout to wait for a backup status (default "24h")
--timeout-image string timeout to wait for an image status (default "24h")
Expand Down Expand Up @@ -79,11 +79,9 @@ $ cyclone image 77c125f1-2c7b-473e-a56b-28a9a0bc4787 --to-region eu-de-2 --to-pr

### Clone an image between regions using download/upload method

Pay attention that the image data will be streamed through cyclone. It is recommended to use this method, when cyclone is executed directly on the VM, located in the source or destination region.

```sh
$ source openrc-of-the-source-project
$ cyclone image 77c125f1-2c7b-473e-a56b-28a9a0bc4787 --to-region eu-de-2 --to-project destination-project-name --to-image-name image-from-source-project-name --image-web-download=false
$ cyclone image 77c125f1-2c7b-473e-a56b-28a9a0bc4787 --to-region eu-de-2 --to-project destination-project-name --to-image-name image-from-source-project-name
```

### Clone a bootable volume between regions
Expand Down
2 changes: 1 addition & 1 deletion pkg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func initRootCmdFlags() {
RootCmd.PersistentFlags().StringP("timeout-server", "", "24h", "timeout to wait for a server status")
RootCmd.PersistentFlags().StringP("timeout-snapshot", "", "24h", "timeout to wait for a snapshot status")
RootCmd.PersistentFlags().StringP("timeout-backup", "", "24h", "timeout to wait for a backup status")
RootCmd.PersistentFlags().BoolP("image-web-download", "", true, "use Glance web-download image import method")
RootCmd.PersistentFlags().BoolP("image-web-download", "", false, "use Glance web-download image import method")
viper.BindPFlag("debug", RootCmd.PersistentFlags().Lookup("debug"))
viper.BindPFlag("yes", RootCmd.PersistentFlags().Lookup("yes"))
viper.BindPFlag("no", RootCmd.PersistentFlags().Lookup("no"))
Expand Down

0 comments on commit 8388ce8

Please sign in to comment.