Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Resolving CVMFS Setup Issues for Neurodesk on WSL2

Tech May 12 3

Package Installation

Install the required dependencies and the CVMFS client:

sudo apt-get update && sudo apt-get install -y lsb-release
curl -O https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
sudo dpkg -i cvmfs-release-latest_all.deb
rm -f cvmfs-release-latest_all.deb
sudo apt-get update
sudo apt-get install -y build-essential cvmfs

For Ubuntu 24.04, specific library versions might be required to resolve compatibility issues:

sudo apt-get install -y libattr1=1:2.5.2-1build1 libuuid1=2.39.3-9ubuntu6

Client Configuration

Create the directory structure for the repository keys and add the public key for the ARDC domain:

sudo mkdir -p /etc/cvmfs/keys/ardc.edu.au/
sudo tee /etc/cvmfs/keys/ardc.edu.au/neurodesk.ardc.edu.au.pub > /dev/null <<'EOF'
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwUPEmxDp217SAtZxaBep
Bi2TQcLoh5AJ//HSIz68ypjOGFjwExGlHb95Frhu1SpcH5OASbV+jJ60oEBLi3sD
qA6rGYt9kVi90lWvEjQnhBkPb0uWcp1gNqQAUocybCzHvoiG3fUzAe259CrK09qR
pX8sZhgK3eHlfx4ycyMiIQeg66AHlgVCJ2fKa6fl1vnh6adJEPULmn6vZnevvUke
I6U1VcYTKm5dPMrOlY/fGimKlyWvivzVv1laa5TAR2Dt4CfdQncOz+rkXmWjLjkD
87WMiTgtKybsmMLb2yCGSgLSArlSWhbMA0MaZSzAwE9PJKCCMvTANo5644zc8jBe
NQIDAQAB
-----END PUBLIC KEY-----
EOF

Define the repository parameters by writing the configuration file:

sudo bash -c 'cat > /etc/cvmfs/config.d/neurodesk.ardc.edu.au.conf <<EOF
CVMFS_USE_GEOAPI=yes
CVMFS_SERVER_URL="http://cvmfs-geoproximity.neurodesk.org/cvmfs/@fqrn@;http://cvmfs.neurodesk.org/cvmfs/@fqrn@;http://s1osggoc-cvmfs.openhtc.io:8080/cvmfs/@fqrn@;http://s1fnal-cvmfs.openhtc.io:8080/cvmfs/@fqrn@;http://s1sampa-cvmfs.openhtc.io:8080/cvmfs/@fqrn@;http://s1brisbane-cvmfs.openhtc.io/cvmfs/@fqrn@;http://s1nikhef-cvmfs.openhtc.io/cvmfs/@fqrn@;http://s1bnl-cvmfs.openhtc.io/cvmfs/@fqrn@;http://s1perth-cvmfs.openhtc.io/cvmfs/@fqrn@"
CVMFS_KEYS_DIR="/etc/cvmfs/keys/ardc.edu.au/"
EOF'

Establish the default local settings, including the repository list and initial direct connection:

sudo bash -c 'cat > /etc/cvmfs/default.local <<EOF
CVMFS_REPOSITORIES=neurodesk.ardc.edu.au
CVMFS_HTTP_PROXY=DIRECT
CVMFS_QUOTA_LIMIT=5000
EOF'
sudo cvmfs_config setup

Mounting and Validation

Explicitly mount the repository, as it does not auto-mount initially:

sudo mount -t cvmfs neurodesk.ardc.edu.au /cvmfs/neurodesk.ardc.edu.au
ls /cvmfs/neurodesk.ardc.edu.au/containers

If the ls command successfully lists the directory contents, the setup is complete. If an error occurs indicating the mount failed or CVMFS_HTTP_PROXY required, proceed with the troubleshooting steps below.

Troubleshooting Proxy Connectivity

When direct access fails, configure a local Squid proxy to handle requests.

sudo apt-get install -y squid

Edit the Squid configuration at /etc/squid/squid.conf to restrict access to necessary domains:

acl target_domains dstdomain .neurodesk.org .openhtc.io .cern.ch .gridpp.rl.ac.uk .opensciencegrid.org
http_port 3128
http_access allow target_domains
http_access allow localhost
http_access deny all
minimum_expiry_time 0
maximum_object_size 1024 MB
cache_mem 128 MB
maximum_object_size_in_memory 128 KB
cache_dir ufs /var/spool/squid 5000 16 256

Apply the Squid configuration and start the service:

sudo squid -k parse
sudo systemctl enable --now squid
sudo systemctl restart squid

Update the CVMFS default configuration to use the local proxy. Ensure no extraneous quotes or Windows carriage returns exist in the file:

sudo bash -c 'cat > /etc/cvmfs/default.local <<EOF
CVMFS_REPOSITORIES=neurodesk.ardc.edu.au
CVMFS_HTTP_PROXY=http://127.0.0.1:3128
CVMFS_QUOTA_LIMIT=5000
EOF'
sudo cvmfs_config reload

Verify the proxy setting is loaded for the specific repository. Note that cvmfs_config showconfig without a target repository will output nothing:

sudo cvmfs_config showconfig neurodesk.ardc.edu.au | grep HTTP_PROXY

Confirm network access through the proxy using curl:

curl -x http://127.0.0.1:3128 http://cvmfs-geoproximity.neurodesk.org/cvmfs/neurodesk.ardc.edu.au/.cvmfspublished

Resolving Public Key Permission Errors

If mounts continue to fail, check the system logs or autofs status. Errors like failed to open public key followed by immediate unmounting indicate a permission issue.

By default, writing keys via sudo might set overly restrictive permissions (e.g., 600), preventing the CVMFS cache manager from reading the public key. Adjust the permissions on the key directory and the key file itself:

sudo chmod 755 /etc/cvmfs/keys/ardc.edu.au
sudo chmod 644 /etc/cvmfs/keys/ardc.edu.au/neurodesk.ardc.edu.au.pub
sudo cvmfs_config reload

Confirm the configuration is valid and the mount point is accessible:

sudo cvmfs_config chksetup
ls /cvmfs/neurodesk.ardc.edu.au

A successful mount will display directories such as containers, neurocommand, neurodesk-modules, and neurodesktop. The host information can then be queried normally:

sudo cvmfs_talk -i neurodesk.ardc.edu.au host info
cvmfs_config stat -v neurodesk.ardc.edu.au

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.