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

Symlinks not working when mounting HNS-enabled blob storage usind ADLS #1243

Closed
jlabhard-sg opened this issue Sep 12, 2023 · 4 comments · Fixed by #1283
Closed

Symlinks not working when mounting HNS-enabled blob storage usind ADLS #1243

jlabhard-sg opened this issue Sep 12, 2023 · 4 comments · Fixed by #1283
Assignees
Milestone

Comments

@jlabhard-sg
Copy link

Which version of blobfuse was used?

2.1.1-preview.1

Which OS distribution and version are you using?

Ubuntu 22.04

If relevant, please share your mount command.

sudo blobfuse2 mount ${mount_dir} --config-file="/etc/blobfuse_${storage_container}_config.yml --use-adls=true"

Config:

allow-other: true

# Logger configuration
logging:
  type: base
  level: log_debug
  file-path: '/.blobfuse2.log'
  max-file-size-mb: 512
  file-count: 10
  track-time: true

# Pipeline configuration. Choose components to be engaged. The order below is the priority order that needs to be followed.
components:
  - libfuse
  - stream
  - attr_cache
  - azstorage

# Libfuse configuration
libfuse:
  default-permission: '0666'
  attribute-expiration-sec: 120
  entry-expiration-sec: 120
  negative-entry-expiration-sec: 240

# Streaming configuration
stream:
  # If block-size-mb, blocks-per-file or cache-size-mb are 0, the stream component will not cache blocks.
  block-size-mb: 8
  max-buffers: 3
  buffer-size-mb: 512

# Attribute cache related configuration
attr_cache:
  timeout-sec: 7200

# Azure storage configuration
azstorage:
# Required
  type: adls
  account-name: ${storage_account}
  container: ${storage_container}
  endpoint: https://${storage_account}.blob.core.windows.net/
  # Optional
  block-size-mb: 16
  max-concurrency: 32
  mode: spn
  tenantid: ${tenantid}
  clientid: ${clientid}
  clientsecret: ${clientsecret}

# Health Monitor configuration
health_monitor:
  output-path: /var/log/
  enable-monitoring: true
  stats-poll-interval-sec: 10
  process-monitor-interval-sec: 30
  # list of monitors to be disabled
  monitor-disable-list:
    - cpu_profiler
    - memory_profiler

What was the issue encountered?

The symlinks are not mounted. The name of the files appear but do no redirect to anything, readlink is empty, and cd returns Error: Not a directory.
Creating a symlink in the mounted directory after mounting also does not create a symlink, only a filename that appears when listing the directory.
Mounting the same storage using NFS instead of blobfuse does mount the symlinks.
Mounting another storage with HNS-disabled storage account using type: block does mount symlinks

Have you found a mitigation/solution?

Not using blobfuse.

Please share logs if available.

The mount is successful so there is no error log, but the symlinks don't work.

@vibhansa-msft
Copy link
Member

Can you try out the same test case with file-cache instead of stream. Just want to pin point where the issue is.

@jlabhard-sg
Copy link
Author

I tried using file-cache, but I have the same issue. With the following configuration:


# Logger configuration
logging:
  type: base
  level: log_debug
  file-path: '/.blobfuse2.log'
  max-file-size-mb: 512
  file-count: 10
  track-time: true

# Pipeline configuration. Choose components to be engaged. The order below is the priority order that needs to be followed.
components:
  - libfuse
  - file_cache
  - attr_cache
  - azstorage

libfuse:
  attribute-expiration-sec: 120
  entry-expiration-sec: 120
  negative-entry-expiration-sec: 240

file_cache:
  path: ${HOME}/tempcache
  timeout-sec: 120
  max-size-mb: 4096

# Attribute cache related configuration
attr_cache:
  timeout-sec: 7200

# Azure storage configuration
azstorage:
# Required
  type: adls
  account-name: ${storage_account}
  container: ${storage_container}
  endpoint: https://${storage_account}.blob.core.windows.net/
  # Optional
  block-size-mb: 16
  max-concurrency: 32
  mode: spn
  tenantid: ${tenantid}
  clientid: ${clientid}
  clientsecret: ${clientsecret}

# Health Monitor configuration
health_monitor:
  output-path: /var/log/
  enable-monitoring: true
  stats-poll-interval-sec: 10
  process-monitor-interval-sec: 30
  # list of monitors to be disabled
  monitor-disable-list:
    - cpu_profiler
    - memory_profiler

@vibhansa-msft
Copy link
Member

How were these symlinks created on the container? If you have used blobfuse to create those you will see a meta property in the blobs that helps blobfuse to identify the file as a symlink. Can you share the listing output on shell for the similar files.

@souravgupta-msft
Copy link
Member

@jlabhard-sg, we have fixed this bug in the PR #1283. It will be part of our next release.

To have symlink working in ADLS accounts, you can either,

  • Set no-symlinks: false in the config file under attr_cache section.
  • Or, pass the flag --no-symlinks=false in the mount command.

I also do want to point out that for ADLS accounts, if you're enabling symlink support, it can impact the directory list performance. By default, symlink is disabled for ADLS accounts.

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

Successfully merging a pull request may close this issue.

4 participants