Skip to content

Commit

Permalink
Merge branch 'main' into fix-spelling-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jfantinhardesty committed Sep 13, 2023
2 parents a4922c9 + a4f576d commit ac59e0a
Show file tree
Hide file tree
Showing 78 changed files with 5,274 additions and 907 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
## 2.0.5 (WIP)
## 2.1.0 (WIP)
**Features**
- Added support for ARM64 architecture.
- Block cache component added to support faster serial reads of large files with prefetching of blocks
- As of now only one file single threaded read is faster
- Only read-only mounts will support block-cache
- Adaptive prefetching to support random reads without incurring extra network cost
- Block cache with disk backup to reduce network cost if same blocks are read again
- On AML compute cluster MSI authentication is now supported (this will use the identity assigned to compute cluster)

**Bug Fixes**
- Fix to evict the destination file from local cache post rename file operation.
- If `$PATH` is not populated correctly, find out correct path for `du` command.
- Disable `kernel_cache` and `writeback_cache` when `direct_io` is set.
- Fix FUSE CLI parameter parsing, where CLI overrides parameters provided in config file.
- [#1226](https://github.com/Azure/azure-storage-fuse/issues/1226) If max disk-cache size is not configured, check the available disk space to kick-in early eviction.
- [#1230](https://github.com/Azure/azure-storage-fuse/issues/1230) Truncate file locally and then upload instead of downloading it again.

## 2.0.5 (2023-08-02)
**Features**
- In case of MSI based authentication, user shall provide object-id of the identity and honour-acl flag for file-system to work with ACLs assigned to the given identity instead of permissions.
- Added support to read OAuth token from a user given file.
Expand All @@ -19,6 +37,7 @@
- Added new config parameter 'refresh-sec' in 'file-cache'. When file-cache-timeout is set to a large value, this field can control when to refresh the file if file in container has changed.
- Added FUSE option `direct_io` to bypass the kernel cache and perform direct I/O operations.


**Bug Fixes**
- [#1116](https://github.com/Azure/azure-storage-fuse/issues/1116) Relative path for tmp-cache is resulting into file read-write failure.
- [#1151](https://github.com/Azure/azure-storage-fuse/issues/1151) Reason for unmount failure is not displayed in the console output.
Expand Down
33 changes: 33 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -18545,4 +18545,37 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
limitations under the License.






****************************************************************************

============================================================================
>>> github.com/vibhansa-msft/tlru
==============================================================================

MIT License

Copyright (c) 2023 Vikas Bhansali

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------- END OF THIRD PARTY NOTICE --------------------------------
377 changes: 239 additions & 138 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion azure-pipeline-templates/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
- task: ShellScript@2
inputs:
scriptPath: "${{ parameters.work_dir }}/go_installer.sh"
args: "${{ parameters.root_dir }}/ 1.20.5"
args: "${{ parameters.root_dir }}/"
displayName: "Installing Go tools"

# Installing Cloudfuse Dependencies via go get
Expand Down
12 changes: 2 additions & 10 deletions azure-pipeline-templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,11 @@ steps:
displayName: 'Libfuse Setup'
condition: eq('${{ parameters.hostedAgent }}', true)
# GoTool task used only for Microsoft Hosted Agents to install Go-lang
- task: GoTool@0
inputs:
version: '1.20.5'
condition: ${{ parameters.hostedAgent }}
displayName: "GoTool Setup"

# Alternative custom script for Self-Hosted agents to install Go-lang
# Custom script to install Go-lang
- task: ShellScript@2
inputs:
scriptPath: "${{ parameters.working_directory }}/go_installer.sh"
args: "${{ parameters.root_dir }}/ 1.20.5"
condition: not(${{parameters.hostedAgent }})
args: "${{ parameters.root_dir }}/"
displayName: "GoTool Custom Setup"

# Downloading Go dependency packages
Expand Down
150 changes: 150 additions & 0 deletions azure-pipeline-templates/cloudfuse-ci-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
parameters:
- name: fuselib
type: string
- name: tags
type: string
- name: container
type: string
- name: skip_msi
type: string
default: "true"
- name: proxy_address
type: string
default: ""
- name: skip_fmt
type: boolean
default: true

steps:
- checkout: self

- task: GoTool@0
inputs:
version: '1.20.5'
displayName: "Select Go Version"

# Install fuse and build the code
- script: |
sudo apt-get update --fix-missing
sudo apt-get install ${{ parameters.fuselib }} gcc -y
displayName: 'Install libfuse'
- task: Go@0
inputs:
command: 'build'
workingDirectory: ./
arguments: "-tags ${{ parameters.tags }} -o cloudfuse"
displayName: "Build"

- script: |
cnfFile=$HOME/azuretest.json
echo $cnfFile
touch $cnfFile
echo "{" > $cnfFile
echo "\"block-acct\"": "\"$(AZTEST_BLOCK_ACC_NAME)\"", >> $cnfFile
echo "\"adls-acct\"": "\"$(AZTEST_ADLS_ACC_NAME)\"", >> $cnfFile
echo "\"block-cont\"": "\"${{ parameters.container }}\"", >> $cnfFile
echo "\"adls-cont\"": "\"${{ parameters.container }}\"", >> $cnfFile
echo "\"block-key\"": "\"$(AZTEST_BLOCK_KEY)\"", >> $cnfFile
echo "\"adls-key\"": "\"$(AZTEST_ADLS_KEY)\"", >> $cnfFile
echo "\"block-sas\"": "\"$(AZTEST_BLOCK_SAS)\"", >> $cnfFile
echo "\"block-cont-sas-ubn-18\"": "\"$(AZTEST_BLOCK_CONT_SAS_UBN_18)\"", >> $cnfFile
echo "\"block-cont-sas-ubn-20\"": "\"$(AZTEST_BLOCK_CONT_SAS_UBN_20)\"", >> $cnfFile
echo "\"adls-sas\"": "\"$(adlsSas)\"", >> $cnfFile
echo "\"msi-appid\"": "\"$(AZTEST_APP_ID)\"", >> $cnfFile
echo "\"msi-resid\"": "\"$(AZTEST_RES_ID)\"", >> $cnfFile
echo "\"msi-objid\"": "\"$(AZTEST_OBJ_ID)\"", >> $cnfFile
echo "\"spn-client\"": "\"$(AZTEST_CLIENT)\"", >> $cnfFile
echo "\"spn-tenant\"": "\"$(AZTEST_TENANT)\"", >> $cnfFile
echo "\"spn-secret\"": "\"$(AZTEST_SECRET)\"", >> $cnfFile
echo "\"skip-msi\"": "${{ parameters.skip_msi }}", >> $cnfFile
echo "\"proxy-address\"": "\"${{ parameters.proxy_address }}\"" >> $cnfFile
echo "}" >> $cnfFile
cat $cnfFile
displayName: "Create Configuration File"
continueOnError: false
workingDirectory: ./
- script: |
cnfFile=$HOME/s3test.json
echo $cnfFile
touch $cnfFile
echo "{" > $cnfFile
echo "\"bucket-name\"": "\"$(S3TEST_BUCKET_NAME)\"", >> $cnfFile
echo "\"access-key\"": "\"$(S3TEST_ACCESS_KEY)\"", >> $cnfFile
echo "\"secret-key\"": "\"$(S3TEST_SECRET_KEY)\"", >> $cnfFile
echo "\"endpoint\"": "\"$(S3TEST_ENDPOINT)\"", >> $cnfFile
echo "\"region\"": "\"$(S3TEST_REGION)\"" >> $cnfFile
echo "}" >> $cnfFile
cat $cnfFile
displayName: "Create S3 Configuration File"
continueOnError: false
workingDirectory: ./
# Code lint checks (Static-analysis)
# Exit code changed to prevent failing in CI/CD pipeline
# TODO: Remove this once we are passing file coverage checks consistently
- script: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
$(go env GOPATH)/bin/golangci-lint --version
$(go env GOPATH)/bin/golangci-lint run --tests=false --build-tags ${{ parameters.tags }} --skip-dirs test,common/stats_collector,common/stats_monitor --max-issues-per-linter=0 --skip-files component/libfuse/libfuse2_handler_test_wrapper.go,component/libfuse/libfuse_handler_test_wrapper.go > lint.log
result=$(cat lint.log | wc -l)
if [ $result -ne 0 ]; then
echo "-----------------------------------"
echo "Below issues are found in SA"
cat lint.log
echo "-----------------------------------"
exit 0
else
echo "-----------------------------------"
echo "No issues are found in SA"
echo "-----------------------------------"
fi
displayName: 'Static Analysis (Lint)'
condition: always()
workingDirectory: ./
# Copyright checks
# - script: |
# result=$(grep -L -r --include \*.go "`date +%Y` Microsoft Corporation" ./ | wc -l)
# if [ $result -ne 0 ]; then
# exit 1
# else
# echo "Copyright statements are up to date"
# fi
# displayName: 'Copyright check'
# condition: always()
# failOnStderr: true
# workingDirectory: ./

# Go code formatting checks
- script: |
gofmt -s -l -d . | tee >&2
displayName: 'Go Format Check'
condition: eq(${{ parameters.skip_fmt }}, true)
failOnStderr: true
workingDirectory: ./
# Notices files check
- script: |
./notices_fix.sh
result=$(git diff NOTICE | wc -l)
if [ $result -ne 0 ]; then
echo "Notices needs a fix. Run ./notices_fix.sh and commit NOTICE file."
exit 1
else
echo "Notices are up to date."
fi
displayName: 'Notice file check'
condition: always()
failOnStderr: true
workingDirectory: ./
# Running unit tests for fuse3 on ubn-20
- task: Go@0
inputs:
command: 'test'
arguments: '-v -timeout=2h ./... --tags=unittest,${{ parameters.tags }} -coverprofile utcover.cov'
workingDirectory: ./
displayName: 'Unit tests'
continueOnError: false
118 changes: 118 additions & 0 deletions azure-pipeline-templates/e2e-tests-block-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
parameters:
- name: conf_template
type: string
- name: config_file
type: string
- name: container
type: string
- name: temp_dir
type: string
- name: mount_dir
type: string
- name: idstring
type: string
- name: adls
type: boolean
- name: account_name
type: string
- name: account_key
type: string
- name: account_type
type: string
- name: account_endpoint
- name: distro_name
type: string
- name: quick_test
type: boolean
default: true
- name: verbose_log
type: boolean
default: false
- name: clone
type: boolean
default: false
- name: stream_direct_test
type: boolean
default: false

steps:
- script: |
$(WORK_DIR)/blobfuse2 gen-test-config --config-file=$(WORK_DIR)/testdata/config/azure_key.yaml --container-name=${{ parameters.container }} --temp-path=${{ parameters.temp_dir }} --output-file=${{ parameters.config_file }}
displayName: 'Create Config File for RW mount'
env:
NIGHTLY_STO_ACC_NAME: ${{ parameters.account_name }}
NIGHTLY_STO_ACC_KEY: ${{ parameters.account_key }}
ACCOUNT_TYPE: ${{ parameters.account_type }}
ACCOUNT_ENDPOINT: ${{ parameters.account_endpoint }}
VERBOSE_LOG: ${{ parameters.verbose_log }}
continueOnError: false
- script:
cat ${{ parameters.config_file }}
displayName: 'Print config file'

- template: 'mount.yml'
parameters:
working_dir: $(WORK_DIR)
mount_dir: ${{ parameters.mount_dir }}
temp_dir: ${{ parameters.temp_dir }}
prefix: ${{ parameters.idstring }}
mountStep:
script: |
$(WORK_DIR)/blobfuse2 mount ${{ parameters.mount_dir }} --config-file=${{ parameters.config_file }} --default-working-dir=$(WORK_DIR) --file-cache-timeout=3200
- script: |
for i in {1,2,3,4,5,6,7,8,9,10,20,30,50,100,200,1024,2048,4096}; do echo $i; done | parallel --will-cite -j 5 'head -c {}M < /dev/urandom > ${{ parameters.mount_dir }}/myfile_{}'
ls -l ${{ parameters.mount_dir }}/myfile_*
displayName: 'Generate data'
- script: |
md5sum ${{ parameters.mount_dir }}/myfile_* > $(WORK_DIR)/md5sum_file_cache.txt
displayName: 'Generate md5Sum with File-Cache'
- script: |
$(WORK_DIR)/blobfuse2 unmount all
displayName: 'Unmount RW mount'
- script: |
$(WORK_DIR)/blobfuse2 gen-test-config --config-file=$(WORK_DIR)/testdata/config/azure_key_bc.yaml --container-name=${{ parameters.container }} --temp-path=${{ parameters.temp_dir }} --output-file=${{ parameters.config_file }}
displayName: 'Create Config File for RO mount'
env:
NIGHTLY_STO_ACC_NAME: ${{ parameters.account_name }}
NIGHTLY_STO_ACC_KEY: ${{ parameters.account_key }}
ACCOUNT_TYPE: ${{ parameters.account_type }}
ACCOUNT_ENDPOINT: ${{ parameters.account_endpoint }}
VERBOSE_LOG: ${{ parameters.verbose_log }}
continueOnError: false
- template: 'mount.yml'
parameters:
working_dir: $(WORK_DIR)
mount_dir: ${{ parameters.mount_dir }}
temp_dir: ${{ parameters.temp_dir }}
prefix: ${{ parameters.idstring }}
ro_mount: true
mountStep:
script: |
$(WORK_DIR)/blobfuse2 mount ${{ parameters.mount_dir }} --config-file=${{ parameters.config_file }} --default-working-dir=$(WORK_DIR) -o ro
- script: |
md5sum ${{ parameters.mount_dir }}/myfile_* > $(WORK_DIR)/md5sum_block_cache.txt
displayName: 'Generate md5Sum with Block-Cache'
- script: |
$(WORK_DIR)/blobfuse2 unmount all
displayName: 'Unmount RO mount'
- script: |
diff $(WORK_DIR)/md5sum_block_cache.txt $(WORK_DIR)/md5sum_file_cache.txt
if [ $? -ne 0 ]; then
exit 1
fi
displayName: 'Compare md5Sum'
- template: 'cleanup.yml'
parameters:
working_dir: $(WORK_DIR)
mount_dir: ${{ parameters.mount_dir }}
temp_dir: ${{ parameters.temp_dir }}
4 changes: 4 additions & 0 deletions azure-pipeline-templates/mount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ parameters:
- name: prefix
type: string
default: 'Test'
- name: ro_mount
type: boolean
default: false

steps:

Expand Down Expand Up @@ -42,5 +45,6 @@ steps:
timeoutInMinutes: 30
displayName: '${{ parameters.prefix }}: PreStart Cleanup'
continueOnError: true
condition: eq( ${{ parameters.ro_mount }}, false )
env:
mount_dir: ${{ parameters.mount_dir }}
Loading

0 comments on commit ac59e0a

Please sign in to comment.