Skip to content

Improve volume format log output when using encryption #6347

@aidigy-com

Description

@aidigy-com

What would you like to be added:

The community edition requires that both the RSA encryption key and its passphrase are provided manually. Yet, it may fail silently to enable the encryption, and the log output is misleading if the credentials are not passed correctly (e.g. using a secret for the CSI driver mounting it). While it reads like it is encrypted:

2025/09/07 00:30:55.140033 juicefs[7] <INFO>: Volume is formatted as {
  "Name": "my-fs",
  "UUID": "ffffffff-ffff-ffff-ffff-ffffffffffff",
  "Storage": "s3",
  "Bucket": "http://minio.my-platform.svc.cluster.local:9000/my-bucket",
  "AccessKey": "my-access-key",
  "SecretKey": "removed",
  "BlockSize": 4096,
  "Compression": "none",
  "EncryptAlgo": "aes256gcm-rsa",
  "KeyEncrypted": true,
  "TrashDays": 1,
  "MetaVersion": 1,
  "MinClientVersion": "1.1.0-A",
  "DirStats": true,
  "EnableACL": false
} [[email protected]:564]

And even when the encryption is configured correctly, also the only difference in logs where "EncryptKey": "removed", appears, is not as obvious as it could be.

Hence, it would be better if format fails with error and/or the log output clearly states that encryption is in place or not, e.g. with "Encrypted": false,.

Why is this needed:

Avoiding false assumptions on enabled encryption and simplifying debugging if encryption is not working as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions