Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure advanced config option 'access_tier' appears to be case sensitive #5943

Open
fstuff opened this issue Jan 24, 2022 · 3 comments
Open

Azure advanced config option 'access_tier' appears to be case sensitive #5943

fstuff opened this issue Jan 24, 2022 · 3 comments

Comments

@fstuff
Copy link

@fstuff fstuff commented Jan 24, 2022

The associated forum post URL from https://forum.rclone.org

https://forum.rclone.org/t/azure-advanced-config-option-access-tier-appears-to-be-case-sensitive/28801/4

What is the problem you are having with rclone?

When configuring an Azure Blob Storage remote, interacting with the remote while 'access_tier' is set to "archive" fails. When 'access_tier' is set to "Archive", the same interaction appears to work.

What is your rclone version (output from rclone version)

$ rclone version
rclone v1.57.0
- os/version: ubuntu 18.04 (64 bit)
- os/kernel: 4.15.0-166-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.2
- go/linking: static
- go/tags: none

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

$ uname -s -r -v -p -i 
Linux 4.15.0-166-generic #174-Ubuntu SMP Wed Dec 8 19:07:44 UTC 2021 x86_64 x86_64

Which cloud storage system are you using? (e.g. Google Drive)

Azure Blob Storage

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

With the following config,

[AzureHomestackBackup]
type = azureblob
account = [redacted]
key = [redacted]
access_tier = archive

Results in this:

$ rclone lsd AzureHomestackBackup:
2022/01/22 20:57:43 Failed to create file system for "AzureHomestackBackup:": Azure Blob: Supported access tiers are Hot, Cool and Archive
$ rclone ls AzureHomestackBackup:/
2022/01/22 20:57:52 Failed to create file system for "AzureHomestackBackup:/": Azure Blob: Supported access tiers are Hot, Cool and Archive

While this:

[AzureHomestackBackup]
type = azureblob
account = [redacted]
key = [redacted]
access_tier = Archive

Results in this:

$ rclone ls AzureHomestackBackup:/
$ rclone lsd AzureHomestackBackup:/
          -1 2022-01-22 15:43:05        -1 homestack-backup

IMHO either the backend should handle access_tier options in a case insensitive manner, or at the config step invalid values (i.e., 'archive') should result in an error.

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
@ncw
Copy link
Member

@ncw ncw commented Jan 25, 2022

I think this is a bug and we should fix it.

It should be very easy to fix - do you want to have a go @fstuff ?

@fstuff
Copy link
Author

@fstuff fstuff commented Jan 29, 2022

I submitted a PR, but I wanted to mention that I was surprised that there appears to be no input validation at all for config options. It's admittedly a larger project, but implementing input validation might be valuable.

@ncw
Copy link
Member

@ncw ncw commented Jan 29, 2022

Thank you for the PR.

Input validation is hard in general and specifically keeping it up to date with the cloud in questions. Usually we leave it to the SDK or the cloud provider unless it is really important.

Are there any specific cases you think could be improved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants