Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Lint/NonAtomicFileOperation:
Exclude:
- 'spec/support/integration/setup.rb'
- 'spec/unit/lib/cloud_controller/blobstore/client_shared.rb'
- 'spec/unit/lib/cloud_controller/blobstore/webdav/dav_client_spec.rb'

# Offense count: 15
# This cop supports unsafe autocorrection (--autocorrect-all).
Expand Down Expand Up @@ -581,7 +580,6 @@ Style/HashSlice:
- 'app/controllers/services/service_plans_controller.rb'
- 'app/presenters/system_environment/service_binding_presenter.rb'
- 'lib/cloud_controller/blobstore/storage_cli/storage_cli_blob.rb'
- 'lib/cloud_controller/blobstore/webdav/dav_blob.rb'
- 'lib/cloud_controller/telemetry_logger.rb'
- 'spec/unit/lib/cloud_controller/errands/rotate_database_key_spec.rb'

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ When deployed via capi-release only:

| Provider | `blobstore_type` | Backends | Notes |
|----------|------------------|-----------------------------------------------|-------|
| Storage CLI | `storage-cli` | S3, S3-compatible, GCS, Azure, Alibaba Cloud | |
| WebDAV | `webdav` | WebDAV servers | |
| Storage CLI | `storage-cli` | S3, S3-compatible, GCS, Azure, Alibaba Cloud, DAV | |
| Local | `local`, `local-temp-storage` | Filesystem, NFS | Development and testing only |

### Runtime
Expand Down
36 changes: 8 additions & 28 deletions config/bosh-lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,48 +122,28 @@ quota_definitions:
default_quota_definition: default

resource_pool:
blobstore_type: webdav
webdav_config:
blobstore_timeout: 5
public_endpoint: http://blobstore.bosh-lite.com
private_endpoint: https://blobstore.service.cf.internal:4443
username: blobstore-username
password: blobstore-password
blobstore_type: local
local_blobstore_path: /var/vcap/store/cloud_controller_ng/resource_pool
minimum_size: 65536
maximum_size: 536870912
resource_directory_key: bosh-lite.com-cc-resources

packages:
blobstore_type: webdav
webdav_config:
blobstore_timeout: 5
public_endpoint: http://blobstore.bosh-lite.com
private_endpoint: https://blobstore.service.cf.internal:4443
username: blobstore-username
password: blobstore-password
blobstore_type: local
local_blobstore_path: /var/vcap/store/cloud_controller_ng/packages
app_package_directory_key: bosh-lite.com-cc-packages
max_valid_packages_stored: 5
max_package_size: 1073741824

droplets:
blobstore_type: webdav
webdav_config:
blobstore_timeout: 5
public_endpoint: http://blobstore.bosh-lite.com
private_endpoint: https://blobstore.service.cf.internal:4443
username: blobstore-username
password: blobstore-password
blobstore_type: local
local_blobstore_path: /var/vcap/store/cloud_controller_ng/droplets
droplet_directory_key: bosh-lite.com-cc-droplets
max_staged_droplets_stored: 5

buildpacks:
blobstore_type: webdav
webdav_config:
blobstore_timeout: 5
public_endpoint: http://blobstore.bosh-lite.com
private_endpoint: https://blobstore.service.cf.internal:4443
username: blobstore-username
password: blobstore-password
blobstore_type: local
local_blobstore_path: /var/vcap/store/cloud_controller_ng/buildpacks
buildpack_directory_key: bosh-lite.com-cc-buildpacks

db_encryption_key: db-encryption-key
Expand Down
3 changes: 2 additions & 1 deletion decisions/0014-storage-clis-for-blobstore-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Cloud Controller previously used the fog gem family to interface with blobstores

The migration described in this ADR is complete. As a result:

- The `blobstore_provider` field accepts both native storage-cli type names AND the legacy WebDAV alias (`webdav` → `dav`)
- The `blobstore_provider` field accepts native storage-cli type names (azurebs, s3, gcs, alioss, dav)
- The legacy native WebDAV provider (`blobstore_type: webdav`) has been removed — use `blobstore_type: storage-cli` with `provider: dav` instead
- **Legacy fog provider names** (AzureRM, AWS, Google, aliyun) are **no longer supported** — use native storage-cli type names (azurebs, s3, gcs, alioss)
- ✅ Enabled the removal of all fog related gems — fog-aws, fog-core, fog-azure-rm, fog-google, and fog-aliyun have all been removed

Expand Down
21 changes: 3 additions & 18 deletions lib/cloud_controller/blobstore/client_provider.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'cloud_controller/blobstore/client'
require 'cloud_controller/blobstore/retryable_client'
require 'cloud_controller/blobstore/error_handling_client'
require 'cloud_controller/blobstore/webdav/dav_client'
require 'cloud_controller/blobstore/local/local_client'
require 'cloud_controller/blobstore/safe_delete_client'
require 'cloud_controller/blobstore/storage_cli/storage_cli_client'
Expand All @@ -17,8 +16,10 @@ def self.provide(options:, directory_key:, root_dir: nil, resource_type: nil)
provide_local(options, directory_key, root_dir, use_temp_storage: true)
when 'storage-cli'
provide_storage_cli(options, directory_key, root_dir, resource_type)
when 'webdav'
raise BlobstoreError.new("blobstore_type 'webdav' is no longer supported; use 'storage-cli' with provider 'dav'")
else
provide_webdav(options, directory_key, root_dir)
raise BlobstoreError.new("Unknown blobstore type: #{options[:blobstore_type].inspect}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change safe, so not breaking change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change safe, so not breaking change?

Yes, cf-deployment already uses storage-cli for DAV, not blobstore_type: webdav. The webdav Ruby code is being deleted anyway, so even if we kept the else branch pointing to provide_webdav, it would crash too, just with a worse error message. Raising a clear error is better than a confusing crash deep in deleted code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding something like: blobstore_type "webdav" is no longer supported;
use "storage-cli" with provider "dav".

end
end

Expand All @@ -42,22 +43,6 @@ def provide_local(options, directory_key, root_dir, use_temp_storage:)
Client.new(SafeDeleteClient.new(retryable_client, root_dir))
end

def provide_webdav(options, directory_key, root_dir)
client = DavClient.build(
options.fetch(:webdav_config),
directory_key,
root_dir,
options[:minimum_size],
options[:maximum_size]
)

logger = Steno.logger('cc.blobstore.dav_client')
errors = [StandardError]
retryable_client = RetryableClient.new(client:, errors:, logger:)

Client.new(SafeDeleteClient.new(retryable_client, root_dir))
end

def provide_storage_cli(options, directory_key, root_dir, resource_type)
client = StorageCliClient.new(
directory_key: directory_key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,6 @@ def cli_path
ENV['STORAGE_CLI_PATH'] || '/var/vcap/packages/storage-cli/bin/storage-cli'
end

def build_config(connection_config)
raise NotImplementedError
end

def tmpdir
VCAP::CloudController::Config.config.get(:directories, :tmpdir)
rescue StandardError
Expand Down
38 changes: 0 additions & 38 deletions lib/cloud_controller/blobstore/webdav/dav_blob.rb

This file was deleted.

Loading
Loading