mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #11284 from zexi/glance-s3-image-check-status
fix(glance): add option of s3 image status check
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis/image"
|
||||
"yunion.io/x/onecloud/pkg/image/drivers/s3"
|
||||
"yunion.io/x/onecloud/pkg/image/options"
|
||||
"yunion.io/x/onecloud/pkg/util/procutils"
|
||||
)
|
||||
|
||||
@@ -159,7 +160,7 @@ func (s *S3Storage) GetImage(imagePath string) (int64, io.ReadCloser, error) {
|
||||
}
|
||||
|
||||
func (s *S3Storage) IsCheckStatusEnabled() bool {
|
||||
return false
|
||||
return options.Options.S3CheckImageStatus
|
||||
}
|
||||
|
||||
func (s *S3Storage) RemoveImage(fileName string) error {
|
||||
|
||||
@@ -44,12 +44,13 @@ type SImageOptions struct {
|
||||
|
||||
StorageDriver string `help:"image backend storage" default:"local" choices:"s3|local"`
|
||||
|
||||
S3AccessKey string `help:"s3 access key"`
|
||||
S3SecretKey string `help:"s3 secret key"`
|
||||
S3Endpoint string `help:"s3 endpoint"`
|
||||
S3UseSSL bool `help:"s3 access use ssl"`
|
||||
S3BucketName string `help:"s3 bucket name" default:"onecloud-images"`
|
||||
S3MountPoint string `help:"s3fs mount point" default:"/opt/cloud/workspace/data/glance/s3images"`
|
||||
S3AccessKey string `help:"s3 access key"`
|
||||
S3SecretKey string `help:"s3 secret key"`
|
||||
S3Endpoint string `help:"s3 endpoint"`
|
||||
S3UseSSL bool `help:"s3 access use ssl"`
|
||||
S3BucketName string `help:"s3 bucket name" default:"onecloud-images"`
|
||||
S3MountPoint string `help:"s3fs mount point" default:"/opt/cloud/workspace/data/glance/s3images"`
|
||||
S3CheckImageStatus bool `help:"Enable s3 check image status"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user