├── .agignore ├── icert ├── .gitignore ├── icertpkg │ └── Makefile ├── dummy_test.go ├── Makefile └── README.md ├── imgr ├── .gitignore ├── imgrpkg │ ├── Makefile │ └── impl.go ├── dummy_test.go ├── Makefile ├── mkmount.sh ├── dev.conf ├── imgr.conf └── main.go ├── iswift ├── .gitignore ├── iswiftpkg │ ├── Makefile │ └── api.go ├── dummy_test.go ├── Makefile ├── iswift.conf └── main.go ├── docs ├── source │ ├── _static │ │ ├── .gitignore │ │ ├── ProxyFS-components.png │ │ ├── ProxyFS-file-object.png │ │ └── ProxyFS-log-segments.png │ ├── theme │ │ └── swiftopensource │ │ │ ├── static │ │ │ ├── fonts │ │ │ │ ├── .gitkeep │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ ├── favicon.ico │ │ │ ├── images │ │ │ │ ├── loading.gif │ │ │ │ ├── play-button.png │ │ │ │ ├── search-icon.png │ │ │ │ ├── register-arrow.png │ │ │ │ ├── marketplace-icons.png │ │ │ │ └── OpenStack_Project_Swift_horizontal.png │ │ │ └── js │ │ │ │ └── navigation.js │ │ │ ├── theme.conf │ │ │ ├── localtoc.html │ │ │ ├── license_cc.html │ │ │ ├── sidebartoc.html │ │ │ ├── css.html │ │ │ ├── titlerow.html │ │ │ ├── search.html │ │ │ ├── footer.html │ │ │ ├── header.html │ │ │ └── layout.html │ ├── architecture │ │ ├── uml │ │ │ ├── png │ │ │ │ ├── read.png │ │ │ │ ├── flush.png │ │ │ │ ├── write.png │ │ │ │ ├── bimodal-get.png │ │ │ │ ├── checkpoint.png │ │ │ │ ├── create-file.png │ │ │ │ ├── file-write-new.png │ │ │ │ ├── file-write-old.png │ │ │ │ ├── bimodal-put-newfile.png │ │ │ │ ├── samba-create-write.png │ │ │ │ └── bimodal-put-newcontainer.png │ │ │ ├── README │ │ │ ├── bimodal-put-newcontainer.uml │ │ │ ├── checkpoint.uml │ │ │ ├── file-write-new.uml │ │ │ ├── retryrpc-send.uml │ │ │ ├── create-file.uml │ │ │ ├── bimodal-get.uml │ │ │ └── file-write-old.uml │ │ ├── uml-references.rst │ │ ├── log-structured-intro.rst │ │ └── access.rst │ └── index.rst └── Makefile ├── iclient ├── .gitignore ├── README.md ├── iclientpkg │ ├── Makefile │ └── impl.go ├── dummy_test.go ├── Makefile ├── dev2.conf ├── dev3.conf ├── iclient.sh ├── dev.conf ├── iclient.conf └── main.go ├── idestroy ├── .gitignore ├── dummy_test.go └── Makefile ├── bin ├── .gitignore ├── resetswift ├── remakerings ├── reinstallswift ├── vmspace.sh ├── cleanswift ├── rebuildswift ├── vtox ├── space.sh ├── profile-proxyfsd.py └── proxyfsd-getprofile ├── iauth ├── iauth-swift │ ├── .gitignore │ ├── Makefile │ ├── plugin_test.go │ ├── README.md │ └── iauth-swift.go ├── Makefile ├── dummy_test.go ├── api.go └── README.md ├── version ├── .gitignore ├── static-data.go ├── dummy_test.go ├── Makefile └── static-data │ └── make_static_data.go ├── COPYRIGHT ├── ihtml ├── make-static-content │ ├── .gitignore │ ├── dummy_test.go │ └── Makefile ├── static-content │ ├── open-iconic │ │ └── font │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ ├── utils.js │ └── styles.css ├── dummy_test.go ├── .gitignore ├── Makefile └── static-content.go ├── ickpt ├── .gitignore ├── ickptpkg │ ├── Makefile │ └── dummy_test.go ├── dummy_test.go ├── Makefile ├── dev.conf ├── ickpt.conf └── main.go ├── cookbooks ├── swift │ ├── files │ │ └── default │ │ │ ├── etc │ │ │ ├── swift │ │ │ │ ├── container-sync-realms.conf │ │ │ │ ├── object-expirer.conf.d │ │ │ │ │ └── 20_settings.conf │ │ │ │ ├── proxy-server │ │ │ │ │ ├── proxy-noauth.conf.d │ │ │ │ │ │ └── 20_settings.conf │ │ │ │ │ └── proxy-server.conf.d │ │ │ │ │ │ └── 20_settings.conf │ │ │ │ ├── account-server │ │ │ │ │ └── default.conf-template │ │ │ │ ├── container-reconciler.conf.d │ │ │ │ │ └── 20_settings.conf │ │ │ │ ├── container-server │ │ │ │ │ └── default.conf-template │ │ │ │ ├── dispersion.conf │ │ │ │ ├── test.conf │ │ │ │ └── bench.conf │ │ │ ├── apt │ │ │ │ └── sources.list.d │ │ │ │ │ └── fkrull-deadsnakes-trusty.list │ │ │ └── init │ │ │ │ └── swift.upstart │ │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── swift.service │ ├── templates │ │ └── default │ │ │ └── etc │ │ │ ├── swift │ │ │ ├── base.conf-template.erb │ │ │ ├── object-server │ │ │ │ ├── settings.conf.erb │ │ │ │ └── default.conf-template.erb │ │ │ ├── account-server │ │ │ │ └── settings.conf.erb │ │ │ ├── container-server │ │ │ │ └── settings.conf.erb │ │ │ ├── swift.conf.erb │ │ │ └── proxy-server │ │ │ │ └── default.conf-template.erb │ │ │ ├── rsyncd.conf.erb │ │ │ └── default │ │ │ └── rsyncd.erb │ └── recipes │ │ ├── default.rb │ │ ├── data.rb │ │ └── source.rb ├── proxyfs_swift │ ├── templates │ │ └── default │ │ │ └── etc │ │ │ ├── swift │ │ │ ├── base.conf-template.erb │ │ │ └── proxy-server │ │ │ │ └── default.conf-template.erb │ │ │ ├── rsyncd.conf.erb │ │ │ └── default │ │ │ └── rsyncd.erb │ └── files │ │ └── default │ │ ├── etc │ │ ├── swift │ │ │ └── proxy-server │ │ │ │ └── proxy-noauth.conf.d │ │ │ │ └── 20_settings.conf │ │ └── init │ │ │ └── swift.upstart │ │ └── usr │ │ └── lib │ │ └── systemd │ │ └── system │ │ └── swift.service ├── proxyfs │ ├── files │ │ └── default │ │ │ ├── etc │ │ │ ├── yum.repos.d │ │ │ │ └── swiftstack-controller.repo │ │ │ ├── pki │ │ │ │ └── rpm-gpg │ │ │ │ │ └── RPM-GPG-KEY-swiftstack-controller │ │ │ └── init │ │ │ │ └── proxyfsd.upstart │ │ │ └── usr │ │ │ ├── lib │ │ │ └── systemd │ │ │ │ └── system │ │ │ │ ├── nmb.service │ │ │ │ ├── smb.service │ │ │ │ ├── pfsagentd.service │ │ │ │ └── proxyfsd.service │ │ │ └── bin │ │ │ ├── detect_s3 │ │ │ ├── start_swift_only │ │ │ ├── set_up_swift3 │ │ │ ├── disable_s3 │ │ │ ├── enable_s3 │ │ │ ├── stop_proxyfsd_only │ │ │ ├── start_proxyfsd_only │ │ │ ├── unmount_and_stop_pfs │ │ │ └── set_up_s3api │ └── templates │ │ └── default │ │ └── root │ │ └── .gdbinit.erb ├── meta_middleware │ └── recipes │ │ └── default.rb ├── pfs_middleware │ └── recipes │ │ └── default.rb └── README-UNITTEST.txt ├── conf └── Makefile ├── logger └── Makefile ├── utils └── Makefile ├── ilayout └── Makefile ├── retryrpc ├── Makefile ├── perfrpc │ ├── Makefile │ ├── dummy_test.go │ ├── perfrpc.go │ ├── README.md │ ├── ping_perf.go │ └── tls.go ├── client_tracking.go └── ping_test.go ├── bucketstats ├── Makefile ├── atomic_darwin.go ├── atomic_linux_amd64.go └── atomic_linux_arm.go ├── ci ├── ansible │ ├── chef_files │ │ ├── vagrant.cfg │ │ ├── runway.cfg │ │ ├── ci.cfg │ │ ├── packages │ │ │ ├── debian.json │ │ │ └── rhel.json │ │ ├── vagrant.attribs.json │ │ ├── ci.attribs.json │ │ └── runway.attribs.json │ ├── vars │ │ ├── vagrant.yml │ │ ├── runway.yml │ │ └── ci.yml │ ├── tasks │ │ ├── templates │ │ │ └── usr │ │ │ │ └── bin │ │ │ │ └── reprovision_proxyfs.template │ │ ├── files │ │ │ ├── usr │ │ │ │ └── bin │ │ │ │ │ ├── resetswift │ │ │ │ │ ├── disable_core_dumps │ │ │ │ │ └── enable_core_dumps │ │ │ └── etc │ │ │ │ ├── systemd │ │ │ │ └── system │ │ │ │ │ └── etcd.service │ │ │ │ └── etcd │ │ │ │ └── etcd.conf │ │ └── modify_logging_rate_limit.yml │ ├── install_proxyfs.sh │ └── check_pinned_packages ├── chef.cfg └── chef.attribs.json ├── test └── container │ └── launch.sh ├── DEBUG.md ├── .github └── workflows │ ├── run-unit-tests.sh │ └── run-unit-tests.yml ├── go.mod ├── GoMakefile ├── enmesh_in_gopath.sh ├── GoPlugInMakefile ├── run_docker_tests.sh ├── CONTRIBUTORS.md ├── .gitignore ├── SECURITY.md └── benchmark.fio /.agignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | -------------------------------------------------------------------------------- /icert/.gitignore: -------------------------------------------------------------------------------- 1 | icert 2 | -------------------------------------------------------------------------------- /imgr/.gitignore: -------------------------------------------------------------------------------- 1 | imgr 2 | -------------------------------------------------------------------------------- /iswift/.gitignore: -------------------------------------------------------------------------------- 1 | iswift 2 | -------------------------------------------------------------------------------- /docs/source/_static/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iclient/.gitignore: -------------------------------------------------------------------------------- 1 | iclient 2 | -------------------------------------------------------------------------------- /idestroy/.gitignore: -------------------------------------------------------------------------------- 1 | idestroy 2 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | pfs-swift-load-plot 2 | -------------------------------------------------------------------------------- /iauth/iauth-swift/.gitignore: -------------------------------------------------------------------------------- 1 | *.so 2 | -------------------------------------------------------------------------------- /version/.gitignore: -------------------------------------------------------------------------------- 1 | proxyfs_version.go 2 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ihtml/make-static-content/.gitignore: -------------------------------------------------------------------------------- 1 | make-static-content 2 | -------------------------------------------------------------------------------- /iclient/README.md: -------------------------------------------------------------------------------- 1 | # iclient 2 | 3 | A FUSE presentation of a ProxyFS Volume. 4 | -------------------------------------------------------------------------------- /ickpt/.gitignore: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | ickpt 5 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/read.png -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/container-sync-realms.conf: -------------------------------------------------------------------------------- 1 | [test] 2 | key = realm1key 3 | cluster_saio = http://saio:8080/v1/ 4 | -------------------------------------------------------------------------------- /docs/source/_static/ProxyFS-components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/_static/ProxyFS-components.png -------------------------------------------------------------------------------- /docs/source/_static/ProxyFS-file-object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/_static/ProxyFS-file-object.png -------------------------------------------------------------------------------- /docs/source/_static/ProxyFS-log-segments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/_static/ProxyFS-log-segments.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/flush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/flush.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/write.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/bimodal-get.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/bimodal-get.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/checkpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/checkpoint.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/create-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/create-file.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/file-write-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/file-write-new.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/file-write-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/file-write-old.png -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/swift/base.conf-template.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | user = <%= @swift_user %> 3 | eventlet_debug = true 4 | log_level = DEBUG 5 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/favicon.ico -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/bimodal-put-newfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/bimodal-put-newfile.png -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/samba-create-write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/samba-create-write.png -------------------------------------------------------------------------------- /cookbooks/proxyfs_swift/templates/default/etc/swift/base.conf-template.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | user = <%= @swift_user %> 3 | eventlet_debug = true 4 | log_level = DEBUG 5 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/images/loading.gif -------------------------------------------------------------------------------- /ihtml/static-content/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/ihtml/static-content/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /ihtml/static-content/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/ihtml/static-content/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /ihtml/static-content/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/ihtml/static-content/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /docs/source/architecture/uml/png/bimodal-put-newcontainer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/architecture/uml/png/bimodal-put-newcontainer.png -------------------------------------------------------------------------------- /ihtml/static-content/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/ihtml/static-content/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/images/play-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/images/play-button.png -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/images/search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/images/search-icon.png -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/images/register-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/images/register-arrow.png -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/images/marketplace-icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/images/marketplace-icons.png -------------------------------------------------------------------------------- /conf/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/conf 5 | 6 | include ../GoMakefile 7 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /iauth/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/iauth 5 | 6 | include ../GoMakefile 7 | -------------------------------------------------------------------------------- /logger/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/logger 5 | 6 | include ../GoMakefile 7 | -------------------------------------------------------------------------------- /utils/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/utils 5 | 6 | include ../GoMakefile 7 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /ilayout/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/ilayout 5 | 6 | include ../GoMakefile 7 | -------------------------------------------------------------------------------- /retryrpc/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/retryrpc 5 | 6 | include ../GoMakefile 7 | -------------------------------------------------------------------------------- /bucketstats/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/bucketstats 5 | 6 | include ../GoMakefile 7 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /imgr/imgrpkg/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/imgr/imgrpkg 5 | 6 | include ../../GoMakefile 7 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /icert/icertpkg/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/icert/icertpkg 5 | 6 | include ../../GoMakefile 7 | -------------------------------------------------------------------------------- /ickpt/ickptpkg/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/ickpt/ickptpkg 5 | 6 | include ../../GoMakefile 7 | -------------------------------------------------------------------------------- /iswift/iswiftpkg/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/iswift/iswiftpkg 5 | 6 | include ../../GoMakefile 7 | -------------------------------------------------------------------------------- /retryrpc/perfrpc/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/retryrpc/perfrpc 5 | 6 | include ../../GoMakefile 7 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/images/OpenStack_Project_Swift_horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NVIDIA/proxyfs/HEAD/docs/source/theme/swiftopensource/static/images/OpenStack_Project_Swift_horizontal.png -------------------------------------------------------------------------------- /iclient/iclientpkg/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/iclient/iclientpkg 5 | 6 | include ../../GoMakefile 7 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/apt/sources.list.d/fkrull-deadsnakes-trusty.list: -------------------------------------------------------------------------------- 1 | deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main 2 | deb-src http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main 3 | -------------------------------------------------------------------------------- /icert/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /ickpt/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /imgr/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /version/static-data.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package version 5 | 6 | //go:generate go run static-data/make_static_data.go version proxyfs_version.go 7 | -------------------------------------------------------------------------------- /iauth/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package iauth 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /iclient/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /idestroy/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /ihtml/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package ihtml 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /imgr/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/imgr 5 | 6 | generatedfiles := \ 7 | imgr 8 | 9 | include ../GoMakefile 10 | -------------------------------------------------------------------------------- /iswift/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /version/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package version 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/basic.css 4 | pygments_style = native 5 | 6 | [options] 7 | sidebar_mode = toctree 8 | display_toc = True 9 | theme_display_toc = True 10 | -------------------------------------------------------------------------------- /icert/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/icert 5 | 6 | generatedfiles := \ 7 | icert 8 | 9 | include ../GoMakefile 10 | -------------------------------------------------------------------------------- /ickpt/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/ickpt 5 | 6 | generatedfiles := \ 7 | ickpt 8 | 9 | include ../GoMakefile 10 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/vagrant.cfg: -------------------------------------------------------------------------------- 1 | file_cache_path "/home/vagrant/chef" 2 | cookbook_path "/vagrant/src/github.com/NVIDIA/proxyfs/cookbooks" 3 | json_attribs "/vagrant/src/github.com/NVIDIA/proxyfs/ci/ansible/chef_files/vagrant.attribs.json" 4 | -------------------------------------------------------------------------------- /ci/ansible/vars/vagrant.yml: -------------------------------------------------------------------------------- 1 | --- 2 | proxyfs_user: "vagrant" 3 | proxyfs_group: "vagrant" 4 | source_root: "/vagrant" 5 | REPO_CLONE_PARENT_DIR: "{{ source_root }}/src/github.com/NVIDIA" 6 | PROXYFS_SRC_DIR: "{{ REPO_CLONE_PARENT_DIR }}/proxyfs" 7 | -------------------------------------------------------------------------------- /ci/chef.cfg: -------------------------------------------------------------------------------- 1 | file_cache_path "/home/swiftstack/chef" 2 | cookbook_path "/home/swiftstack/provisioning/src/github.com/NVIDIA/proxyfs/cookbooks" 3 | json_attribs "/home/swiftstack/provisioning/src/github.com/NVIDIA/proxyfs/ci/chef.attribs.json" 4 | -------------------------------------------------------------------------------- /ickpt/ickptpkg/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package ickptpkg 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /iclient/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/iclient 5 | 6 | generatedfiles := \ 7 | iclient 8 | 9 | include ../GoMakefile 10 | -------------------------------------------------------------------------------- /iclient/dev2.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | .include ./dev.conf 5 | 6 | [ICLIENT] 7 | MountPointDirPath: /mnt2 8 | HTTPServerPort: 15348 9 | -------------------------------------------------------------------------------- /iclient/dev3.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | .include ./dev.conf 5 | 6 | [ICLIENT] 7 | MountPointDirPath: /mnt3 8 | HTTPServerPort: 15349 9 | -------------------------------------------------------------------------------- /iswift/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/iswift 5 | 6 | generatedfiles := \ 7 | iswift 8 | 9 | include ../GoMakefile 10 | -------------------------------------------------------------------------------- /retryrpc/perfrpc/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /iauth/iauth-swift/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/iauth/iauth-swift 5 | plugin := iauth-swift.so 6 | 7 | include ../../GoPlugInMakefile 8 | -------------------------------------------------------------------------------- /idestroy/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/idestroy 5 | 6 | generatedfiles := \ 7 | idestroy 8 | 9 | include ../GoMakefile 10 | -------------------------------------------------------------------------------- /ihtml/make-static-content/dummy_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDummy(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /version/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/version 5 | 6 | generatedfiles := \ 7 | proxyfs_version.go 8 | 9 | include ../GoMakefile 10 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/runway.cfg: -------------------------------------------------------------------------------- 1 | file_cache_path "/home/swift/chef" 2 | cookbook_path "/home/swift/code/proxyfs/src/github.com/NVIDIA/proxyfs/cookbooks" 3 | json_attribs "/home/swift/code/proxyfs/src/github.com/NVIDIA/proxyfs/ci/ansible/chef_files/runway.attribs.json" 4 | -------------------------------------------------------------------------------- /ci/ansible/vars/runway.yml: -------------------------------------------------------------------------------- 1 | --- 2 | proxyfs_user: "swift" 3 | proxyfs_group: "swift" 4 | source_root: "/home/{{ proxyfs_user }}/code/proxyfs" 5 | REPO_CLONE_PARENT_DIR: "{{ source_root }}/src/github.com/NVIDIA" 6 | PROXYFS_SRC_DIR: "{{ REPO_CLONE_PARENT_DIR }}/proxyfs" 7 | -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/swift/object-server/settings.conf.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | devices = <%= @srv_path %> 3 | bind_ip = <%= @bind_ip %> 4 | bind_port = <%= @bind_port %> 5 | log_name = object-<%= @bind_port %> 6 | recon_cache_path = <%= @recon_cache_path %> 7 | -------------------------------------------------------------------------------- /ci/ansible/vars/ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | proxyfs_user: "swiftstack" 3 | proxyfs_group: "swiftsatck" 4 | source_root: "/home/{{ proxyfs_user }}/provisioning" 5 | REPO_CLONE_PARENT_DIR: "{{ source_root }}/src/github.com/NVIDIA" 6 | PROXYFS_SRC_DIR: "{{ REPO_CLONE_PARENT_DIR }}/proxyfs" 7 | -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/swift/account-server/settings.conf.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | devices = <%= @srv_path %> 3 | bind_ip = <%= @bind_ip %> 4 | bind_port = <%= @bind_port %> 5 | log_name = account-<%= @bind_port %> 6 | recon_cache_path = <%= @recon_cache_path %> 7 | -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/swift/container-server/settings.conf.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | devices = <%= @srv_path %> 3 | bind_ip = <%= @bind_ip %> 4 | bind_port = <%= @bind_port %> 5 | log_name = container-<%= @bind_port %> 6 | recon_cache_path = <%= @recon_cache_path %> 7 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/ci.cfg: -------------------------------------------------------------------------------- 1 | file_cache_path "/home/swiftstack/chef" 2 | cookbook_path "/home/swiftstack/provisioning/src/github.com/NVIDIA/proxyfs/cookbooks" 3 | json_attribs "/home/swiftstack/provisioning/src/github.com/NVIDIA/proxyfs/ci/ansible/chef_files/ci.attribs.json" 4 | -------------------------------------------------------------------------------- /ci/ansible/tasks/templates/usr/bin/reprovision_proxyfs.template: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | /usr/bin/unmount_and_stop_pfs 5 | cd $GOPATH/src/github.com/NVIDIA/proxyfs 6 | ci/ansible/install_proxyfs.sh {{ env_arg }} {{ active_golang_version }} 7 | /usr/bin/start_and_mount_pfs "$@" 8 | -------------------------------------------------------------------------------- /ihtml/make-static-content/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/ihtml/make-static-content 5 | 6 | generatedfiles := \ 7 | make-static-content 8 | 9 | include ../../GoMakefile 10 | -------------------------------------------------------------------------------- /bin/resetswift: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | /vagrant/bin/cleanswift 7 | cd /tmp/vagrant-chef*/ && sudo chef-solo -c solo.rb -j dna.json -o swift::data 8 | sudo service rsyslog restart 9 | sudo service memcached restart 10 | -------------------------------------------------------------------------------- /ci/ansible/tasks/files/usr/bin/resetswift: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | /usr/bin/unmount_and_stop_pfs 5 | echo "Resetting Swift drives..." 6 | rm -rf /srv/?/node/d?/* 7 | echo "Resetting Swift logs..." 8 | sudo find /var/log/swift -type f -exec truncate {} --size 0 \; 9 | /usr/bin/start_and_mount_pfs "$@" 10 | -------------------------------------------------------------------------------- /bin/remakerings: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | rm -f /etc/swift/*.builder /etc/swift/*.ring.gz \ 7 | /etc/swift/backups/*.builder /etc/swift/backups/*.ring.gz 8 | 9 | cd /tmp/vagrant-chef*/ && sudo chef-solo -c solo.rb -j dna.json -o swift::rings 10 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/localtoc.html: -------------------------------------------------------------------------------- 1 | {%- if theme_sidebar_mode == 'toctree' and theme_display_toc and display_toc %} 2 |
3 |
4 |

Page Contents

5 | {{ toc }} 6 |
7 |
8 | {%- endif %} 9 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/object-expirer.conf.d/20_settings.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | 3 | [object-expirer] 4 | 5 | [pipeline:main] 6 | pipeline = catch_errors cache proxy-server 7 | 8 | [app:proxy-server] 9 | use = egg:swift#proxy 10 | 11 | [filter:cache] 12 | use = egg:swift#memcache 13 | 14 | [filter:catch_errors] 15 | use = egg:swift#catch_errors 16 | -------------------------------------------------------------------------------- /iswift/iswift.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | [ISWIFT] 5 | SwiftProxyIPAddr: 127.0.0.1 6 | SwiftProxyTCPPort: 8080 7 | 8 | MaxAccountNameLength: 256 9 | MaxContainerNameLength: 256 10 | MaxObjectNameLength: 1024 11 | AccountListingLimit: 10000 12 | ContainerListingLimit: 10000 13 | -------------------------------------------------------------------------------- /bin/reinstallswift: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | set -e 7 | cd /tmp/vagrant-chef*/ 8 | sed 's/"full_reprovision": false/"full_reprovision": true/g' dna.json > reload.json 9 | sudo chef-solo -c solo.rb -j reload.json -o swift::source 10 | swift-init restart main 11 | echo "READY!" 12 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/etc/yum.repos.d/swiftstack-controller.repo: -------------------------------------------------------------------------------- 1 | [swiftstack-controller] 2 | name=swiftstack-controller 3 | baseurl=https://demo.swiftstack.com:443/yum_repos/el7 4 | enabled=1 5 | metadata_expire=7d 6 | gpgcheck=1 7 | gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-swiftstack-controller 8 | exclude=ss-swift ss-python-gateway ss-python-fusepy ss-python-cloudfiles 9 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/templates/default/root/.gdbinit.erb: -------------------------------------------------------------------------------- 1 | # Don't auto-load .gdbinit if its found in the current directory 2 | # (probably not a good idea; definitely not good if we're root). 3 | # 4 | set auto-load local-gdbinit off 5 | 6 | # Use the same .gdbinit as user swift (who is probably doing 7 | # "sudo gdb -p ...". 8 | # 9 | source /home/<%= @proxyfs_user %>/.gdbinit 10 | -------------------------------------------------------------------------------- /ci/ansible/tasks/files/etc/systemd/system/etcd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=etcd 3 | Documentation=https://github.com/coreos/etcd 4 | Conflicts=etcd2.service 5 | 6 | [Service] 7 | Restart=always 8 | RestartSec=5s 9 | LimitNOFILE=40000 10 | TimeoutStartSec=0 11 | 12 | ExecStart=/usr/local/bin/etcd --config-file /etc/etcd/etcd.conf 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /ickpt/dev.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | [ICKPT] 5 | IPAddr: dev 6 | Port: 33123 7 | CertFilePath: 8 | KeyFilePath: 9 | CACertFilePath: 10 | DataBasePath: /tmp/ickptDB 11 | SwiftTimeout: 10m 12 | SwiftConnectionPoolSize: 128 13 | TransactionTimeout: 10s 14 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/proxy-server/proxy-noauth.conf.d/20_settings.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | bind_ip = 127.0.0.1 3 | bind_port = 8090 4 | 5 | [pipeline:main] 6 | pipeline = catch_errors healthcheck proxy-logging cache list-endpoints bulk tempurl slo dlo proxy-logging proxy-server 7 | 8 | [filter:list-endpoints] 9 | use = egg:swift#list_endpoints 10 | default_response_version = v2 11 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/packages/debian.json: -------------------------------------------------------------------------------- 1 | { 2 | "proxyfs_packages": [ 3 | ["libjson-c-dev"], 4 | ["fuse"] 5 | ], 6 | "wireshark_packages": [ 7 | ["wireshark"], 8 | ["libcap2-bin"] 9 | ], 10 | "ssh_packages": [ 11 | ["sshpass"] 12 | ], 13 | "gdb_packages": [ 14 | ["gdb"] 15 | ], 16 | "utils_packages": [ 17 | ["atop"], 18 | ["vim-common"] 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/packages/rhel.json: -------------------------------------------------------------------------------- 1 | { 2 | "proxyfs_packages": [ 3 | ["json-c-devel"], 4 | ["fuse"] 5 | ], 6 | "wireshark_packages": [ 7 | ["wireshark"], 8 | ["libcap"] 9 | ], 10 | "ssh_packages": [ 11 | ["sshpass"] 12 | ], 13 | "gdb_packages": [ 14 | ["gdb"], 15 | ["yum-utils"] 16 | ], 17 | "utils_packages": [ 18 | ["atop"], 19 | ["vim-common"] 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /bin/vmspace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Output: 7 | # VmSize (kB) sum for all smbd and proxyfsd processes on this node 8 | 9 | vmsize=$(pidof proxyfsd smbd | xargs -n 1 | awk '{print "/proc/"$1"/status"}' | xargs -n 1 grep VmSize | awk '{print $2}' | awk '{sum +=1 $1} END {print sum}') 10 | 11 | echo "smbd/proxyfsd-VmSize(KB) $vmsize" 12 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/account-server/default.conf-template: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | mount_check = false 3 | disable_fallocate = true 4 | workers = 1 5 | 6 | [pipeline:main] 7 | pipeline = recon account-server 8 | 9 | [app:account-server] 10 | use = egg:swift#account 11 | 12 | [filter:recon] 13 | use = egg:swift#recon 14 | 15 | [account-replicator] 16 | # vm_test_mode = yes 17 | 18 | [account-auditor] 19 | 20 | [account-reaper] 21 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/container-reconciler.conf.d/20_settings.conf: -------------------------------------------------------------------------------- 1 | [container-reconciler] 2 | 3 | [pipeline:main] 4 | pipeline = catch_errors proxy-logging cache proxy-server 5 | 6 | [app:proxy-server] 7 | use = egg:swift#proxy 8 | 9 | [filter:cache] 10 | use = egg:swift#memcache 11 | 12 | [filter:proxy-logging] 13 | use = egg:swift#proxy_logging 14 | 15 | [filter:catch_errors] 16 | use = egg:swift#catch_errors 17 | 18 | -------------------------------------------------------------------------------- /ihtml/.gitignore: -------------------------------------------------------------------------------- 1 | bootstrap_dot_min_dot_css_.go 2 | bootstrap_dot_min_dot_js_.go 3 | jquery_dot_min_dot_js_.go 4 | jquery_underline_3_dot_2_dot_1_dot_min_dot_js_.go 5 | jsontree_dot_js_.go 6 | open_iconic_bootstrap_dot_css_.go 7 | open_iconic_dot_eot_.go 8 | open_iconic_dot_otf_.go 9 | open_iconic_dot_svg_.go 10 | open_iconic_dot_ttf_.go 11 | open_iconic_dot_woff_.go 12 | popper_dot_min_dot_js_.go 13 | styles_dot_css_.go 14 | utils_dot_js_.go 15 | -------------------------------------------------------------------------------- /bin/cleanswift: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | swift-init all stop 7 | find /var/log/swift -type f -delete 8 | find /var/cache/swift* -type f -name *.recon -delete 9 | sudo umount /mnt/swift-disk 10 | sudo rm -r /srv/node* 11 | sudo rm -f /var/lib/swift/disk 12 | sudo rm -f /var/log/debug /var/log/messages /var/log/rsyncd.log /var/log/syslog 13 | sudo service rsyslog restart 14 | -------------------------------------------------------------------------------- /bin/rebuildswift: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | /vagrant/bin/cleanswift 7 | rm -fr /etc/swift/* 8 | rm -f /etc/swift/*.builder /etc/swift/*.ring.gz \ 9 | /etc/swift/backups/*.builder /etc/swift/backups/*.ring.gz 10 | cd /tmp/vagrant-chef*/ 11 | sed 's/"full_reprovision": false/"full_reprovision": true/g' dna.json > reload.json 12 | sudo chef-solo -c solo.rb -j reload.json 13 | -------------------------------------------------------------------------------- /cookbooks/meta_middleware/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | execute "Check setuptools is installed" do 5 | command "pip install setuptools" 6 | end 7 | 8 | # install middleware in development mode 9 | execute 'meta_middleware - setup.py develop' do 10 | command "python setup.py develop" 11 | cwd "#{node['source_root']}/src/github.com/NVIDIA/proxyfs/meta_middleware" 12 | end 13 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/README: -------------------------------------------------------------------------------- 1 | The `uml` directory contains .uml files that are used as input to 2 | PlantUML (http://plantuml.com). PlantUML produces .png files which 3 | can then be displayed. The .png files illustrate the architecture 4 | of certain operations such as a bimodal PUT operation. 5 | 6 | Then do something like: 7 | 8 | # java -jar plantuml.jar read.uml 9 | 10 | This will produce a correspondingly named .png file you can display. 11 | 12 | -------------------------------------------------------------------------------- /ickpt/ickpt.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | [ICKPT] 5 | IPAddr: ickpt 6 | Port: 33123 7 | CertFilePath: ickpt_cert.pem 8 | KeyFilePath: ickpt_key.pem 9 | CACertFilePath: ca_cert.pem 10 | DataBasePath: /tmp/ickptDB 11 | SwiftTimeout: 10m 12 | SwiftConnectionPoolSize: 128 13 | TransactionTimeout: 10s 14 | -------------------------------------------------------------------------------- /ci/ansible/tasks/files/etc/etcd/etcd.conf: -------------------------------------------------------------------------------- 1 | name: runway 2 | data-dir: /var/lib/etcd 3 | wal-dir: /var/etcd/wal 4 | 5 | initial-advertise-peer-urls: http://localhost:2380 6 | listen-peer-urls: http://localhost:2380 7 | listen-client-urls: http://localhost:2379 8 | advertise-client-urls: http://localhost:2379 9 | 10 | initial-cluster: runway=http://localhost:2380 11 | initial-cluster-token: etcd-cluster-1 12 | initial-cluster-state: new 13 | 14 | election-timeout: 10000 15 | -------------------------------------------------------------------------------- /cookbooks/proxyfs_swift/files/default/etc/swift/proxy-server/proxy-noauth.conf.d/20_settings.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | bind_ip = 127.0.0.1 3 | bind_port = 8090 4 | log_facility = LOG_LOCAL1 5 | log_name = noauth-proxy-server 6 | 7 | [pipeline:main] 8 | pipeline = catch_errors healthcheck proxy-logging cache list-endpoints bulk tempurl slo dlo proxy-logging proxy-server 9 | 10 | [filter:list-endpoints] 11 | use = egg:swift#list_endpoints 12 | default_response_version = v2 13 | -------------------------------------------------------------------------------- /cookbooks/pfs_middleware/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | execute "Check setuptools & tox is installed" do 5 | command "pip install setuptools tox==3.5.3" 6 | end 7 | 8 | # install middleware in development mode 9 | execute 'pfs_middleware - setup.py develop' do 10 | command "python setup.py develop" 11 | cwd "#{node['source_root']}/src/github.com/NVIDIA/proxyfs/pfs_middleware" 12 | end 13 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/lib/systemd/system/nmb.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Samba NMB Daemon 3 | After=syslog.target network.target 4 | 5 | [Service] 6 | Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba 7 | Type=notify 8 | NotifyAccess=all 9 | PIDFile=/run/nmbd.pid 10 | EnvironmentFile=-/opt/ss/etc/sysconfig/samba 11 | ExecStart=/opt/ss/sbin/nmbd $NMBDOPTIONS 12 | ExecReload=/usr/bin/kill -HUP $MAINPID 13 | LimitCORE=infinity 14 | 15 | [Install] 16 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/license_cc.html: -------------------------------------------------------------------------------- 1 | 2 | Creative Commons Attribution 3.0 License 3 | 4 |

5 | Except where otherwise noted, this document is licensed under 6 | Creative Commons 7 | Attribution 3.0 License. See all 8 | OpenStack Legal Documents. 9 |

10 | -------------------------------------------------------------------------------- /test/container/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | set -e 7 | set -x 8 | 9 | # Build ProxyFS and run tests 10 | cd $GOPATH/src/github.com/NVIDIA/proxyfs 11 | make ci 12 | # $COVERALLS_TOKEN must be configured in the CI/CD environment 13 | if [ -n "$COVERALLS_TOKEN" ] && [ -n "$GIT_BRANCH" ]; then 14 | goveralls -coverprofile coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN || true 15 | fi 16 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/container-server/default.conf-template: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | mount_check = false 3 | disable_fallocate = true 4 | workers = 1 5 | 6 | [pipeline:main] 7 | pipeline = recon container-server 8 | 9 | [app:container-server] 10 | use = egg:swift#container 11 | allow_versions = true 12 | 13 | [filter:recon] 14 | use = egg:swift#recon 15 | 16 | [container-replicator] 17 | # vm_test_mode = yes 18 | 19 | [container-updater] 20 | 21 | [container-auditor] 22 | 23 | [container-sync] 24 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/lib/systemd/system/smb.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Samba SMB Daemon 3 | After=syslog.target network.target nmb.service 4 | 5 | [Service] 6 | Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba 7 | Type=notify 8 | NotifyAccess=all 9 | PIDFile=/run/smbd.pid 10 | LimitNOFILE=16384 11 | EnvironmentFile=-/opt/ss/etc/sysconfig/samba 12 | ExecStart=/opt/ss/sbin/smbd $SMBDOPTIONS 13 | ExecReload=/usr/bin/kill -HUP $MAINPID 14 | LimitCORE=infinity 15 | 16 | [Install] 17 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/detect_s3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | #set -e 7 | #set -x 8 | 9 | PROXYSERVERCONF=/etc/swift/proxy-server.conf 10 | 11 | grep "s3api tempauth" $PROXYSERVERCONF > /dev/null 2>&1 12 | if [ $? -eq 0 ]; then 13 | echo "s3api" 14 | exit 0 15 | fi 16 | 17 | grep "swift3 tempauth" $PROXYSERVERCONF > /dev/null 2>&1 18 | if [ $? -eq 0 ]; then 19 | echo "swift3" 20 | exit 0 21 | fi 22 | 23 | exit 1 24 | -------------------------------------------------------------------------------- /DEBUG.md: -------------------------------------------------------------------------------- 1 | # Debugging proxyfsd 2 | 3 | ## Logging 4 | Logs from proxyfsd are output to `proxyfsd.log`. 5 | 6 | ## Kill with trace data 7 | Find the daemon's pid: `ps -eaf | grep proxyfsd` 8 | 9 | Kill the process and get golang stack traces: `kill -ABRT ` 10 | 11 | ## Using gdb 12 | Find the daemon's pid: `ps -eaf | grep proxyfsd` 13 | 14 | Tell gdb to attach to that pid: `gdb -p ` 15 | 16 | ## Generating a core file 17 | If you want to generate a core file from within gdb: `(gdb) gcore` 18 | 19 | If you want to generate a core file without using gdb: `gcore ` 20 | -------------------------------------------------------------------------------- /bin/vtox: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | # tox wrapper for vagrant 7 | ARGS=${@:-"-e pep8,py27"} 8 | set -e 9 | cd /vagrant/swift 10 | sed -i '/envlist/ a\ 11 | toxworkdir = /home/vagrant/.tox-swift 12 | ' tox.ini 13 | cp setup.py _setup.py 14 | cat > setup.py < 6 | 7 | [storage-policy:<%= i %>] 8 | name = <%= name %> 9 | <% if i == 0 %> 10 | default = yes 11 | <% end %> 12 | <% if name == @ec_policy %> 13 | policy_type = erasure_coding 14 | ec_type = liberasurecode_rs_vand 15 | ec_num_data_fragments = <%= @ec_replicas - 2 %> 16 | ec_num_parity_fragments = 2 17 | <% end %> 18 | <% end %> 19 | -------------------------------------------------------------------------------- /bucketstats/atomic_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package bucketstats 5 | 6 | import ( 7 | "sync/atomic" 8 | ) 9 | 10 | func atomicAddUint64(addr *uint64, val uint64) { 11 | atomic.AddUint64(addr, val) 12 | } 13 | 14 | func atomicIncUint64(addr *uint64) { 15 | atomic.AddUint64(addr, 1) 16 | } 17 | 18 | func atomicLoadUint64(addr *uint64) (val uint64) { 19 | val = atomic.LoadUint64(addr) 20 | return 21 | } 22 | 23 | func atomicStoreUint64(addr *uint64, val uint64) { 24 | atomic.StoreUint64(addr, val) 25 | } 26 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/dispersion.conf: -------------------------------------------------------------------------------- 1 | [dispersion] 2 | auth_url = http://localhost:8080/auth/v1.0 3 | auth_user = test:tester 4 | auth_key = testing 5 | # auth_url = http://saio:5000/v2.0/ 6 | # auth_user = test:tester 7 | # auth_key = testing 8 | # auth_version = 2.0 9 | # endpoint_type = publicURL 10 | # keystone_api_insecure = no 11 | # 12 | # swift_dir = /etc/swift 13 | # dispersion_coverage = 1.0 14 | # retries = 5 15 | # concurrency = 25 16 | # container_populate = yes 17 | # object_populate = yes 18 | # container_report = yes 19 | # object_report = yes 20 | # dump_json = no 21 | -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/rsyncd.conf.erb: -------------------------------------------------------------------------------- 1 | uid = <%= @swift_user %> 2 | gid = <%= @swift_group %> 3 | log file = /var/log/rsyncd.log 4 | pid file = /var/run/rsyncd.pid 5 | address = 0.0.0.0 6 | 7 | [account] 8 | max connections = 25 9 | path = /mnt/swift-disk/ 10 | read only = false 11 | lock file = /var/lock/account.lock 12 | 13 | [container] 14 | max connections = 25 15 | path = /mnt/swift-disk/ 16 | read only = false 17 | lock file = /var/lock/container.lock 18 | 19 | [object] 20 | max connections = 25 21 | path = /mnt/swift-disk/ 22 | read only = false 23 | lock file = /var/lock/object.lock 24 | -------------------------------------------------------------------------------- /cookbooks/proxyfs_swift/templates/default/etc/rsyncd.conf.erb: -------------------------------------------------------------------------------- 1 | uid = <%= @swift_user %> 2 | gid = <%= @swift_group %> 3 | log file = /var/log/rsyncd.log 4 | pid file = /var/run/rsyncd.pid 5 | address = 0.0.0.0 6 | 7 | [account] 8 | max connections = 25 9 | path = /mnt/swift-disk/ 10 | read only = false 11 | lock file = /var/lock/account.lock 12 | 13 | [container] 14 | max connections = 25 15 | path = /mnt/swift-disk/ 16 | read only = false 17 | lock file = /var/lock/container.lock 18 | 19 | [object] 20 | max connections = 25 21 | path = /mnt/swift-disk/ 22 | read only = false 23 | lock file = /var/lock/object.lock 24 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/proxy-server/proxy-server.conf.d/20_settings.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | bind_port = 8080 3 | 4 | [pipeline:main] 5 | pipeline = catch_errors healthcheck proxy-logging cache container_sync bulk tempurl tempauth staticweb slo dlo pfs proxy-logging proxy-server 6 | 7 | [filter:pfs] 8 | use = egg:pfs_middleware#pfs 9 | proxyfsd_host = 127.0.0.1 10 | proxyfsd_port = 12345 11 | 12 | [filter:tempauth] 13 | use = egg:swift#tempauth 14 | user_admin_admin = admin .admin .reseller_admin 15 | user_test_tester = testing .admin 16 | user_test2_tester2 = testing2 .admin 17 | user_test_tester3 = testing3 18 | 19 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/NVIDIA/proxyfs 2 | 3 | go 1.25.1 4 | 5 | require ( 6 | github.com/NVIDIA/fission/v3 v3.0.3 7 | github.com/NVIDIA/sortedmap v1.30.0 8 | github.com/google/btree v1.0.1 9 | github.com/sirupsen/logrus v1.8.1 10 | github.com/stretchr/testify v1.7.5 11 | golang.org/x/sys v0.17.0 12 | ) 13 | 14 | require ( 15 | github.com/NVIDIA/cstruct v1.30.0 // indirect 16 | github.com/davecgh/go-spew v1.1.1 // indirect 17 | github.com/kr/pretty v0.3.1 // indirect 18 | github.com/pmezard/go-difflib v1.0.0 // indirect 19 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect 20 | gopkg.in/yaml.v3 v3.0.1 // indirect 21 | ) 22 | -------------------------------------------------------------------------------- /ci/ansible/install_proxyfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | set -e 7 | 8 | ENV_NAME=$1 9 | GOLANG_VERSION=$2 10 | 11 | if [ -z "$ENV_NAME" ]; then 12 | echo "usage: $0 " 13 | exit 1 14 | fi 15 | 16 | if [ -z "$GOLANG_VERSION" ]; then 17 | GOLANG_VERSION="current" 18 | fi 19 | 20 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 21 | 22 | ansible-playbook -i "localhost," -c local -e env=$ENV_NAME -e env_arg="$1" -e golang_version="$GOLANG_VERSION" "$SCRIPT_DIR"/tasks/main.yml 23 | chef-solo -c "$SCRIPT_DIR"/chef_files/$ENV_NAME.cfg 24 | -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/swift/object-server/default.conf-template.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | mount_check = false 3 | disable_fallocate = true 4 | workers = 1 5 | log_facility = LOG_LOCAL2 6 | # NOTE: servers_per_port necessary for replicator/reconstructor so must go here 7 | servers_per_port = <%= @servers_per_port %> 8 | 9 | [pipeline:main] 10 | pipeline = recon object-server 11 | 12 | [app:object-server] 13 | use = egg:swift#object 14 | 15 | [filter:recon] 16 | use = egg:swift#recon 17 | 18 | [object-updater] 19 | 20 | [object-auditor] 21 | 22 | [object-replicator] 23 | # vm_test_mode = yes 24 | sync_method = <%= @sync_method %> 25 | 26 | [object-reconstructor] 27 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/sidebartoc.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |
7 |

{{project}} {{version}}

8 | {%- if theme_sidebar_mode == 'toc' %} 9 | {{ toc }} 10 | {%- elif theme_sidebar_mode == 'toctree' %} 11 | {{ toctree(maxdepth=2) }} 12 | {%- endif %} 13 |
14 | {% include 'localtoc.html' %} 15 |
16 |
17 | -------------------------------------------------------------------------------- /ihtml/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | gosubdir := github.com/NVIDIA/proxyfs/ihtml 5 | 6 | generatedfiles := \ 7 | bootstrap_dot_min_dot_css_.go \ 8 | bootstrap_dot_min_dot_js_.go \ 9 | jquery_dot_min_dot_js_.go \ 10 | jquery_underline_3_dot_2_dot_1_dot_min_dot_js_.go \ 11 | jsontree_dot_js_.go \ 12 | open_iconic_bootstrap_dot_css_.go \ 13 | open_iconic_dot_eot_.go \ 14 | open_iconic_dot_otf_.go \ 15 | open_iconic_dot_svg_.go \ 16 | open_iconic_dot_ttf_.go \ 17 | open_iconic_dot_woff_.go \ 18 | popper_dot_min_dot_js_.go \ 19 | styles_dot_css_.go \ 20 | utils_dot_js_.go 21 | 22 | include ../GoMakefile 23 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/init/swift.upstart: -------------------------------------------------------------------------------- 1 | # swift job file 2 | 3 | description "OpenStack Swift" 4 | author "orion " 5 | 6 | # Stanzas 7 | 8 | # When to start the service 9 | start on runlevel [2345] 10 | 11 | # When to stop the service 12 | stop on runlevel [016] 13 | 14 | # Automatically restart process if crashed 15 | # respawn 16 | 17 | # Essentially lets upstart know the process will detach itself to the background 18 | # expect fork 19 | 20 | # Run before process 21 | pre-start script 22 | [ -d /var/log/swift ] || mkdir -p /var/log/swift 23 | end script 24 | 25 | # Start the process 26 | exec /usr/local/bin/swift-init main start 2>/var/log/swift/swift.err 27 | -------------------------------------------------------------------------------- /cookbooks/proxyfs_swift/files/default/etc/init/swift.upstart: -------------------------------------------------------------------------------- 1 | # swift job file 2 | 3 | description "OpenStack Swift" 4 | author "orion " 5 | 6 | # Stanzas 7 | 8 | # When to start the service 9 | start on runlevel [2345] 10 | 11 | # When to stop the service 12 | stop on runlevel [016] 13 | 14 | # Automatically restart process if crashed 15 | # respawn 16 | 17 | # Essentially lets upstart know the process will detach itself to the background 18 | # expect fork 19 | 20 | # Run before process 21 | pre-start script 22 | [ -d /var/log/swift ] || mkdir -p /var/log/swift 23 | end script 24 | 25 | # Start the process 26 | exec /usr/local/bin/swift-init main start 2>/var/log/swift/swift.err 27 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/test.conf: -------------------------------------------------------------------------------- 1 | [func_test] 2 | # sample config 3 | auth_host = 127.0.0.1 4 | auth_port = 8080 5 | auth_ssl = no 6 | auth_prefix = /auth/ 7 | 8 | # Primary functional test account (needs admin access to the account) 9 | account = test 10 | username = tester 11 | password = testing 12 | 13 | # User on a second account (needs admin access to the account) 14 | account2 = test2 15 | username2 = tester2 16 | password2 = testing2 17 | 18 | # User on same account as first, but without admin access 19 | username3 = tester3 20 | password3 = testing3 21 | 22 | collate = C 23 | 24 | [unit_test] 25 | fake_syslog = False 26 | 27 | [probe_test] 28 | # check_server_timeout = 30 29 | validate_rsync = true 30 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/usr/lib/systemd/system/swift.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Swift service 3 | 4 | [Service] 5 | Environment=NSS_SDB_USE_CACHE=YES 6 | Environment=PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin 7 | ExecStart=/usr/bin/swift-init main start 8 | ExecReload=/usr/bin/swift-init main stop 9 | 10 | Restart=always 11 | # Send stopping SIGTERM (and later SIGKILL if necessary) to the main process 12 | # only. This prevents systemd from interfering with backends processing 13 | # requests after the parent process has been sent a SIGHUP by the ExecReload. 14 | KillMode=process 15 | 16 | 17 | [Install] 18 | # Don't consider our failure a boot failure 19 | WantedBy=multi-user.target proxyfsd.service 20 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/etc/pki/rpm-gpg/RPM-GPG-KEY-swiftstack-controller: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v2.0.22 (GNU/Linux) 3 | 4 | mI0EUd4D/QEEAN8SLo7ua0ybj2fSwejBMlnV0DSZkl3Q3hbYWcSkZiC/Xo2IdnW+ 5 | JTz4WTMusllaxPsnLWG4K63Bq7odjdKix2tNe7ZpWlhQr91NpoQpP8dcdnx4e8B0 6 | v4R41u1aMwE3DuaCzxICJ/0W2FtsDEVYDZkpMkbHHdBuFnoUTswN6nqlABEBAAG0 7 | L1N3aWZ0U3RhY2sgU2lnbmluZyBLZXkgPGNvbnRhY3RAc3dpZnRzdGFjay5jb20+ 8 | iLgEEwECACIFAlHeA/0CGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAbt 9 | 6mK+F/MrWU4EAKcL88XVKneJZ1N/hyfL+v8Ws5Pn2HEj8m8+PvrLCncGT3UZxYrp 10 | Pv1QfOSnfDw5Z2VtYZ76IRqKZRQyx6cS4USveHcP4Hntk3qUwfcez0hgVusMmOcD 11 | qjEZrJuE96HtGPUHr8j5SQhaMzELlGDGhGfFSn57WgA6G0vORpEl8Yy0 12 | =INz3 13 | -----END PGP PUBLIC KEY BLOCK----- -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/start_swift_only: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | # A simple script to start the swift services only 7 | # The PATH, etc should already be setup by systemctl environment 8 | 9 | sudo mount -a 10 | 11 | echo "Shutting down services and mount points..." 12 | /usr/bin/unmount_and_stop_pfs 13 | echo 14 | echo "Bringing up services..." 15 | if [ -f /usr/bin/systemctl ]; then 16 | # Centos 17 | sudo /usr/bin/systemctl start memcached 18 | sudo /usr/bin/swift-init main start 19 | else 20 | # Ubuntu (not tested!) 21 | sudo /usr/sbin/service memcached start 22 | sudo /usr/bin/swift-init main start 23 | fi 24 | -------------------------------------------------------------------------------- /cookbooks/proxyfs_swift/files/default/usr/lib/systemd/system/swift.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Swift service 3 | 4 | [Service] 5 | Environment=NSS_SDB_USE_CACHE=YES 6 | Environment=PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin 7 | ExecStart=/usr/bin/swift-init main start 8 | ExecReload=/usr/bin/swift-init main stop 9 | 10 | Restart=always 11 | # Send stopping SIGTERM (and later SIGKILL if necessary) to the main process 12 | # only. This prevents systemd from interfering with backends processing 13 | # requests after the parent process has been sent a SIGHUP by the ExecReload. 14 | KillMode=process 15 | 16 | 17 | [Install] 18 | # Don't consider our failure a boot failure 19 | WantedBy=multi-user.target proxyfsd.service 20 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/etc/init/proxyfsd.upstart: -------------------------------------------------------------------------------- 1 | # proxyfsd job file 2 | 3 | description "proxyfsd -- a filesystem for OpenStack Swift" 4 | author "orion " 5 | 6 | # Stanzas 7 | 8 | # When to start the service 9 | start on runlevel [2345] 10 | 11 | # When to stop the service 12 | stop on runlevel [016] 13 | 14 | # Automatically restart process if crashed 15 | # respawn 16 | 17 | # Essentially lets upstart know the process will detach itself to the background 18 | # expect fork 19 | 20 | # Run before process 21 | pre-start script 22 | [ -d /var/log/proxyfsd ] || mkdir -p /var/log/proxyfsd 23 | end script 24 | 25 | # Start the process 26 | exec /usr/bin/proxyfsd /etc/proxyfsd/saioproxyfsd0.conf 2>/var/log/proxyfsd/proxyfsd.err 27 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # Minimal makefile for Sphinx documentation 5 | # 6 | 7 | # You can set these variables from the command line. 8 | SPHINXOPTS = -W 9 | SPHINXBUILD = sphinx-build 10 | SPHINXPROJ = ProxyFS 11 | SOURCEDIR = source 12 | BUILDDIR = build 13 | 14 | # Put it first so that "make" without argument is like "make help". 15 | help: 16 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 17 | 18 | .PHONY: help Makefile 19 | 20 | # Catch-all target: route all unknown targets to Sphinx using the new 21 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 22 | %: Makefile 23 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 24 | -------------------------------------------------------------------------------- /GoMakefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # GoMakefile is a template to be included by Go package Makefile's in this repo 5 | 6 | minimal: generate build 7 | 8 | all: fmt minimal test 9 | 10 | .PHONY: all bench build clean cover fmt generate minimal test 11 | 12 | bench: 13 | go test -bench $(gosubdir) 14 | 15 | build: 16 | go build -gcflags "-N -l" $(gosubdir) 17 | 18 | clean: 19 | @set -e; \ 20 | go clean -i $(gosubdir); \ 21 | for generatedfile in $(generatedfiles); do \ 22 | rm -f $$generatedfile; \ 23 | done 24 | 25 | cover: 26 | go test $(gosubdir) -covermode=atomic -coverprofile=coverage.coverprofile 27 | 28 | fmt: 29 | go fmt $(gosubdir) 30 | 31 | generate: 32 | go generate $(gosubdir) 33 | 34 | test: 35 | go test -vet all $(gosubdir) 36 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/css.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | -------------------------------------------------------------------------------- /enmesh_in_gopath.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | # This script takes a clean checkout of the ProxyFS repo, turns it into a 7 | # working directory (e.g., enmeshes it into src/github.com/NVIDIA/proxyfs) 8 | # It is intended for use by CI/CD systems. 9 | 10 | set -e 11 | shopt -s extglob 12 | 13 | ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 14 | NVIDIA_DIR=src/github.com/NVIDIA 15 | REPO_CLONE_PARENT_DIR=$ROOT_DIR/$NVIDIA_DIR 16 | PROXYFS_DIR=$REPO_CLONE_PARENT_DIR/proxyfs 17 | 18 | if [ ! -d $PROXYFS_DIR ]; then 19 | cd $ROOT_DIR 20 | mkdir -p $PROXYFS_DIR 21 | mv !(ci.sh|src) $PROXYFS_DIR 22 | 23 | # Ensure that the enmeshed dir is still usable as a git repo 24 | mv .git* $PROXYFS_DIR 25 | cp ci.sh $PROXYFS_DIR 26 | fi 27 | -------------------------------------------------------------------------------- /GoPlugInMakefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # GoPlugInMakefile is a template to be included by Go PlugIn Makefile's in this repo 5 | 6 | minimal: generate build 7 | 8 | all: fmt minimal test 9 | 10 | .PHONY: all bench build clean cover fmt generate minimal test 11 | 12 | bench: 13 | go test -bench $(gosubdir) 14 | 15 | build: 16 | @set -e; \ 17 | go build -buildmode=plugin $(gosubdir) 18 | 19 | clean: 20 | @set -e; \ 21 | go clean -i $(gosubdir); \ 22 | for generatedfile in $(generatedfiles); do \ 23 | rm -f $$generatedfile; \ 24 | done 25 | 26 | cover: 27 | go test $(gosubdir) -covermode=atomic -coverprofile=coverage.coverprofile 28 | 29 | fmt: 30 | go fmt $(gosubdir) 31 | 32 | generate: 33 | go generate $(gosubdir) 34 | 35 | test: 36 | go test -vet all $(gosubdir) 37 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/titlerow.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{ title }}

4 |
5 |
6 | {% if prev %} 7 | 8 | {% endif %} 9 | {% if next %} 10 | 11 | {% endif %} 12 | {%- if bug_project %} 13 | 14 | {% endif %} 15 |
16 |
17 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/set_up_swift3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | PROXYSERVERCONF=/etc/swift/proxy-server.conf 7 | grep "\[filter\:swift3\]" $PROXYSERVERCONF > /dev/null 2>&1 8 | if [ $? -eq 0 ]; then 9 | echo "Swift3 is already set up. No need to do anything. Run enable_swift3 to enable this configuration." 10 | exit 0 11 | fi 12 | 13 | set -e 14 | 15 | cat <> $PROXYSERVERCONF 16 | 17 | [filter:swift3] 18 | use = egg:swift3#swift3 19 | s3_acl = yes 20 | dns_compliant_bucket_names = yes 21 | check_bucket_owner = yes 22 | allow_multipart_uploads = yes 23 | force_swift_request_proxy_log = yes 24 | 25 | EOT 26 | 27 | echo "Swift was configured successfully for swift3, but NOT ENABLED YET. In order to enable it, run:" 28 | echo " enable_swift3" 29 | -------------------------------------------------------------------------------- /run_docker_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | set -e 7 | 8 | IMAGE=$1 9 | 10 | if [ -z "$IMAGE" ] 11 | then 12 | echo "usage: $0 build|pull" 13 | exit 1 14 | fi 15 | 16 | if [ "$IMAGE" == "build" ]; then 17 | set -x 18 | # That's how you run it from scratch 19 | docker build -t proxyfs_unit_tests test/container 20 | docker run --cap-add SYS_ADMIN --device /dev/fuse -it -v `pwd`:/gopathroot/src/github.com/NVIDIA/proxyfs proxyfs_unit_tests 21 | elif [ "$IMAGE" == "pull" ]; then 22 | set -x 23 | # That's how you run it using the image on Docker Hub 24 | docker run --cap-add SYS_ADMIN --device /dev/fuse -it -v `pwd`:/gopathroot/src/github.com/NVIDIA/proxyfs swiftstack/proxyfs_unit_tests 25 | else 26 | echo "Bad argument: $IMAGE" 27 | exit 1 28 | fi 29 | -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/swift/proxy-server/default.conf-template.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | workers = 1 3 | 4 | [filter:catch_errors] 5 | use = egg:swift#catch_errors 6 | 7 | [filter:proxy-logging] 8 | use = egg:swift#proxy_logging 9 | 10 | [filter:healthcheck] 11 | use = egg:swift#healthcheck 12 | 13 | [filter:cache] 14 | use = egg:swift#memcache 15 | 16 | [filter:bulk] 17 | use = egg:swift#bulk 18 | 19 | [filter:slo] 20 | use = egg:swift#slo 21 | 22 | [filter:dlo] 23 | use = egg:swift#dlo 24 | 25 | [filter:tempurl] 26 | use = egg:swift#tempurl 27 | 28 | [filter:container_sync] 29 | use = egg:swift#container_sync 30 | current = //TEST/SAIO 31 | 32 | [filter:staticweb] 33 | use = egg:swift#staticweb 34 | 35 | [app:proxy-server] 36 | use = egg:swift#proxy 37 | allow_account_management = true 38 | account_autocreate = true 39 | object_post_as_copy = <%= @post_as_copy %> 40 | -------------------------------------------------------------------------------- /cookbooks/proxyfs_swift/templates/default/etc/swift/proxy-server/default.conf-template.erb: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | workers = 1 3 | 4 | [filter:catch_errors] 5 | use = egg:swift#catch_errors 6 | 7 | [filter:proxy-logging] 8 | use = egg:swift#proxy_logging 9 | 10 | [filter:healthcheck] 11 | use = egg:swift#healthcheck 12 | 13 | [filter:cache] 14 | use = egg:swift#memcache 15 | 16 | [filter:bulk] 17 | use = egg:swift#bulk 18 | 19 | [filter:slo] 20 | use = egg:swift#slo 21 | 22 | [filter:dlo] 23 | use = egg:swift#dlo 24 | 25 | [filter:tempurl] 26 | use = egg:swift#tempurl 27 | 28 | [filter:container_sync] 29 | use = egg:swift#container_sync 30 | current = //TEST/SAIO 31 | 32 | [filter:staticweb] 33 | use = egg:swift#staticweb 34 | 35 | [app:proxy-server] 36 | use = egg:swift#proxy 37 | allow_account_management = true 38 | account_autocreate = true 39 | object_post_as_copy = <%= @post_as_copy %> 40 | -------------------------------------------------------------------------------- /ci/ansible/tasks/files/usr/bin/disable_core_dumps: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sed -i '/ulimit/c\ulimit -c 0' /etc/bashrc 4 | sed -i '/Environment=GOTRACEBACK=/c\Environment=GOTRACEBACK=1' /usr/lib/systemd/system/proxyfsd.service 5 | sed -i '/LimitCORE=/c\LimitCORE=0' /usr/lib/systemd/system/proxyfsd.service 6 | sed -i '/Environment=GOTRACEBACK=/c\Environment=GOTRACEBACK=1' /usr/lib/systemd/system/pfsagentd.service 7 | sed -i '/LimitCORE=/c\LimitCORE=0' /usr/lib/systemd/system/pfsagentd.service 8 | 9 | systemctl daemon-reload 10 | if systemctl is-active -q proxyfsd; then 11 | /usr/bin/start_and_mount_pfs keepmounts 12 | fi 13 | 14 | echo "Core dumping has been disabled for ProxyFS and PFSAgent, and it will be " 15 | echo "disabled for everything else the next time you log into this container." 16 | echo "If you want disable core dumping for everything else NOW, please run:" 17 | echo " ulimit -c 0" 18 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/lib/systemd/system/pfsagentd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=PFSAgent service 3 | After=proxyfsd.service 4 | 5 | [Service] 6 | Environment=PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin 7 | # Set GOTRACEBACK=1 to prevent core dumps to be created 8 | # Set GOTRACEBACK=crash to allow core dumps to be created 9 | Environment=GOTRACEBACK=1 10 | LimitCORE=0 11 | ExecStart=/usr/bin/pfsagentd /etc/pfsagentd/pfsagent.conf Agent.FUSEMountPointPath=/mnt/pfsa_proxyfs_mount 12 | ExecReload=/usr/bin/kill -HUP $MAINPID 13 | 14 | Restart=always 15 | # Send stopping SIGTERM (and later SIGKILL if necessary) to the main process 16 | # only. This prevents systemd from interfering with backends processing 17 | # requests after the parent process has been sent a SIGHUP by the ExecReload. 18 | KillMode=process 19 | 20 | 21 | [Install] 22 | WantedBy=multi-user.target 23 | -------------------------------------------------------------------------------- /ci/ansible/tasks/files/usr/bin/enable_core_dumps: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sed -i '/ulimit/c\ulimit -c unlimited' /etc/bashrc 4 | sed -i '/Environment=GOTRACEBACK=/c\Environment=GOTRACEBACK=crash' /usr/lib/systemd/system/proxyfsd.service 5 | sed -i '/LimitCORE=/c\LimitCORE=infinity' /usr/lib/systemd/system/proxyfsd.service 6 | sed -i '/Environment=GOTRACEBACK=/c\Environment=GOTRACEBACK=crash' /usr/lib/systemd/system/pfsagentd.service 7 | sed -i '/LimitCORE=/c\LimitCORE=infinity' /usr/lib/systemd/system/pfsagentd.service 8 | 9 | systemctl daemon-reload 10 | if systemctl is-active -q proxyfsd; then 11 | /usr/bin/start_and_mount_pfs keepmounts 12 | fi 13 | 14 | echo "Core dumping has been enabled for ProxyFS and PFSAgent, and it will be " 15 | echo "enabled for everything else the next time you log into this container." 16 | echo "If you want enable core dumping for everything else NOW, please run:" 17 | echo " ulimit -c unlimited" 18 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/lib/systemd/system/proxyfsd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Swift ProxyFS service 3 | 4 | [Service] 5 | Environment=NSS_SDB_USE_CACHE=YES 6 | Environment=PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin 7 | # Set GOTRACEBACK=1 to prevent core dumps to be created 8 | # Set GOTRACEBACK=crash to allow core dumps to be created 9 | Environment=GOTRACEBACK=1 10 | LimitCORE=0 11 | ExecStart=/usr/bin/proxyfsd /etc/proxyfsd/saioproxyfsd0.conf 12 | ExecReload=/usr/bin/kill -HUP $MAINPID 13 | 14 | Restart=always 15 | # Send stopping SIGTERM (and later SIGKILL if necessary) to the main process 16 | # only. This prevents systemd from interfering with backends processing 17 | # requests after the parent process has been sent a SIGHUP by the ExecReload. 18 | KillMode=process 19 | 20 | 21 | [Install] 22 | # Don't consider our failure a boot failure 23 | WantedBy=multi-user.target smb.service pfsagent.service 24 | -------------------------------------------------------------------------------- /ihtml/static-content/utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015-2021, NVIDIA CORPORATION. 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | function backToTop() { 7 | document.body.scrollTop = 0; 8 | document.documentElement.scrollTop = 0; 9 | } 10 | 11 | function getBackToTopButton() { 12 | return document.getElementById("btn-back-to-top"); 13 | } 14 | 15 | function defineOnScrollBehavior(back_to_top_button) { 16 | window.onscroll = function () { 17 | if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 18 | back_to_top_button.style.display = "block"; 19 | } else { 20 | back_to_top_button.style.display = "none"; 21 | } 22 | }; 23 | } 24 | 25 | function addBackToTopBehavior() { 26 | let back_to_top_button = getBackToTopButton(); 27 | defineOnScrollBehavior(back_to_top_button); 28 | back_to_top_button.addEventListener("click", backToTop); 29 | } 30 | -------------------------------------------------------------------------------- /.github/workflows/run-unit-tests.yml: -------------------------------------------------------------------------------- 1 | name: Unit Tests 2 | on: [push] 3 | jobs: 4 | Build-and-unit-test: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | with: 9 | fetch-depth: 0 10 | submodules: false 11 | - name: Build, run unit tests, and get coverage 12 | run: docker run -e "GOFLAGS=-buildvcs=false" -e "COVERALLS_TOKEN=${{ secrets.COVERALLS_TOKEN }}" -e "GIT_BRANCH=${{ github.ref }}" --cap-add SYS_ADMIN --device /dev/fuse -i -v `pwd`:/gopathroot/src/github.com/NVIDIA/proxyfs golang:1.22 /bin/bash -c "/gopathroot/src/github.com/NVIDIA/proxyfs/.github/workflows/run-unit-tests.sh" 13 | - name: Slack Notification 14 | uses: rtCamp/action-slack-notify@v2 15 | env: 16 | SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} 17 | SLACK_COLOR: ${{ job.status }} 18 | SLACK_MESSAGE: 'Unit tests status: ${{ job.status }}' 19 | if: always() 20 | -------------------------------------------------------------------------------- /bucketstats/atomic_linux_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Per bugs in the 32-bit versions of 64-bit sync/atomic API implementations, 5 | // this file implements those operations by means of a global lock. 6 | 7 | package bucketstats 8 | 9 | import "sync" 10 | 11 | var ( 12 | atomicMutex sync.Mutex 13 | ) 14 | 15 | func atomicAddUint64(addr *uint64, val uint64) { 16 | atomicMutex.Lock() 17 | prevVal := *addr 18 | *addr = prevVal + val 19 | atomicMutex.Unlock() 20 | } 21 | 22 | func atomicIncUint64(addr *uint64) { 23 | atomicMutex.Lock() 24 | prevVal := *addr 25 | *addr = prevVal + 1 26 | atomicMutex.Unlock() 27 | } 28 | 29 | func atomicLoadUint64(addr *uint64) (val uint64) { 30 | atomicMutex.Lock() 31 | val = *addr 32 | atomicMutex.Unlock() 33 | return 34 | } 35 | 36 | func atomicStoreUint64(addr *uint64, val uint64) { 37 | atomicMutex.Lock() 38 | *addr = val 39 | atomicMutex.Unlock() 40 | } 41 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/disable_s3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | set -e 7 | 8 | usage() { 9 | echo "Usage: $0 [s3 library name]" 10 | echo "s3 library name options:" 11 | echo " s3api" 12 | echo " swift3" 13 | exit 1 14 | } 15 | 16 | if [ $# -gt 0 ]; then 17 | LIBRARY="$1" 18 | LIBRARY=${LIBRARY,,} 19 | if [ "$LIBRARY" != "s3api" ] && [ "$LIBRARY" != "swift3" ]; then 20 | if [ "$LIBRARY" != "-h" ] && [ "$LIBRARY" != "--help" ]; then 21 | echo "Invalid argument '$1'." 22 | echo 23 | fi 24 | usage 25 | fi 26 | else 27 | usage 28 | fi 29 | 30 | PROXYSERVERCONF=/etc/swift/proxy-server.conf 31 | 32 | sed -i "/^pipeline/ s/${LIBRARY} tempauth/tempauth/" $PROXYSERVERCONF 33 | 34 | echo "${LIBRARY} was successfully disabled. Remember to restart Swift or just run:" 35 | echo " start_and_mount_pfs" 36 | -------------------------------------------------------------------------------- /iclient/iclientpkg/impl.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package iclientpkg 5 | 6 | import ( 7 | "github.com/NVIDIA/proxyfs/conf" 8 | ) 9 | 10 | func start(confMap conf.ConfMap, fissionErrChan chan error) (err error) { 11 | err = initializeGlobals(confMap, fissionErrChan) 12 | if nil != err { 13 | return 14 | } 15 | 16 | err = startRPCHandler() 17 | if nil != err { 18 | return 19 | } 20 | 21 | err = performMountFUSE() 22 | if nil != err { 23 | return 24 | } 25 | 26 | err = startHTTPServer() 27 | if nil != err { 28 | return 29 | } 30 | 31 | return 32 | } 33 | 34 | func stop() (err error) { 35 | err = stopHTTPServer() 36 | if nil != err { 37 | return 38 | } 39 | 40 | err = performUnmountFUSE() 41 | if nil != err { 42 | return 43 | } 44 | 45 | err = stopRPCHandler() 46 | if nil != err { 47 | return 48 | } 49 | 50 | err = uninitializeGlobals() 51 | 52 | return 53 | } 54 | 55 | func signal() (err error) { 56 | logSIGHUP() 57 | 58 | err = nil 59 | return 60 | } 61 | -------------------------------------------------------------------------------- /ci/chef.attribs.json: -------------------------------------------------------------------------------- 1 | { 2 | "run_list": [ "recipe[pfs_middleware]", "recipe[swift]", "recipe[proxyfs]" ], 3 | "full_reprovision": "false", 4 | "loopback_gb": 4, 5 | "extra_packages": [], 6 | "storage_policies": ["default"], 7 | "ec_policy": "", 8 | "servers_per_port": 0, 9 | "object_sync_method": "rsync", 10 | "post_as_copy": "true", 11 | "part_power": 10, 12 | "replicas": 3, 13 | "ec_replicas": 6, 14 | "regions": 1, 15 | "zones": 4, 16 | "nodes": 4, 17 | "disks": 4, 18 | "ec_disks": 8, 19 | "swift_user": "swiftstack", 20 | "swift_group": "swiftstack", 21 | "proxyfs_user": "swiftstack", 22 | "proxyfs_group": "swiftstack", 23 | "swift_repo": "git://github.com/openstack/swift.git", 24 | "swift_repo_branch": "master", 25 | "swiftclient_repo": "git://github.com/openstack/python-swiftclient.git", 26 | "swiftclient_repo_branch": "master", 27 | "swift_bench_repo": "git://github.com/openstack/swift-bench.git", 28 | "swift_bench_repo_branch": "master", 29 | "extra_key": "", 30 | "source_root": "/home/swiftstack/provisioning" 31 | } 32 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/vagrant.attribs.json: -------------------------------------------------------------------------------- 1 | { 2 | "run_list": [ "recipe[pfs_middleware]", "recipe[proxyfs]" ], 3 | "full_reprovision": "false", 4 | "loopback_gb": 4, 5 | "extra_packages": [], 6 | "storage_policies": ["default"], 7 | "ec_policy": "", 8 | "servers_per_port": 0, 9 | "object_sync_method": "rsync", 10 | "post_as_copy": "true", 11 | "part_power": 10, 12 | "replicas": 3, 13 | "ec_replicas": 6, 14 | "regions": 1, 15 | "zones": 4, 16 | "nodes": 4, 17 | "disks": 4, 18 | "ec_disks": 8, 19 | "swift_user": "vagrant", 20 | "swift_group": "vagrant", 21 | "swift_uid": 1000, 22 | "swift_gid": 1000, 23 | "proxyfs_user": "vagrant", 24 | "proxyfs_group": "vagrant", 25 | "swift_repo": "git://github.com/openstack/swift.git", 26 | "swift_repo_branch": "master", 27 | "swiftclient_repo": "git://github.com/openstack/python-swiftclient.git", 28 | "swiftclient_repo_branch": "master", 29 | "swift_bench_repo": "git://github.com/openstack/swift-bench.git", 30 | "swift_bench_repo_branch": "master", 31 | "extra_key": "", 32 | "source_root": "/vagrant" 33 | } 34 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | In addition to the open-source contributors who can be found in the revision history of this project, the ProxyFS team would also like 2 | to thank the following contributors to the ProxyFS project: 3 | 4 | - The abductive **Balaji Rao** for his insightful design and implementation in the early, pre-open-source phases of development in many areas core to the file system. 5 | - The indefatigable **Kim Malone** for her extensive work in the early, pre-open-source phases of development on the jrrpc layer and other areas of the code. 6 | - The incomparable **Zack M. Davis** for his effort in protoyping and investigations in early phases of the project and implementations and 7 | testing in later phases. 8 | - **Didier M. Contis'** team at Georgia Tech, who display a rare combination of inquisitiveness and patience, and have been (and continue to be) a great 9 | help throughout the development of this software. We would like in particular to call out **Asu Ogork** and **Paul Manno** for their help testing, 10 | benchmarking, and representing the concerns of real administrators with complex deployment scenarios. 11 | -------------------------------------------------------------------------------- /cookbooks/swift/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | 5 | include_recipe "swift::setup" 6 | include_recipe "swift::source" 7 | include_recipe "swift::data" 8 | include_recipe "swift::configs" 9 | include_recipe "swift::rings" 10 | 11 | # start main 12 | 13 | cookbook_file "/usr/lib/systemd/system/swift.service" do 14 | source "usr/lib/systemd/system/swift.service" 15 | # notifies :restart, 'service[swift]' 16 | only_if { ::File.directory?("/usr/lib/systemd/system/") } 17 | end 18 | 19 | # Enable Swift to start at bootup on Centos 20 | # 21 | # 22 | if node[:platform_family].include?("rhel") 23 | execute "Enable Swift to start at bootup on Centos" do 24 | command "/usr/bin/systemctl enable swift.service" 25 | end 26 | end 27 | 28 | cookbook_file "/etc/init/swift.conf" do 29 | source "etc/init/swift.upstart" 30 | # notifies :restart, 'service[swift]' 31 | only_if { ::File.directory?("/etc/init") } 32 | end 33 | 34 | execute "startmain" do 35 | command "sudo -u #{node['swift_user']} swift-init start main" 36 | end 37 | 38 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/ci.attribs.json: -------------------------------------------------------------------------------- 1 | { 2 | "run_list": [ "recipe[pfs_middleware]", "recipe[proxyfs]" ], 3 | "full_reprovision": "false", 4 | "loopback_gb": 4, 5 | "extra_packages": [], 6 | "storage_policies": ["default"], 7 | "ec_policy": "", 8 | "servers_per_port": 0, 9 | "object_sync_method": "rsync", 10 | "post_as_copy": "true", 11 | "part_power": 10, 12 | "replicas": 3, 13 | "ec_replicas": 6, 14 | "regions": 1, 15 | "zones": 4, 16 | "nodes": 4, 17 | "disks": 4, 18 | "ec_disks": 8, 19 | "swift_user": "swiftstack", 20 | "swift_group": "swiftstack", 21 | "swift_uid": 1000, 22 | "swift_gid": 1000, 23 | "proxyfs_user": "swiftstack", 24 | "proxyfs_group": "swiftstack", 25 | "swift_repo": "git://github.com/openstack/swift.git", 26 | "swift_repo_branch": "master", 27 | "swiftclient_repo": "git://github.com/openstack/python-swiftclient.git", 28 | "swiftclient_repo_branch": "master", 29 | "swift_bench_repo": "git://github.com/openstack/swift-bench.git", 30 | "swift_bench_repo_branch": "master", 31 | "extra_key": "", 32 | "source_root": "/home/swiftstack/provisioning" 33 | } 34 | -------------------------------------------------------------------------------- /docs/source/architecture/uml-references.rst: -------------------------------------------------------------------------------- 1 | Reference Diagrams 2 | ================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | 8 | Filesystem Checkpoints 9 | ---------------------- 10 | .. image:: /architecture/uml/png/checkpoint.png 11 | 12 | Create File 13 | ----------- 14 | .. image:: /architecture/uml/png/create-file.png 15 | 16 | File New Write 17 | -------------- 18 | .. image:: /architecture/uml/png/file-write-new.png 19 | 20 | File Old Write 21 | -------------- 22 | .. image:: /architecture/uml/png/file-write-old.png 23 | 24 | Read 25 | ---- 26 | .. image:: /architecture/uml/png/read.png 27 | 28 | Write 29 | ----- 30 | .. image:: /architecture/uml/png/write.png 31 | 32 | Flush 33 | ----- 34 | .. image:: /architecture/uml/png/flush.png 35 | 36 | Samba Create Write 37 | ------------------ 38 | .. image:: /architecture/uml/png/samba-create-write.png 39 | 40 | Object Bimodal PUT Container/Bucket 41 | ----------------------------------- 42 | .. image:: /architecture/uml/png/bimodal-put-newcontainer.png 43 | 44 | Object Bimodal PUT File 45 | ----------------------- 46 | .. image:: /architecture/uml/png/bimodal-put-newfile.png 47 | -------------------------------------------------------------------------------- /imgr/imgrpkg/impl.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package imgrpkg 5 | 6 | import ( 7 | "github.com/NVIDIA/proxyfs/conf" 8 | ) 9 | 10 | func start(confMap conf.ConfMap) (err error) { 11 | err = initializeGlobals(confMap) 12 | if nil != err { 13 | return 14 | } 15 | 16 | err = startSwiftClient() 17 | if nil != err { 18 | return 19 | } 20 | 21 | err = startVolumeManagement() 22 | if nil != err { 23 | return 24 | } 25 | 26 | err = startRetryRPCServer() 27 | if nil != err { 28 | return 29 | } 30 | 31 | err = startHTTPServer() 32 | if nil != err { 33 | return 34 | } 35 | 36 | return 37 | } 38 | 39 | func stop() (err error) { 40 | err = stopHTTPServer() 41 | if nil != err { 42 | return 43 | } 44 | 45 | err = stopRetryRPCServer() 46 | if nil != err { 47 | return 48 | } 49 | 50 | err = stopVolumeManagement() 51 | if nil != err { 52 | return 53 | } 54 | 55 | err = stopSwiftClient() 56 | if nil != err { 57 | return 58 | } 59 | 60 | err = uninitializeGlobals() 61 | 62 | return 63 | } 64 | 65 | func signal() (err error) { 66 | logSIGHUP() 67 | 68 | err = nil 69 | return 70 | } 71 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/bimodal-put-newcontainer.uml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | title Bimodal PUT API - New Container Case 4 | 5 | autonumber 6 | 7 | box "Swift WSGI" 8 | participant WSGI 9 | participant RPCclient 10 | end box 11 | box "ProxyFS" 12 | participant PFSrpcsvr 13 | participant PFSfs 14 | participant PFSinode 15 | end box 16 | participant SwiftBE 17 | 18 | ->WSGI: ?Put 19 | 20 | WSGI -> WSGI:Virtual account 21 | 22 | WSGI -> RPCclient:proxyfs_new_container(authUser,\nvAccount, vNewContainer) 23 | 24 | RPCclient -> PFSrpcsvr:RpcCreateContainer(authUser,\nvAccount, vNewContainer) 25 | 26 | PFSrpcsvr -> PFSrpcsvr:Extract vAccount 27 | 28 | PFSrpcsvr -> PFSrpcsvr:Get mapping of vAccount to volumeName 29 | 30 | PFSrpcsvr -> PFSfs:If volume is not mounted for this user,\nfs.Mount(volumeName, mountOptions, authUser) 31 | 32 | PFSfs -> PFSrpcsvr:Return mountId, rootInodeNumber, err 33 | 34 | PFSrpcsvr -> PFSfs:fs.Mkdir(mountId, rootInodeNumber, basename is vNewContainer) 35 | PFSfs -> PFSrpcsvr:Return newDirInodeNumber, err 36 | 37 | PFSrpcsvr -> RPCclient:Return status 38 | 39 | RPCclient -> WSGI:Return status 40 | 41 | @enduml 42 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/enable_s3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | set -e 7 | 8 | usage() { 9 | echo "Usage: $0 [s3 library name]" 10 | echo "s3 library name options:" 11 | echo " s3api" 12 | echo " swift3" 13 | exit 1 14 | } 15 | 16 | if [ $# -gt 0 ]; then 17 | LIBRARY="$1" 18 | LIBRARY=${LIBRARY,,} 19 | if [ "$LIBRARY" != "s3api" ] && [ "$LIBRARY" != "swift3" ]; then 20 | if [ "$LIBRARY" != "-h" ] && [ "$LIBRARY" != "--help" ]; then 21 | echo "Invalid argument '$1'." 22 | echo 23 | fi 24 | usage 25 | fi 26 | else 27 | usage 28 | fi 29 | 30 | PROXYSERVERCONF=/etc/swift/proxy-server.conf 31 | 32 | # Making sure there's no other s3api/swift3 already enabled 33 | sed -i '/^pipeline/ s/swift3 tempauth/tempauth/' $PROXYSERVERCONF 34 | sed -i '/^pipeline/ s/s3api tempauth/tempauth/' $PROXYSERVERCONF 35 | # Enabling s3 library 36 | sed -i "/^pipeline/ s/tempauth/${LIBRARY} tempauth/" $PROXYSERVERCONF 37 | 38 | echo "${LIBRARY} was successfully enabled. Remember to restart Swift or just run:" 39 | echo " start_and_mount_pfs" 40 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/stop_proxyfsd_only: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | # A simple script to start or stop proxyfsd 7 | # The PATH, etc should already be setup by systemctl environment 8 | 9 | function await_proxyfsd_shutdown { 10 | while true 11 | do 12 | pidof proxyfsd > /dev/null 13 | if [ $? -ne 0 ] 14 | then 15 | break 16 | fi 17 | echo "Waiting for ProxyFS to be stopped..." 18 | sleep 1 19 | done 20 | } 21 | 22 | function await_pfsagentd_shutdown { 23 | while true 24 | do 25 | pidof pfsagentd > /dev/null 26 | if [ $? -ne 0 ] 27 | then 28 | break 29 | fi 30 | echo "Waiting for PFSAgent to be stopped..." 31 | sleep 1 32 | done 33 | } 34 | 35 | if [ -f /usr/bin/systemctl ]; then 36 | # Centos 37 | sudo /usr/bin/systemctl stop pfsagentd 38 | await_pfsagentd_shutdown 39 | sudo /usr/bin/systemctl stop proxyfsd 40 | await_proxyfsd_shutdown 41 | else 42 | # Ubuntu (not tested!) 43 | sudo /usr/sbin/service proxyfsd stop 44 | await_proxyfsd_shutdown 45 | fi 46 | -------------------------------------------------------------------------------- /bin/space.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Outputs: 7 | # VmSize (kB) sum for all smbd and proxyfsd processes on this node 8 | # Disk space used (in 1K-blocks) by all Swift devices on this node 9 | 10 | vmsize=$(pidof proxyfsd smbd | xargs -n 1 | awk '{print "/proc/"$1"/status"}' | xargs -n 1 grep VmSize | awk '{print $2}' | awk '{sum +=1 $1} END {print sum}') 11 | 12 | vdevlist=$(mktemp) 13 | 14 | find /etc/swift -name 20_settings.conf | grep account-server | xargs grep devices | awk '{print $3}' >> $vdevlist 15 | find /etc/swift -name 20_settings.conf | grep container-server | xargs grep devices | awk '{print $3}' >> $vdevlist 16 | find /etc/swift -name 20_settings.conf | grep object-server | xargs grep devices | awk '{print $3}' >> $vdevlist 17 | 18 | pdevspace=$(mktemp) 19 | 20 | (cat $vdevlist | sort | uniq | xargs df | sort | uniq | grep -v Filesystem | awk '{print $1}' | sort | uniq | xargs df | awk 'NR > 1 {print $3}') > $pdevspace 21 | 22 | rm $vdevlist 23 | 24 | diskspace=$(cat $pdevspace | awk '{sum += $1} END {print sum}') 25 | 26 | rm $pdevspace 27 | 28 | echo "smbd/proxyfsd-VmSize(KB) $vmsize Swift-ACO-space(KB) $diskspace" 29 | -------------------------------------------------------------------------------- /ci/ansible/chef_files/runway.attribs.json: -------------------------------------------------------------------------------- 1 | { 2 | "run_list": [ "recipe[pfs_middleware]", "recipe[meta_middleware]", "recipe[proxyfs_swift]", "recipe[proxyfs]" ], 3 | "full_reprovision": "false", 4 | "loopback_gb": 4, 5 | "extra_packages": [], 6 | "storage_policies": ["default"], 7 | "ec_policy": "", 8 | "servers_per_port": 0, 9 | "object_sync_method": "rsync", 10 | "post_as_copy": "true", 11 | "part_power": 10, 12 | "replicas": 3, 13 | "ec_replicas": 6, 14 | "regions": 1, 15 | "zones": 4, 16 | "nodes": 4, 17 | "disks": 4, 18 | "ec_disks": 8, 19 | "swift_user": "swift", 20 | "swift_group": "swift", 21 | "swift_uid": 1000, 22 | "swift_gid": 1000, 23 | "proxyfs_user": "swift", 24 | "proxyfs_group": "swift", 25 | "swift_repo": "git://github.com/openstack/swift.git", 26 | "swift_repo_branch": "master", 27 | "swiftclient_repo": "git://github.com/openstack/python-swiftclient.git", 28 | "swiftclient_repo_branch": "master", 29 | "swift_bench_repo": "git://github.com/openstack/swift-bench.git", 30 | "swift_bench_repo_branch": "master", 31 | "extra_key": "", 32 | "source_root": "/home/swift/code/proxyfs", 33 | "package_spec_path": "/home/swift/code/proxyfs/src/github.com/NVIDIA/proxyfs/ci/ansible/chef_files/packages" 34 | } 35 | -------------------------------------------------------------------------------- /retryrpc/perfrpc/perfrpc.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "os" 7 | ) 8 | 9 | // Interface defining the subcommands for this command 10 | // 11 | // Allows us to organize all variables for a subcommand in one place 12 | // 13 | type Runner interface { 14 | Init([]string) error // Based on subcommand - init arguments before parsing 15 | Name() string // Return name of subcommand 16 | Run() error // Perform subcommand 17 | } 18 | 19 | // Find subcommand, init flagSet, parse and and run subcommand 20 | func main() { 21 | var ( 22 | err error 23 | ) 24 | 25 | if len(os.Args) < 2 { 26 | err = errors.New("You must pass a sub-command - either 'client' or 'server'") 27 | fmt.Println(err) 28 | os.Exit(1) 29 | } 30 | 31 | cmds := []Runner{ 32 | NewClientCommand(), 33 | NewServerCommand(), 34 | } 35 | 36 | subcommand := os.Args[1] 37 | for _, cmd := range cmds { 38 | if cmd.Name() == subcommand { 39 | cmd.Init(os.Args[2:]) 40 | err = cmd.Run() 41 | if err != nil { 42 | fmt.Println(err) 43 | os.Exit(1) 44 | } 45 | os.Exit(0) 46 | } 47 | } 48 | 49 | err = fmt.Errorf("Unknown subcommand: %s - must be either 'client' or 'server'", subcommand) 50 | fmt.Println(err) 51 | os.Exit(1) 52 | 53 | } 54 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/start_proxyfsd_only: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | # A simple script to start or stop proxyfsd 7 | # The PATH, etc should already be setup by systemctl environment 8 | 9 | function await_proxyfsd_startup { 10 | /usr/bin/systemctl -q is-active proxyfsd 11 | if [ $? -ne 0 ] 12 | then 13 | echo "ProxyFS failed to start. Exiting..." 14 | exit 1 15 | fi 16 | while true 17 | do 18 | curl http://127.0.0.1:15346/ 2>/dev/null >/dev/null 19 | if [ $? -eq 0 ] 20 | then 21 | break 22 | fi 23 | echo "Waiting for ProxyFS to be started..." 24 | sleep 1 25 | done 26 | } 27 | 28 | function await_pfsagentd_shutdown { 29 | while true 30 | do 31 | pidof pfsagentd > /dev/null 32 | if [ $? -ne 0 ] 33 | then 34 | break 35 | fi 36 | echo "Waiting for PFSAgent to be stopped..." 37 | sleep 1 38 | done 39 | } 40 | 41 | if [ -f /usr/bin/systemctl ]; then 42 | # Centos 43 | sudo /usr/bin/systemctl stop pfsagentd 44 | await_pfsagentd_shutdown 45 | sudo /usr/bin/systemctl start proxyfsd 46 | await_proxyfsd_startup 47 | else 48 | # Ubuntu (not tested!) 49 | sudo /usr/sbin/service proxyfsd start 50 | await_proxyfsd_startup 51 | fi 52 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/search.html: -------------------------------------------------------------------------------- 1 | {# 2 | basic/search.html 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Template for the search page. 6 | 7 | :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | #} 10 | {% extends "layout.html" %} 11 | {% set title = _('Search') %} 12 | {% block extrahead %} 13 | {{ super() }} 14 | {% endblock %} 15 | {% block body %} 16 |
17 | 18 |

19 | {% trans %}Please activate JavaScript to enable the search 20 | functionality.{% endtrans %} 21 |

22 |
23 |

24 | {% trans %}To search the documentation for {{ project }}, type your query into the 25 | box below and press Enter.{% endtrans %} 26 |

27 |
28 | 29 | 30 | 31 | 32 |
33 | 34 |
35 | {% endblock %} 36 | 37 | {% block script_footer %} 38 | 41 | 42 | 43 | {% endblock %} 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Local additions 2 | *~ 3 | .DS_Store 4 | .vscode 5 | *.swp 6 | *.pem 7 | 8 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 9 | *.o 10 | *.a 11 | *.so 12 | build/ 13 | dist/ 14 | 15 | # Local FUSE Mount Point directories 16 | AgentMountPoint 17 | CommonMountPoint 18 | 19 | # Default etcd database 20 | default.etcd/ 21 | 22 | # Replay Logs 23 | CommonVolume.rlog 24 | 25 | # specific binaries 26 | jrpcfs/test/client 27 | go-acc 28 | 29 | # Folders 30 | _obj 31 | _test 32 | 33 | # Architecture specific extensions/prefixes 34 | *.[568vq] 35 | [568vq].out 36 | 37 | *.cgo1.go 38 | *.cgo2.c 39 | _cgo_defun.c 40 | _cgo_gotypes.go 41 | _cgo_export.* 42 | 43 | _testmain.go 44 | 45 | *.exe 46 | *.test 47 | *.prof 48 | *.uds 49 | *.pyc 50 | *.png 51 | 52 | # Vagrant private directory 53 | .vagrant/ 54 | .bundle/ 55 | 56 | # test coverage artifacts (see https://blog.golang.org/cover#TOC_5.) 57 | coverage.out 58 | count.out 59 | coverage.coverprofile 60 | 61 | # log files 62 | *.log 63 | 64 | # tags 65 | tags 66 | 67 | # setuptools leaves egg stuff around 68 | pfs_middleware/*.egg-info 69 | meta_middleware/*.egg-info 70 | 71 | # tox's virtualenvs 72 | .tox 73 | 74 | # coverage report temporary files 75 | pfs_middleware/.coverage 76 | 77 | # runway by-products 78 | ci/ansible/chef_files/local-mode-cache/ 79 | nodes/ 80 | 81 | # IDE-related stuff 82 | .idea 83 | 84 | # pfs-jrpc cache 85 | 86 | pfs-jrpc.env 87 | -------------------------------------------------------------------------------- /retryrpc/perfrpc/README.md: -------------------------------------------------------------------------------- 1 | # PerfRPC 2 | perfrpc is a tool to test and demonstrate the performance of the retryrpc layer. 3 | 4 | ## Starting a perfrpc Server 5 | 6 | `# ./perfrpc server -ipaddr 127.0.0.1 -port 53167 -tlsdir ./tls` 7 | 8 | where `tls` is the directory where the server should *write* the TLS credentials 9 | 10 | ## Starting a perfrpc Client 11 | 12 | `# ./perfrpc client -ipaddr 127.0.0.1 -port 53167 -tlsdir ./tls -clients 1000 -messages 100 -warmupcnt 10` 13 | 14 | `clients` is the number of clients the tool should create 15 | 16 | `messages` is the number of messages each client will send in parallel using goroutines 17 | 18 | `tls` is the directory where the client should *read* the TLS credentials 19 | 20 | `warmupcnt` is the number of messages each client will send to setup the connection and test the connection before running the performance test 21 | 22 | ## What is produced? 23 | 24 | perfrpc clients will print a message such as 25 | 26 | `===== PERFRPC - Clients: 10 Messages per Client: 10 Total Messages: 100 ---- Test Duration: 6.207882ms` 27 | 28 | illustrating how many clients and total messages were sent followed by the length of time to run the test 29 | ## Tips for large number of clients 30 | 31 | It is important to have enough file descriptors for your clients and servers. 32 | 33 | We suggest running as `root` and setting the `ulimit` high such as 34 | 35 | `ulimit -n 1000000` 36 | 37 | -------------------------------------------------------------------------------- /iswift/iswiftpkg/api.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package iswiftpkg implements an emulation of OpenStack Swift by presenting 5 | // a Swift Proxy responding to a minimal set of base OpenStack Swift HTTP 6 | // methods. While there is no support for TLS, a simple Auth functionality 7 | // is provided and its usage is enforced. 8 | // 9 | // To configure an iswiftpkg instance, Start() is called passing, as the sole 10 | // argument, a package conf ConfMap. Here is a sample .conf file: 11 | // 12 | // [ISWIFT] 13 | // SwiftProxyIPAddr: 127.0.0.1 14 | // SwiftProxyTCPPort: 8080 15 | // 16 | // MaxAccountNameLength: 256 17 | // MaxContainerNameLength: 256 18 | // MaxObjectNameLength: 1024 19 | // AccountListingLimit: 10000 20 | // ContainerListingLimit: 10000 21 | package iswiftpkg 22 | 23 | import ( 24 | "github.com/NVIDIA/proxyfs/conf" 25 | ) 26 | 27 | // Start is called to start serving the NoAuth Swift Proxy Port and, 28 | // optionally, the Auth Swift Proxy Port. 29 | func Start(confMap conf.ConfMap) (err error) { 30 | err = start(confMap) 31 | return 32 | } 33 | 34 | // Stop is called to stop serving. 35 | func Stop() (err error) { 36 | err = stop() 37 | return 38 | } 39 | 40 | // ForceReAuth is called to force a "401 Unauthorized" response to a 41 | // client's subsequent request forcing the client to reauthenticate. 42 | func ForceReAuth() { 43 | forceReAuth() 44 | } 45 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/footer.html: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /iauth/api.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package iauth 5 | 6 | import ( 7 | "fmt" 8 | "plugin" 9 | ) 10 | 11 | // PerformAuth accepts a path to an Auth PlugIn and a string to pass to a func 12 | // also named PerformAuth requesting it to perform the necessary authorization. 13 | // 14 | // The return from the Auth PlugIn's PerformAuth func is simply returned to the 15 | // caller of this func. 16 | func PerformAuth(authPlugInPath string, authInString string) (authToken string, storageURL string, err error) { 17 | var ( 18 | ok bool 19 | performAuthAsFunc func(authInString string) (authToken string, storageURL string, err error) 20 | performAuthAsSymbol plugin.Symbol 21 | plugIn *plugin.Plugin 22 | ) 23 | 24 | plugIn, err = plugin.Open(authPlugInPath) 25 | if nil != err { 26 | err = fmt.Errorf("plugin.Open(\"%s\") failed: %v", authPlugInPath, err) 27 | return 28 | } 29 | 30 | performAuthAsSymbol, err = plugIn.Lookup("PerformAuth") 31 | if nil != err { 32 | err = fmt.Errorf("plugIn[\"%s\"].Lookup(\"PerformAuth\") failed: %v", authPlugInPath, err) 33 | return 34 | } 35 | 36 | performAuthAsFunc, ok = performAuthAsSymbol.(func(authInString string) (authToken string, storageURL string, err error)) 37 | if !ok { 38 | err = fmt.Errorf("performAuthAsSymbol.(func(authInString string) (authToken string, storageURL string, err error)) returned !ok") 39 | return 40 | } 41 | 42 | authToken, storageURL, err = performAuthAsFunc(authInString) 43 | 44 | return 45 | } 46 | -------------------------------------------------------------------------------- /iclient/iclient.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | Usage="$(basename "$0") - Ask swift/imgr to format and serve testvol... and then sleep 4 | where: 5 | -f format volume 6 | -h show this help text 7 | -s supply static AuthToken to imgr" 8 | 9 | DoFormat=false 10 | StaticAuthToken=false 11 | 12 | while getopts 'fhs' option 13 | do 14 | case "$option" in 15 | f) DoFormat=true 16 | ;; 17 | h) echo "$Usage" 18 | exit 0 19 | ;; 20 | s) StaticAuthToken=true 21 | ;; 22 | ?) echo "$Usage" 23 | exit 1 24 | ;; 25 | esac 26 | done 27 | 28 | AuthToken="" 29 | 30 | while [ "$AuthToken" == "" ] 31 | do 32 | sleep 1 33 | AuthToken=`curl -v -s -H "X-Auth-User: test:tester" -H "X-Auth-Key: testing" swift:8080/auth/v1.0 2>&1 | awk /"X-Auth-Token:"/'{print $3}' | tr -d '\r'` 34 | done 35 | 36 | curl -v -s -H "X-Auth-Token: $AuthToken" swift:8080/v1/AUTH_test/con -X PUT 37 | 38 | DollarQuestionMark=1 39 | 40 | while [ "$DollarQuestionMark" != "0" ] 41 | do 42 | sleep 1 43 | curl -s -f imgr:15346/version > /dev/null 44 | DollarQuestionMark=$? 45 | done 46 | 47 | if $DoFormat 48 | then 49 | curl -v -s -f imgr:15346/volume -X POST -d "{\"StorageURL\":\"http://swift:8080/v1/AUTH_test/con\",\"AuthToken\":\"$AuthToken\"}" 50 | fi 51 | 52 | if $StaticAuthToken 53 | then 54 | curl -v -s -f imgr:15346/volume/testvol -X PUT -d "{\"StorageURL\":\"http://swift:8080/v1/AUTH_test/con\",\"AuthToken\":\"$AuthToken\"}" 55 | else 56 | curl -v -s -f imgr:15346/volume/testvol -X PUT -d "{\"StorageURL\":\"http://swift:8080/v1/AUTH_test/con\"}" 57 | fi 58 | 59 | ./iclient iclient.conf 60 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/unmount_and_stop_pfs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | # A simple script to unmount the sample mount point and stop the services 7 | # The PATH, etc should already be setup by systemctl environment 8 | 9 | function await_proxyfsd_shutdown { 10 | while true 11 | do 12 | pidof proxyfsd > /dev/null 13 | if [ $? -ne 0 ] 14 | then 15 | break 16 | fi 17 | echo "Waiting for ProxyFS to be stopped..." 18 | sleep 1 19 | done 20 | } 21 | 22 | function await_pfsagentd_shutdown { 23 | while true 24 | do 25 | pidof pfsagentd > /dev/null 26 | if [ $? -ne 0 ] 27 | then 28 | break 29 | fi 30 | echo "Waiting for PFSAgent to be stopped..." 31 | sleep 1 32 | done 33 | } 34 | 35 | if [ -f /usr/bin/systemctl ]; then 36 | # Centos 37 | sudo /usr/bin/systemctl stop pfsagentd 38 | # We need to make sure PFSAgent is stopped before we stop ProxyFS, but we 39 | # don't care if other services are stopped in the meantime. 40 | await_pfsagentd_shutdown 41 | sudo /usr/bin/systemctl stop proxyfsd 42 | await_proxyfsd_shutdown 43 | sudo /usr/bin/swift-init main stop 44 | sudo /usr/bin/systemctl stop memcached 45 | else 46 | # Ubuntu (not tested!) 47 | # Here we should stop pfsagentd, but we don't support Ubuntu 48 | sudo /usr/sbin/service proxyfsd stop 49 | await_proxyfsd_shutdown 50 | sudo /usr/bin/swift-init main stop 51 | sudo /usr/sbin/service memcached stop 52 | fi 53 | -------------------------------------------------------------------------------- /imgr/mkmount.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | Usage="$(basename "$0") - Ask swift/imgr to format and serve testvol 4 | where: 5 | -f format volume 6 | -h show this help text 7 | -s supply static AuthToken to imgr" 8 | 9 | DoFormat=false 10 | StaticAuthToken=false 11 | 12 | while getopts 'fhs' option 13 | do 14 | case "$option" in 15 | f) DoFormat=true 16 | ;; 17 | h) echo "$Usage" 18 | exit 0 19 | ;; 20 | s) StaticAuthToken=true 21 | ;; 22 | ?) echo "$Usage" 23 | exit 1 24 | ;; 25 | esac 26 | done 27 | 28 | AuthToken="" 29 | 30 | while [ "$AuthToken" == "" ] 31 | do 32 | sleep 1 33 | AuthToken=`curl -v -s -H "X-Auth-User: test:tester" -H "X-Auth-Key: testing" swift:8080/auth/v1.0 2>&1 | awk /"X-Auth-Token:"/'{print $3}' | tr -d '\r'` 34 | done 35 | 36 | echo 37 | echo " AuthToken: $AuthToken" 38 | echo 39 | 40 | curl -s -f -H "X-Auth-Token: $AuthToken" swift:8080/v1/AUTH_test/con -X PUT > /dev/null 41 | 42 | DollarQuestionMark=1 43 | 44 | while [ "$DollarQuestionMark" != "0" ] 45 | do 46 | sleep 1 47 | curl -s -f dev:15346/version > /dev/null 48 | DollarQuestionMark=$? 49 | done 50 | 51 | if $DoFormat 52 | then 53 | curl -s -f dev:15346/volume -X POST -d "{\"StorageURL\":\"http://swift:8080/v1/AUTH_test/con\",\"AuthToken\":\"$AuthToken\"}" > /dev/null 54 | fi 55 | 56 | if $StaticAuthToken 57 | then 58 | curl -s -f dev:15346/volume/testvol -X PUT -d "{\"StorageURL\":\"http://swift:8080/v1/AUTH_test/con\",\"AuthToken\":\"$AuthToken\"}" > /dev/null 59 | else 60 | curl -s -f dev:15346/volume/testvol -X PUT -d "{\"StorageURL\":\"http://swift:8080/v1/AUTH_test/con\"}" > /dev/null 61 | fi 62 | -------------------------------------------------------------------------------- /ihtml/static-content/styles.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015-2021, NVIDIA CORPORATION. 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | .table td.fit, 7 | .table th.fit { 8 | white-space: nowrap; 9 | width: 1%; 10 | } 11 | 12 | body { padding-top: 70px; } 13 | 14 | .no-margin { margin: 0; } 15 | 16 | pre.code { 17 | background-color: #e9ecef; 18 | border-radius: .25rem; 19 | padding: 20px; 20 | } 21 | 22 | .clickable { 23 | cursor: pointer; 24 | } 25 | 26 | span.jstExpand, span.jstFold { 27 | cursor: pointer; 28 | } 29 | 30 | #btn-back-to-top { 31 | position: fixed; 32 | bottom: 20px; 33 | right: 20px; 34 | display: none; 35 | } 36 | 37 | .divider { 38 | width: 5px; 39 | height: 5px; 40 | } 41 | 42 | /* jsontree.css */ 43 | 44 | .jstValue { 45 | white-space: pre-wrap; 46 | /*font-size: 10px; 47 | font-weight: 400; 48 | font-family: "Lucida Console", Monaco, monospace;*/ 49 | } 50 | .jstComma { 51 | white-space: pre-wrap; 52 | } 53 | .jstProperty { 54 | color: #666; 55 | word-wrap: break-word; 56 | } 57 | .jstBracket { 58 | white-space: pre-wrap;; 59 | } 60 | .jstBool { 61 | color: #2525CC; 62 | } 63 | .jstNum { 64 | color: #D036D0; 65 | } 66 | .jstNull { 67 | color: gray; 68 | } 69 | .jstStr { 70 | color: #2DB669; 71 | } 72 | .jstFold:after { 73 | content: ' -'; 74 | cursor: pointer; 75 | } 76 | .jstExpand { 77 | white-space: normal; 78 | } 79 | .jstExpand:after { 80 | content: ' +'; 81 | cursor: pointer; 82 | } 83 | .jstFolded { 84 | white-space: normal !important; 85 | } 86 | .jstHiddenBlock { 87 | display: none; 88 | } 89 | 90 | /* End of jsontree.css */ 91 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/checkpoint.uml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | title == Headhunter Checkpoint\n==== headhunter/api_swift.go::checkpointDaemon() 4 | 5 | start 6 | 7 | :set checkpointRequest = nil; 8 | 9 | repeat 10 | if (checkpointRequest == nil?) then (yes) 11 | :await either timer pop or explicit checkpointRequest; 12 | if (explicit checkpointRequedst?) then (yes) 13 | :set checkpointRequest = this request; 14 | else (no) 15 | endif 16 | :lock DB; 17 | if (available Nonce?) then (yes) 18 | else (no) 19 | :increment reservedToNonce; 20 | :compute new checkpointHeader using last successfully POST'd checkpointHeader; 21 | :HTTP POST new checkpointHeader; 22 | :unlock DB; 23 | endif 24 | else (no) 25 | endif 26 | if (didn't need to increment reservedToNonce?) then (yes) 27 | :consume next Nonce; 28 | if (needFullClone?) then (yes) 29 | :inodeRec B+Tree Touch(); 30 | :logSegmentRec B+Tree Touch(); 31 | :bPlusTreeObject B+Tree Touch(); 32 | else (no) 33 | endif 34 | :inodeRec B+Tree Flush(); 35 | :logSegmentRec B+Tree Flush(); 36 | :bPlusTreeObject B+Tree Touch(); 37 | :unlock DB; 38 | :HTTP (chunked) PUT Close(); 39 | :await checkpointGateWaitGroup; 40 | :compute new checkpointHeader using Flush() return values; 41 | :HTTP POST new checkpointHeader; 42 | if (needFullClone?) then (yes) 43 | :launch checkpointCompactor()\nasynchronously deletes all previous checkpoint objects now unreferenced; 44 | else (no) 45 | endif 46 | :signal checkpointDoneWaitGroup; 47 | else (no) 48 | endif 49 | repeat while (not asked by checkpointRequest to exit?) 50 | 51 | stop 52 | 53 | @enduml 54 | -------------------------------------------------------------------------------- /iauth/README.md: -------------------------------------------------------------------------------- 1 | # Authentication Plug-In 2 | 3 | Both ProxyFS itself and each PFSAgent client access Swift Accounts, 4 | Containers, and Objects directly. PFSAgent, potentially residing 5 | outside a Swift cluster's `trust domain`, will use normal 6 | OpenStack Swift methods for such access. This access must be authorized 7 | by means of obtaining an `AuthToken`. ProxyFS, if not configured 8 | alongside a so-called `NoAuth` Swift Proxy, will also need the same. 9 | Even in Swift clusters have a `NoAuth` Swift Proxy configured, ProxyFS 10 | will, from time to time, validate PFSAgent client access by testing their 11 | AuthToken locally as well. 12 | 13 | While many Swift clusters implement authorization via Swift Proxy 14 | pipeline filters that honor the OpenStack Swift convention, some clusters 15 | may require alternate authorization mechanisms. To support any such 16 | authorization solution, a Golang Plug-In mechanism is employed. 17 | 18 | A standard OpenStack Swift Plug-In is provided (see subdirectory `iauth-swift`) 19 | that may either be used for clusters honoring the OpenStack Swift authorization 20 | convention or as a template for development of any particular authorization 21 | solution. The only requirements are that: 22 | 23 | * The plug-in's location is provided this `iauth` package 24 | * Credentials to be authorized are provided in a single string (possibly a JSON document) 25 | * The plug-in returns both a Swift AuthToken and StorageURL (or an error) 26 | * The StorageURL has been properly modified as necessary to ensure 27 | * the proper transport (scheme) is used (i.e. either "http" or "https") 28 | * the specified `Account`, if necessary, has been substituted 29 | * the specified `Container` has been appended 30 | -------------------------------------------------------------------------------- /icert/README.md: -------------------------------------------------------------------------------- 1 | # icert 2 | 3 | A simplification of tools like `openssl` to create either a CA Certificate 4 | or an Endpoint Certificate using either the `Ed25519` or `RSA` key generation 5 | method. 6 | 7 | ## Usage 8 | ``` 9 | -ca 10 | generated CA Certicate usable for signing Endpoint Certificates 11 | -caCert string 12 | path to CA Certificate 13 | -caKey string 14 | path to CA Certificate's PrivateKey 15 | -cert string 16 | path to Endpoint Certificate 17 | -country value 18 | generated Certificate's Subject.Country 19 | -dns value 20 | generated Certificate's DNS Name 21 | -ed25519 22 | generate key via Ed25519 23 | -ip value 24 | generated Certificate's IP Address 25 | -key string 26 | path to Endpoint Certificate's PrivateKey 27 | -locality value 28 | generated Certificate's Subject.Locality 29 | -organization value 30 | generated Certificate's Subject.Organization 31 | -postalCode value 32 | generated Certificate's Subject.PostalCode 33 | -province value 34 | generated Certificate's Subject.Province 35 | -rsa 36 | generate key via RSA 37 | -streetAddress value 38 | generated Certificate's Subject.StreetAddress 39 | -ttl duration 40 | generated Certificate's time to live 41 | -v verbose mode 42 | ``` 43 | 44 | Precisely one of `-ed25519` or `-rsa` must be specified. 45 | 46 | A `-ttl` must be specified. 47 | 48 | Both `-caCert` and `-caKey` must be specified. 49 | 50 | If `-ca` is specified: 51 | * neither `-cert` nor `-key` may be specified 52 | * neither `-dns` nor `-ip` may be specified 53 | 54 | If `-ca` is not specified: 55 | * both `-cert` and `-key` must be specified 56 | * at least one `-dns` and/or one `-ip` must be specified 57 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/file-write-new.uml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | title File Write Path - New Model 4 | 5 | participant fs 6 | participant inode 7 | participant serializer 8 | participant sortedmap 9 | participant swiftclient 10 | participant swift 11 | participant headhunter 12 | 13 | fs->inode: Write(InodeNumber, Data) 14 | inode->headhunter: GetInodeRec(InodeNumber) 15 | headhunter->swift: Read "page" of InodeRec Table 16 | swift->headhunter: returns "page" of InodeRec Table 17 | headhunter->inode: returns JSON'd FileInode 18 | inode->serializer: Do definiteWrite() 19 | serializer->swiftclient: FetchObjectChunkedPutContext() 20 | swiftclient->swift: HTTP PUT Transfer-Encoding: chunked 21 | swiftclient->serializer: returns chunkedPutContext 22 | serializer->swiftclient: SendChunk(Data) 23 | swiftclient->swift: ChunkHeader...then Data 24 | swiftclient->serializer: returns chunk sent status 25 | serializer->sortedmap: Put(FileExtentStruct) 26 | sortedmap->headhunter: GetB+TreeObject(cstruct'd B+Tree Node) 27 | headhunter->swift: HTTP GET "page" of B+TreeObject Table 28 | swift->headhunter: returns "page" of B+TreeObject Table 29 | headhunter->sortedmap: returns cstruct'd B+Tree Node 30 | sortedmap->serializer: returns insert status 31 | serializer->serializer: Time To Flush 32 | serializer->swiftclient: Close() 33 | swiftclient->swift: Zero-length'd ChunkHeader 34 | swift->swiftclient: returns HTTP Status 35 | swiftclient->serializer: returns HTTP Status 36 | serializer->sortedmap: Flush() 37 | sortedmap->headhunter: PutB+TreeObject(cstruct'd B+Tree Node) 38 | headhunter->sortedmap: returns insert status 39 | sortedmap->serializer: returns flush status 40 | serializer->inode: returns definiteWrite() status 41 | inode->fs: returns Write() status 42 | 43 | @enduml 44 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/retryrpc-send.uml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | title RetryRPC Send - Happy Path 4 | 5 | autonumber 6 | 7 | box Client 8 | participant Send 9 | participant sendToServer 10 | participant notifyReply 11 | participant readReplies 12 | end box 13 | box Server 14 | participant run 15 | participant serviceClient 16 | participant processRequest 17 | end box 18 | 19 | Send -> run:dial() server 20 | run -> run:Accept connection 21 | run -> run:Wait for uniqueID on socket 22 | Send -> run:Send uniqueID on socket 23 | Send -> readReplies:Start readReplies goroutine 24 | 25 | run -> run:Read uniqueID of new client 26 | run -> run:Call getClientIDAndWait()\nif new uniqueID create entry in perClientInfo\notherwise drain RPCs on old connection 27 | run -> serviceClient:Start serviceClient goroutine for new client connection 28 | 29 | Send -> sendToServer:Pkg request, assign\nrequestID goroutine to send.\nWait on channel for\nresponse 30 | 31 | sendToServer -> serviceClient: Write hdr and then write\npayload on socket to server 32 | note left: retransmit() if write of\nhdr or payload fails 33 | 34 | serviceClient -> processRequest: Read hdr and payload.\nGoroutine to process RPC 35 | 36 | processRequest -> processRequest: Unmarshal RPC, call RPC,\nmarshal response. 37 | 38 | processRequest -> readReplies: Write header\nand then payload to client 39 | note left: retransmit() if write of\nhdr or payload fails 40 | 41 | readReplies -> readReplies: Read header and then\npayload off socket.\nCall goroutine to notify\nsender 42 | 43 | readReplies -> notifyReply:Unmarshal response.\nWrite response on\nchannel to sender. 44 | note left: retransmit() if unmarshal of\nhdr or payload fails 45 | 46 | Send -> Send:See response on channel and\nreturn response to caller. 47 | 48 | @enduml 49 | -------------------------------------------------------------------------------- /iauth/iauth-swift/plugin_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | 9 | "github.com/NVIDIA/proxyfs/conf" 10 | "github.com/NVIDIA/proxyfs/iswift/iswiftpkg" 11 | ) 12 | 13 | func TestSwiftAuth(t *testing.T) { 14 | var ( 15 | authInJSON string 16 | authToken string 17 | confMap conf.ConfMap 18 | confStrings = []string{ 19 | "ISWIFT.SwiftProxyIPAddr=127.0.0.1", 20 | "ISWIFT.SwiftProxyTCPPort=8443", 21 | "ISWIFT.MaxAccountNameLength=256", 22 | "ISWIFT.MaxContainerNameLength=256", 23 | "ISWIFT.MaxObjectNameLength=1024", 24 | "ISWIFT.AccountListingLimit=10000", 25 | "ISWIFT.ContainerListingLimit=10000", 26 | } 27 | err error 28 | storageURL string 29 | ) 30 | 31 | confMap, err = conf.MakeConfMapFromStrings(confStrings) 32 | if nil != err { 33 | t.Fatalf("conf.MakeConfMapFromStrings(confStrings) returned unexpected error: %v", err) 34 | } 35 | 36 | err = iswiftpkg.Start(confMap) 37 | if nil != err { 38 | t.Fatalf("iswiftpkg.Start(confMap) returned unexpected error: %v", err) 39 | } 40 | 41 | authInJSON = "{" + 42 | " \"AuthURL\" : \"http://127.0.0.1:8443/auth/v1.0\"," + 43 | " \"AuthUser\" : \"test:tester\"," + 44 | " \"AuthKey\" : \"testing\"," + 45 | " \"Account\" : \"AUTH_test\"," + 46 | " \"Container\" : \"con\"" + 47 | "}" 48 | 49 | authToken, storageURL, err = PerformAuth(authInJSON) 50 | if nil == err { 51 | t.Logf("authToken: %s", authToken) 52 | t.Logf("storageURL: %s", storageURL) 53 | err = iswiftpkg.Stop() 54 | if nil != err { 55 | t.Fatalf("iswiftpkg.Stop() returned unexpected error: %v", err) 56 | } 57 | } else { 58 | _ = iswiftpkg.Stop() 59 | t.Fatalf("PerformAuth failed: %v", err) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /cookbooks/swift/templates/default/etc/default/rsyncd.erb: -------------------------------------------------------------------------------- 1 | defaults file for rsync daemon mode 2 | # 3 | # start rsync in daemon mode from init.d script? 4 | # only allowed values are "true", "false", and "inetd" 5 | # Use "inetd" if you want to start the rsyncd from inetd, 6 | # all this does is prevent the init.d script from printing a message 7 | # about not starting rsyncd (you still need to modify inetd's config yourself). 8 | RSYNC_ENABLE=false 9 | # 10 | # which file should be used as the configuration file for rsync. 11 | # This file is used instead of the default /etc/rsyncd.conf 12 | # Warning: This option has no effect if the daemon is accessed 13 | # using a remote shell. When using a different file for 14 | # rsync you might want to symlink /etc/rsyncd.conf to 15 | # that file. 16 | # RSYNC_CONFIG_FILE= 17 | # 18 | # what extra options to give rsync --daemon? 19 | # that excludes the --daemon; that's always done in the init.d script 20 | # Possibilities are: 21 | # --address=123.45.67.89 (bind to a specific IP address) 22 | # --port=8730 (bind to specified port; default 873) 23 | RSYNC_OPTS='' 24 | # 25 | # run rsyncd at a nice level? 26 | # the rsync daemon can impact performance due to much I/O and CPU usage, 27 | # so you may want to run it at a nicer priority than the default priority. 28 | # Allowed values are 0 - 19 inclusive; 10 is a reasonable value. 29 | RSYNC_NICE='' 30 | # 31 | # run rsyncd with ionice? 32 | # "ionice" does for IO load what "nice" does for CPU load. 33 | # As rsync is often used for backups which aren't all that time-critical, 34 | # reducing the rsync IO priority will benefit the rest of the system. 35 | # See the manpage for ionice for allowed options. 36 | # -c3 is recommended, this will run rsync IO at "idle" priority. Uncomment 37 | # the next line to activate this. 38 | # RSYNC_IONICE='-c3' 39 | # 40 | # Don't forget to create an appropriate config file, 41 | # else the daemon will not start. 42 | # 43 | -------------------------------------------------------------------------------- /cookbooks/proxyfs_swift/templates/default/etc/default/rsyncd.erb: -------------------------------------------------------------------------------- 1 | defaults file for rsync daemon mode 2 | # 3 | # start rsync in daemon mode from init.d script? 4 | # only allowed values are "true", "false", and "inetd" 5 | # Use "inetd" if you want to start the rsyncd from inetd, 6 | # all this does is prevent the init.d script from printing a message 7 | # about not starting rsyncd (you still need to modify inetd's config yourself). 8 | RSYNC_ENABLE=false 9 | # 10 | # which file should be used as the configuration file for rsync. 11 | # This file is used instead of the default /etc/rsyncd.conf 12 | # Warning: This option has no effect if the daemon is accessed 13 | # using a remote shell. When using a different file for 14 | # rsync you might want to symlink /etc/rsyncd.conf to 15 | # that file. 16 | # RSYNC_CONFIG_FILE= 17 | # 18 | # what extra options to give rsync --daemon? 19 | # that excludes the --daemon; that's always done in the init.d script 20 | # Possibilities are: 21 | # --address=123.45.67.89 (bind to a specific IP address) 22 | # --port=8730 (bind to specified port; default 873) 23 | RSYNC_OPTS='' 24 | # 25 | # run rsyncd at a nice level? 26 | # the rsync daemon can impact performance due to much I/O and CPU usage, 27 | # so you may want to run it at a nicer priority than the default priority. 28 | # Allowed values are 0 - 19 inclusive; 10 is a reasonable value. 29 | RSYNC_NICE='' 30 | # 31 | # run rsyncd with ionice? 32 | # "ionice" does for IO load what "nice" does for CPU load. 33 | # As rsync is often used for backups which aren't all that time-critical, 34 | # reducing the rsync IO priority will benefit the rest of the system. 35 | # See the manpage for ionice for allowed options. 36 | # -c3 is recommended, this will run rsync IO at "idle" priority. Uncomment 37 | # the next line to activate this. 38 | # RSYNC_IONICE='-c3' 39 | # 40 | # Don't forget to create an appropriate config file, 41 | # else the daemon will not start. 42 | # 43 | -------------------------------------------------------------------------------- /iswift/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Program iswift provides a command-line wrapper around package iswiftpkg APIs. 5 | // 6 | // The program requires a single argument that is a path to a package config 7 | // formatted configuration to load. Optionally, overrides the the config may 8 | // be passed as additional arguments in the form .=. 9 | package main 10 | 11 | import ( 12 | "fmt" 13 | "os" 14 | "os/signal" 15 | 16 | "golang.org/x/sys/unix" 17 | 18 | "github.com/NVIDIA/proxyfs/conf" 19 | "github.com/NVIDIA/proxyfs/iswift/iswiftpkg" 20 | ) 21 | 22 | func main() { 23 | var ( 24 | confMap conf.ConfMap 25 | err error 26 | signalChan chan os.Signal 27 | ) 28 | 29 | if len(os.Args) < 2 { 30 | fmt.Fprintf(os.Stderr, "no .conf file specified\n") 31 | os.Exit(1) 32 | } 33 | 34 | confMap, err = conf.MakeConfMapFromFile(os.Args[1]) 35 | if nil != err { 36 | fmt.Fprintf(os.Stderr, "failed to load config: %v\n", err) 37 | os.Exit(1) 38 | } 39 | 40 | err = confMap.UpdateFromStrings(os.Args[2:]) 41 | if nil != err { 42 | fmt.Fprintf(os.Stderr, "failed to apply config overrides: %v\n", err) 43 | os.Exit(1) 44 | } 45 | 46 | // Start Swift Emulation 47 | 48 | err = iswiftpkg.Start(confMap) 49 | if nil != err { 50 | fmt.Fprintf(os.Stderr, "iswiftpkg.Start(confMap) failed: %v\n", err) 51 | os.Exit(1) 52 | } 53 | 54 | // Arm signal handler used to indicate termination & wait on it 55 | // 56 | // Note: signal'd chan must be buffered to avoid race with window between 57 | // arming handler and blocking on the chan read 58 | 59 | signalChan = make(chan os.Signal, 1) 60 | 61 | signal.Notify(signalChan, unix.SIGINT, unix.SIGTERM, unix.SIGHUP) 62 | 63 | _ = <-signalChan 64 | 65 | // Stop Swift Emulation 66 | 67 | err = iswiftpkg.Stop() 68 | if nil != err { 69 | fmt.Fprintf(os.Stderr, "iswiftpkg.Stop() failed: %v\n", err) 70 | os.Exit(1) 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /retryrpc/client_tracking.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package retryrpc 5 | 6 | import ( 7 | "container/list" 8 | "strconv" 9 | 10 | "github.com/NVIDIA/proxyfs/bucketstats" 11 | ) 12 | 13 | // This file contains functions in the server which 14 | // track clients and initialize clientInfo. 15 | 16 | func (ci *clientInfo) isEmpty() bool { 17 | return len(ci.completedRequest) == 0 18 | } 19 | 20 | func (ci *clientInfo) completedCnt() int { 21 | return len(ci.completedRequest) 22 | } 23 | 24 | func methodAndName(name string, method string) string { 25 | return name + "-" + method 26 | } 27 | 28 | func initClientInfo(cCtx *connCtx, newUniqueID uint64, server *Server) (ci *clientInfo) { 29 | ci = &clientInfo{cCtx: cCtx, myUniqueID: newUniqueID} 30 | ci.completedRequest = make(map[requestID]*completedEntry) 31 | ci.completedRequestLRU = list.New() 32 | ci.stats.PerMethodStats = make(map[string]*methodStats) 33 | 34 | idAsStr := strconv.FormatInt(int64(newUniqueID), 10) 35 | bucketstats.Register(bucketStatsPkgName, idAsStr, &ci.stats) 36 | 37 | // Register per method stats 38 | for m := range server.svrMap { 39 | ms := &methodStats{Method: m} 40 | ci.stats.PerMethodStats[m] = ms 41 | bucketstats.Register(bucketStatsPkgName, methodAndName(strconv.FormatInt(int64(ci.myUniqueID), 10), m), ms) 42 | } 43 | return 44 | } 45 | 46 | // Bump bucketstats for this method 47 | func (ci *clientInfo) setMethodStats(method string, deltaTime uint64) { 48 | ms := ci.stats.PerMethodStats[method] 49 | ms.Count.Add(1) 50 | ms.TimeOfRPCCall.Add(deltaTime) 51 | } 52 | 53 | // Unregister per method bucketstats for this client 54 | func (ci *clientInfo) unregsiterMethodStats(server *Server) { 55 | idAsStr := strconv.FormatInt(int64(ci.myUniqueID), 10) 56 | 57 | for m := range server.svrMap { 58 | bucketstats.UnRegister(bucketStatsPkgName, methodAndName(strconv.FormatInt(int64(ci.myUniqueID), 10), m)) 59 | } 60 | bucketstats.UnRegister(bucketStatsPkgName, idAsStr) 61 | } 62 | -------------------------------------------------------------------------------- /cookbooks/proxyfs/files/default/usr/bin/set_up_s3api: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | PROXYSERVERCONF=/etc/swift/proxy-server.conf 7 | # [filter:s3api] is found by default in /etc/swift/proxy-server.conf, so we'll 8 | # look for one of the options that are not set by default: allow_multipart_uploads 9 | 10 | # Careful! This method is not totally safe, as [filter:swift3] also defines this 11 | # option, but we control the whole process, and this script should be run BEFORE 12 | # set_up_swift3 during Runway provisioning, so we should be fine. If anybody 13 | # else is messing with this, they should know what they're doing. 14 | grep "allow_multipart_uploads" $PROXYSERVERCONF > /dev/null 2>&1 15 | if [ $? -eq 0 ]; then 16 | echo "s3api is already set up. No need to do anything. Run enable_s3api to enable this configuration." 17 | exit 0 18 | fi 19 | 20 | set -e 21 | 22 | sed -i '/^dns_compliant_bucket_names/ s/dns_compliant_bucket_names = no/dns_compliant_bucket_names = yes/' $PROXYSERVERCONF 23 | sed -i '/^\[filter:s3api/ a allow_multipart_uploads = yes\nforce_swift_request_proxy_log = yes' $PROXYSERVERCONF 24 | 25 | # We're only setting up tempauth and the object servers during s3api set up 26 | # When we set up swift3, everything will be already in place 27 | sed -i '/^\[filter:tempauth/ a user_adminreg_adminreg = adminreg .admin .reseller_admin\nuser_testreg_testerreg = testingreg .admin\nuser_test2reg_tester2reg = testing2reg .admin\nuser_testreg_tester3reg = testing3reg' $PROXYSERVERCONF 28 | for i in /etc/swift/object-server/*; do 29 | if test -f "$i"; then 30 | filename=`basename $i` 31 | sed -i '/^\[app:object-server/ a allowed_headers = Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Expires, X-Delete-At, X-Object-Manifest, X-Robots-Tag, X-Static-Large-Object' $i 32 | fi 33 | done 34 | 35 | echo "Swift was configured successfully for s3api, but NOT ENABLED YET. In order to enable it, run:" 36 | echo " enable_s3api" 37 | -------------------------------------------------------------------------------- /imgr/dev.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | [IMGR] 5 | PublicIPAddr: dev 6 | PrivateIPAddr: dev 7 | RetryRPCPort: 32356 8 | HTTPServerPort: 15346 9 | 10 | CheckPointIPAddrs: dev 11 | CheckPointPort: 33123 12 | CheckPointCACertFilePath: 13 | CheckPointRetryDelay: 100ms 14 | CheckPointRetryExpBackoff: 2 15 | CheckPointRetryLimit: 4 16 | CheckPointTimeout: 10m 17 | CheckPointConnectionPoolSize: 10 18 | 19 | RetryRPCTTLCompleted: 10m 20 | RetryRPCAckTrim: 100ms 21 | RetryRPCDeadlineIO: 60s 22 | RetryRPCKeepAlivePeriod: 60s 23 | 24 | RetryRPCCertFilePath: 25 | RetryRPCKeyFilePath: 26 | 27 | CheckPointInterval: 10s 28 | 29 | AuthTokenCheckInterval: 1m 30 | 31 | FetchNonceRangeToReturn: 100 32 | 33 | MountLimit: 10000 34 | OpenFileLimit: 100000 35 | 36 | MinLeaseDuration: 250ms 37 | LeaseInterruptInterval: 250ms 38 | LeaseInterruptLimit: 20 39 | LeaseEvictLowLimit: 100000 40 | LeaseEvictHighLimit: 100010 41 | 42 | SwiftRetryDelay: 100ms 43 | SwiftRetryExpBackoff: 2 44 | SwiftRetryLimit: 4 45 | 46 | SwiftTimeout: 10m 47 | SwiftConnectionPoolSize: 128 48 | 49 | ParallelObjectDeletePerVolumeLimit: 100 50 | 51 | InodeTableCacheEvictLowLimit: 10000 52 | InodeTableCacheEvictHighLimit: 10010 53 | 54 | InodeTableMaxInodesPerBPlusTreePage: 2048 55 | RootDirMaxDirEntriesPerBPlusTreePage: 1024 56 | 57 | LogFilePath: 58 | LogToConsole: true 59 | TraceEnabled: false 60 | RetryRPCLogEnabled: false 61 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # ProxyFS Security 2 | 3 | We take the security of this project seriously. Like any complex 4 | system, security must be vigilantly pursued. We need your help. 5 | 6 | ## How to report security issues 7 | 8 | If you believe you've identified a vulnerability, please work with the 9 | project maintainers to fix and disclose the issue responsibly. Email 10 | security@swiftstack.com and include the following details in your 11 | report: 12 | 13 | * Description of the location and potential impact of the vulnerability 14 | * Description of the steps required to reproduce the vulnerability 15 | (POC scripts, screenshots, and compressed screen captures are 16 | all helpful to us) 17 | 18 | We will monitor this email address and promptly respond to any 19 | vulnerabilities reported. 20 | 21 | ## How to propose and review a security patch 22 | 23 | Note: The patch development and review process for security issues is 24 | different than normal patches in ProxyFS. Because the GitHub issue 25 | process is public, all security bugs must have patches proposed to and 26 | reviewed via the security email address above. 27 | 28 | After a patch for the reported bug has been developed locally, you the 29 | patch author need to share that with the community. This is a simple 30 | process, but it is different than the normal ProxyFS workflow. 31 | 32 | * Export it using the `format-patch` command: 33 | 34 | ``` 35 | git format-patch --stdout HEAD~1 >path/to/local/file.patch 36 | ``` 37 | 38 | Now you have the patch saved locally and you can attach it to an email. 39 | 40 | * For reviewers, to review the attached patch, run the following command: 41 | 42 | ``` 43 | git am local.patch` ), then the patch can be applied locally with: 50 | 51 | ``` 52 | git apply path/to/local/file.patch 53 | ``` 54 | -------------------------------------------------------------------------------- /retryrpc/perfrpc/ping_perf.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "bytes" 8 | "fmt" 9 | 10 | "golang.org/x/sys/unix" 11 | ) 12 | 13 | // PerfPingServer is a struct with pointer receivers implementing RpcPerfPing*() 14 | type PerfPingServer struct{} 15 | 16 | // PerfPingReq is the request object for RpcPerfPing*() 17 | type PerfPingReq struct { 18 | Message string 19 | } 20 | 21 | // PerfPingReply is the response object for RpcPerfPing*() 22 | type PerfPingReply struct { 23 | Message string 24 | } 25 | 26 | // RpcTestPing simply does a len on the message path and returns the result 27 | func (s *PerfPingServer) RpcPerfPing(in *PerfPingReq, reply *PerfPingReply) (err error) { 28 | reply.Message = fmt.Sprintf("pong %d bytes", len(in.Message)) 29 | return nil 30 | } 31 | 32 | var largeStr string = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" 33 | 34 | // RpcPerfPingLarge simply does a len on the message path and returns the result 35 | // along with a larger buffer. 36 | func (s *PerfPingServer) RpcPerfPingLarge(in *PerfPingReq, reply *PerfPingReply) (err error) { 37 | buf := bytes.Buffer{} 38 | p := fmt.Sprintf("pong %d bytes", len(in.Message)) 39 | buf.WriteString(p) 40 | for i := 0; i < 1000; i++ { 41 | buf.WriteString(largeStr) 42 | } 43 | reply.Message = fmt.Sprintf("%v", buf.String()) 44 | return nil 45 | } 46 | 47 | // RpcPerfPingWithError returns an error 48 | func (s *PerfPingServer) RpcPerfPingWithError(in *PerfPingReq, reply *PerfPingReply) (err error) { 49 | err = fmt.Errorf("errno: %v", unix.EIO) 50 | reply.Message = fmt.Sprintf("pong %d bytes", len(in.Message)) 51 | return err 52 | } 53 | 54 | // RpcPerfPingWithClientID simply does a len on the message path and returns the clientID & result 55 | func (s *PerfPingServer) RpcPerfPingWithClientID(clientID uint64, in *PerfPingReq, reply *PerfPingReply) (err error) { 56 | reply.Message = fmt.Sprintf("Client ID: %v pong %d bytes", clientID, len(in.Message)) 57 | return nil 58 | } 59 | -------------------------------------------------------------------------------- /iauth/iauth-swift/README.md: -------------------------------------------------------------------------------- 1 | # OpenStack Swift Authorization PlugIn 2 | 3 | To provide a workable solution for those following standard Swift Authentication, 4 | this plug-in instance may be employed. Otherwise, consider this implementation a 5 | template for the desired instantiation of whatever Authentication mechanism is 6 | employed. 7 | 8 | For the standard Swift Authentication instantiation, the value of `authInJSON` 9 | is required to be a UTF-8 encoded JSON Document: 10 | 11 | ``` 12 | { 13 | "AuthURL" : "/auth/v1.0>", 14 | "AuthUser" : "", 15 | "AuthKey" : "", 16 | "Account" : "", 17 | "Container" : " 18 | } 19 | ``` 20 | 21 | There are three modifications to the Storage URL normally returned by a 22 | standard Swift Authentication operation: 23 | 24 | * The `scheme` used to authenticate may be either `http` or `https`. In the 25 | case of `https`, it is likely that some form of TLS termination prior 26 | to reaching the Swift Proxy has rewritten the `scheme` to be `http`. In such 27 | a case, the Storage URL returned will specify `http` as its scheme. Since 28 | the client must continue to use `https` to reach the Swift Proxy for each 29 | authenticated subsequent request, the plug-in will rewrite the scheme to 30 | be `https`. Note that this is an incomplete solution in cases where standard 31 | port numbers (i.e. `80` for `http` and `443` for `https`) are not assumed 32 | (i.e. port numbers are specified in the URL). 33 | 34 | * The final element of the path portion of the Storage URL returned by the 35 | Swift Proxy will typically be the Account associated with the specified 36 | AuthUser (e.g. AuthUser `test` typically has a corresponding Account named 37 | `AUTH_test`). The volume being accessed may, however be stored in a different 38 | Account than this. As such, the account element of the path will be replaced 39 | with the `Account` as requested. 40 | 41 | * The specified Container must be appended to the Storage URL delineated from 42 | the perhaps updated Account portion by a slash ("/"). 43 | -------------------------------------------------------------------------------- /imgr/imgr.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | [IMGR] 5 | PublicIPAddr: imgr 6 | PrivateIPAddr: imgr 7 | RetryRPCPort: 32356 8 | HTTPServerPort: 15346 9 | 10 | CheckPointIPAddrs: ickpt 11 | CheckPointPort: 33123 12 | CheckPointCACertFilePath: ca_cert.pem 13 | CheckPointRetryDelay: 100ms 14 | CheckPointRetryExpBackoff: 2 15 | CheckPointRetryLimit: 4 16 | CheckPointTimeout: 10m 17 | CheckPointConnectionPoolSize: 10 18 | 19 | RetryRPCTTLCompleted: 10m 20 | RetryRPCAckTrim: 100ms 21 | RetryRPCDeadlineIO: 60s 22 | RetryRPCKeepAlivePeriod: 60s 23 | 24 | RetryRPCCertFilePath: imgr_cert.pem 25 | RetryRPCKeyFilePath: imgr_key.pem 26 | 27 | CheckPointInterval: 10s 28 | 29 | AuthTokenCheckInterval: 1m 30 | 31 | FetchNonceRangeToReturn: 100 32 | 33 | MountLimit: 10000 34 | OpenFileLimit: 100000 35 | 36 | MinLeaseDuration: 250ms 37 | LeaseInterruptInterval: 250ms 38 | LeaseInterruptLimit: 20 39 | LeaseEvictLowLimit: 100000 40 | LeaseEvictHighLimit: 100010 41 | 42 | SwiftRetryDelay: 100ms 43 | SwiftRetryExpBackoff: 2 44 | SwiftRetryLimit: 4 45 | 46 | SwiftTimeout: 10m 47 | SwiftConnectionPoolSize: 128 48 | 49 | ParallelObjectDeletePerVolumeLimit: 100 50 | 51 | InodeTableCacheEvictLowLimit: 10000 52 | InodeTableCacheEvictHighLimit: 10010 53 | 54 | InodeTableMaxInodesPerBPlusTreePage: 2048 55 | RootDirMaxDirEntriesPerBPlusTreePage: 1024 56 | 57 | LogFilePath: 58 | LogToConsole: true 59 | TraceEnabled: false 60 | RetryRPCLogEnabled: false 61 | -------------------------------------------------------------------------------- /iclient/dev.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | [ICLIENT] 5 | VolumeName: testvol 6 | MountPointDirPath: /mnt 7 | FUSEBlockSize: 512 8 | FUSEAllowOther: true 9 | FUSEMaxBackground: 1000 10 | FUSECongestionThreshhold: 0 11 | FUSEMaxPages: 256 12 | FUSEMaxRead: 1048576 13 | FUSEMaxWrite: 1048576 14 | FUSEEntryValidDuration: 250ms 15 | FUSEAttrValidDuration: 250ms 16 | FUSENameLenMax: 255 17 | AuthPlugInPath: iauth/iauth-swift/iauth-swift.so 18 | AuthPlugInEnvName: 19 | AuthPlugInEnvValue: {"AuthURL":"http://swift:8080/auth/v1.0"\u002C"AuthUser":"test:tester"\u002C"AuthKey":"testing"\u002C"Account":"AUTH_test"\u002C"Container":"con"} 20 | SwiftTimeout: 10m 21 | SwiftRetryLimit: 4 22 | SwiftRetryDelay: 100ms 23 | SwiftRetryDelayVariance: 25 24 | SwiftRetryExponentialBackoff: 1.4 25 | SwiftConnectionPoolSize: 128 26 | RetryRPCPublicIPAddr: dev 27 | RetryRPCPort: 32356 28 | RetryRPCDeadlineIO: 60s 29 | RetryRPCKeepAlivePeriod: 60s 30 | RetryRPCCACertFilePath: 31 | MaxSharedLeases: 500 32 | MaxExclusiveLeases: 100 33 | InodePayloadEvictLowLimit: 100000 34 | InodePayloadEvictHighLimit: 100010 35 | DirInodeMaxKeysPerBPlusTreePage: 1024 36 | FileInodeMaxKeysPerBPlusTreePage: 2048 37 | ReadCacheLineSize: 1048576 38 | ReadCacheLineCountMax: 1024 39 | FileFlushTriggerSize: 10485760 40 | FileFlushTriggerDuration: 10s 41 | InodeLockRetryDelay: 10ms 42 | InodeLockRetryDelayVariance: 50 43 | LogFilePath: 44 | LogToConsole: true 45 | TraceEnabled: false 46 | FUSELogEnabled: false 47 | RetryRPCLogEnabled: false 48 | HTTPServerIPAddr: dev 49 | HTTPServerPort: 15347 50 | -------------------------------------------------------------------------------- /cookbooks/README-UNITTEST.txt: -------------------------------------------------------------------------------- 1 | This is the unit test when changing SAIO. 2 | 3 | This test must be executed on all SAIO versions. 4 | 5 | First, remove Samba source as follows: 6 | 7 | # cdpfs 8 | # cd .. 9 | # rm -rf samba* 10 | 11 | Now, test on all SAIO versions: 12 | 13 | 1. First test Centos: 14 | 15 | # vagrant destroy 16 | # export SAIO_OS=centos 17 | # vagrant up 18 | 19 | Need a reboot to change SELinux settings unfortunately. 20 | 21 | # vagrant halt 22 | # vagrant up 23 | # vagrant ssh 24 | 25 | Log onto the box and see if everything can be mounted. 26 | 27 | # /usr/bin/start_and_mount_pfs 28 | # /usr/bin/start_and_mount_pfs 29 | will start swift, proxyfsd, smb and mount the share on a Centos VM. Must do twice and 30 | I have a tracker (https://www.pivotaltracker.com/story/show/135190081) to get this fixed. 31 | 32 | Make sure the mount point shows up: 33 | 34 | # mount | grep proxyfs 35 | should show something like this: 36 | 37 | //127.0.0.1/proxyfs on /mnt/smb_proxyfs_mount type cifs (rw,relatime,vers=1.0,cache=strict,username=vagrant,domain=LOCALHOST,uid=0,noforceuid,gid=0,noforcegid,addr=127.0.0.1,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,actimeo=1) 38 | 39 | Make sure the aliases all work: 40 | # cdpfs 41 | # exit 42 | 43 | 2. Now test Ubuntu: 44 | 45 | # vagrant destroy 46 | # export SAIO_OS=ubuntu 47 | # vagrant up 48 | 49 | Same workflow, reboot here. 50 | 51 | # vagrant halt 52 | # vagrant up 53 | # vagrant ssh 54 | 55 | Log onto the box and see if everything can be mounted. 56 | 57 | # /usr/bin/start_and_mount_pfs 58 | 59 | will start swift, proxyfsd, smb and mount the share on a Ubuntu VM. Should only need to do this 60 | once although the bug shown on Centos probably can happen on Ubuntu. 61 | 62 | Make sure the mount point shows up: 63 | 64 | # mount | grep proxyfs 65 | should show something like this: 66 | 67 | //127.0.0.1/proxyfs on /mnt/smb_proxyfs_mount type cifs (rw,password=vagrant,user=vagrant) 68 | 69 | Make sure the aliases all work: 70 | # cdpfs 71 | -------------------------------------------------------------------------------- /iclient/iclient.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | [ICLIENT] 5 | VolumeName: testvol 6 | MountPointDirPath: /mnt 7 | FUSEBlockSize: 512 8 | FUSEAllowOther: true 9 | FUSEMaxBackground: 1000 10 | FUSECongestionThreshhold: 0 11 | FUSEMaxPages: 256 12 | FUSEMaxRead: 1048576 13 | FUSEMaxWrite: 1048576 14 | FUSEEntryValidDuration: 250ms 15 | FUSEAttrValidDuration: 250ms 16 | FUSENameLenMax: 255 17 | AuthPlugInPath: iauth-swift.so 18 | AuthPlugInEnvName: 19 | AuthPlugInEnvValue: {"AuthURL":"http://swift:8080/auth/v1.0"\u002C"AuthUser":"test:tester"\u002C"AuthKey":"testing"\u002C"Account":"AUTH_test"\u002C"Container":"con"} 20 | SwiftTimeout: 10m 21 | SwiftRetryLimit: 4 22 | SwiftRetryDelay: 100ms 23 | SwiftRetryDelayVariance: 25 24 | SwiftRetryExponentialBackoff: 1.4 25 | SwiftConnectionPoolSize: 128 26 | RetryRPCPublicIPAddr: imgr 27 | RetryRPCPort: 32356 28 | RetryRPCDeadlineIO: 60s 29 | RetryRPCKeepAlivePeriod: 60s 30 | RetryRPCCACertFilePath: ca_cert.pem 31 | MaxSharedLeases: 500 32 | MaxExclusiveLeases: 100 33 | InodePayloadEvictLowLimit: 100000 34 | InodePayloadEvictHighLimit: 100010 35 | DirInodeMaxKeysPerBPlusTreePage: 1024 36 | FileInodeMaxKeysPerBPlusTreePage: 2048 37 | ReadCacheLineSize: 1048576 38 | ReadCacheLineCountMax: 1024 39 | FileFlushTriggerSize: 10485760 40 | FileFlushTriggerDuration: 10s 41 | InodeLockRetryDelay: 10ms 42 | InodeLockRetryDelayVariance: 50 43 | LogFilePath: 44 | LogToConsole: true 45 | TraceEnabled: false 46 | FUSELogEnabled: false 47 | RetryRPCLogEnabled: false 48 | HTTPServerIPAddr: iclient 49 | HTTPServerPort: 15347 50 | -------------------------------------------------------------------------------- /docs/source/architecture/log-structured-intro.rst: -------------------------------------------------------------------------------- 1 | Log-Structured Filesystem 2 | ========================= 3 | 4 | The ProxyFS filesystem takes advantage of the properties of its 5 | underlying object storage platform. 6 | 7 | Eventual Consistency and Strong Read-your-Writes 8 | ------------------------------------------------ 9 | 10 | Object storage systems utilize eventual consistency properties that help 11 | enable its durability and availability properties. However, any new data 12 | that is written into the system isn’t subject to eventual consistency. 13 | This provides a strong read-your writes guarantee for new objects. 14 | 15 | Log-Structured Files 16 | -------------------- 17 | 18 | This strong read-your writes property enables a log-structured object 19 | format. With this log-structured format, any data written is a new, 20 | uniquely-named object in the back-end storage. A 64-bit nonce number 21 | sequence that never repeats provides uniqueness. 22 | 23 | When a file is modified through the filesystem, a new log segment is 24 | written into the back-end storage that contains only the changes. Then, 25 | the log-structure is updated with the new segment. 26 | 27 | .. image:: /_static/ProxyFS-log-segments.png 28 | :width: 275pt 29 | 30 | 31 | Log-structured objects store data in such a way that is great for 32 | filesystem access and at the same time supports object API access. This 33 | is very similar to the strategies used for large object support where a 34 | manifest file is created for a multi-part object. 35 | 36 | Log-Structured Filesystem 37 | ------------------------- 38 | 39 | The filesystem tree is stored in a similar way as a log-structured data 40 | itself. This filesystem tree can be snapshotted and stored into the 41 | back-end storage, just like the file data. 42 | 43 | Where filesystems and object APIs differ is that a filesystem is a 44 | hierarchy, whereas an object API is a flat namespace. 45 | 46 | When looking at the data through the filesystem, you will see folders, 47 | directories and files. When using an object API, those folders become 48 | slashes in the URL. The top-level directories simply map to 49 | containers/buckets in the object API. 50 | -------------------------------------------------------------------------------- /version/static-data/make_static_data.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "fmt" 8 | "os" 9 | "os/exec" 10 | ) 11 | 12 | const bytesPerLine = 16 13 | 14 | func usage() { 15 | fmt.Println("go run make_static_data.go -?") 16 | fmt.Println(" Prints this help text") 17 | fmt.Println("go run make_static_data.go ") 18 | fmt.Println(" is the name of the ultimate package for ") 19 | fmt.Println(" is the name of the generated .go source file") 20 | } 21 | 22 | var bs = []byte{} 23 | 24 | func main() { 25 | var ( 26 | gitDescribeCmd *exec.Cmd 27 | gitDescribeOutput []byte 28 | dstFile *os.File 29 | dstFileName string 30 | err error 31 | packageName string 32 | proxyfsVersionString string 33 | ) 34 | 35 | if (2 == len(os.Args)) && ("-?" == os.Args[1]) { 36 | usage() 37 | os.Exit(0) 38 | } 39 | 40 | if 3 != len(os.Args) { 41 | usage() 42 | os.Exit(1) 43 | } 44 | 45 | packageName = os.Args[1] 46 | dstFileName = os.Args[2] 47 | 48 | dstFile, err = os.Create(dstFileName) 49 | if nil != err { 50 | panic(err.Error()) 51 | } 52 | 53 | _, err = dstFile.Write([]byte(fmt.Sprintf("// Code generated by \"go run make_static_data.go %v %v\" - DO NOT EDIT\n\n", packageName, dstFileName))) 54 | if nil != err { 55 | panic(err.Error()) 56 | } 57 | _, err = dstFile.Write([]byte(fmt.Sprintf("package %v\n\n", packageName))) 58 | if nil != err { 59 | gitDescribeCmd = exec.Command("git", "describe", "--tags") 60 | 61 | gitDescribeOutput, err = gitDescribeCmd.Output() 62 | if nil != err { 63 | panic(err.Error()) 64 | } 65 | 66 | proxyfsVersionString = string(gitDescribeOutput[:len(gitDescribeOutput)-1]) 67 | } else { 68 | proxyfsVersionString = "unknown" 69 | } 70 | 71 | _, err = dstFile.Write([]byte(fmt.Sprintf("const ProxyFSVersion = `%v`\n", proxyfsVersionString))) 72 | if nil != err { 73 | panic(err.Error()) 74 | } 75 | 76 | err = dstFile.Close() 77 | if nil != err { 78 | panic(err.Error()) 79 | } 80 | 81 | os.Exit(0) 82 | } 83 | -------------------------------------------------------------------------------- /cookbooks/swift/files/default/etc/swift/bench.conf: -------------------------------------------------------------------------------- 1 | [bench] 2 | # auth = http://localhost:8080/auth/v1.0 3 | # user = test:tester 4 | # key = testing 5 | # auth_version = 1.0 6 | # log-level = INFO 7 | # timeout = 10 8 | 9 | # You can configure PUT, GET, and DELETE concurrency independently or set all 10 | # three with "concurrency" 11 | # put_concurrency = 10 12 | # get_concurrency = 10 13 | # del_concurrency = 10 14 | # concurrency = 15 | 16 | # A space-sep list of files whose contents will be read and randomly chosen 17 | # as the body (object contents) for each PUT. 18 | # object_sources = 19 | 20 | # If object_sources is not set and lower_object_size != upper_object_size, 21 | # each PUT will randomly select an object size between the two values. Units 22 | # are bytes. 23 | # lower_object_size = 10 24 | # upper_object_size = 10 25 | 26 | # If object_sources is not set and lower_object_size == upper_object_size, 27 | # every object PUT will contain this many bytes. 28 | # object_size = 1 29 | 30 | # num_objects = 1000 31 | # num_gets = 10000 32 | # num_containers = 20 33 | 34 | # The base name for created containers. 35 | # container_name = (randomly-chosen uuid4) 36 | 37 | # Should swift-bench benchmark DELETEing the created objects and then delete 38 | # all created containers? 39 | # delete = yes 40 | 41 | # Without use_proxy, swift-bench will talk directly to the backend Swift 42 | # servers. Doing that will require "url", "account", and at least one 43 | # "devices" entry. 44 | # use_proxy = yes 45 | 46 | # If use_proxy = yes, this will override any returned X-Storage-Url returned 47 | # by authenticaion (the account name will still be extracted from 48 | # X-Storage-Url though and may NOT be set with the "account" conf var). If 49 | # use_proxy = no, this setting is required and used as the X-Storage-Url when 50 | # deleting containers and as a source for IP and port for back-end Swift server 51 | # connections. The IP and port specified in this setting must have local 52 | # storage access to every device specified in "devices". 53 | # url = 54 | 55 | # Only used (and required) when use_proxy = no. 56 | # account = 57 | 58 | # A space-sep list of devices names; only relevant (and required) when 59 | # use_proxy = no. 60 | # devices = sdb1 61 | -------------------------------------------------------------------------------- /ickpt/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2022, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Program ickpt provides a command-line wrapper around package ickptpkg APIs. 5 | // 6 | // The program requires a single argument that is a path to a package config 7 | // formatted configuration to load. Optionally, overrides the the config may 8 | // be passed as additional arguments in the form .=. 9 | package main 10 | 11 | import ( 12 | "fmt" 13 | "os" 14 | "os/signal" 15 | 16 | "golang.org/x/sys/unix" 17 | 18 | "github.com/NVIDIA/proxyfs/conf" 19 | "github.com/NVIDIA/proxyfs/ickpt/ickptpkg" 20 | "github.com/NVIDIA/proxyfs/utils" 21 | ) 22 | 23 | func main() { 24 | var ( 25 | confMap conf.ConfMap 26 | configMapJSONified string 27 | err error 28 | signalChan chan os.Signal 29 | ) 30 | 31 | if len(os.Args) < 2 { 32 | fmt.Fprintf(os.Stderr, "no .conf file specified\n") 33 | os.Exit(1) 34 | } 35 | 36 | confMap, err = conf.MakeConfMapFromFile(os.Args[1]) 37 | if nil != err { 38 | fmt.Fprintf(os.Stderr, "failed to load config: %v\n", err) 39 | os.Exit(1) 40 | } 41 | 42 | err = confMap.UpdateFromStrings(os.Args[2:]) 43 | if nil != err { 44 | fmt.Fprintf(os.Stderr, "failed to apply config overrides: %v\n", err) 45 | os.Exit(1) 46 | } 47 | 48 | configMapJSONified = utils.JSONify(confMap, true) 49 | 50 | // Start 51 | 52 | fmt.Printf("Calling ickptpkg.Start(confMap)...with confMap:\n%s\n", configMapJSONified) 53 | 54 | err = ickptpkg.Start(confMap) 55 | if nil != err { 56 | fmt.Fprintf(os.Stderr, "ickptpkg.Start(confMap) failed: %v\n", err) 57 | os.Exit(1) 58 | } 59 | 60 | // Arm signal handler used to indicate termination & wait on it 61 | // 62 | // Note: signal'd chan must be buffered to avoid race with window between 63 | // arming handler and blocking on the chan read 64 | 65 | signalChan = make(chan os.Signal, 1) 66 | 67 | signal.Notify(signalChan, unix.SIGINT, unix.SIGTERM, unix.SIGHUP) 68 | 69 | <-signalChan 70 | 71 | // Stop 72 | 73 | fmt.Printf("Calling ickptpkg.Stop()...\n") 74 | 75 | err = ickptpkg.Stop() 76 | if nil != err { 77 | fmt.Fprintf(os.Stderr, "ickptpkg.Stop() failed: %v\n", err) 78 | os.Exit(1) 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/create-file.uml: -------------------------------------------------------------------------------- 1 | @startuml 2 | participant Client 3 | participant ProxyFS 4 | participant "Namespace\nDistributed\nLock Manager" as DLM 5 | participant "Swift Proxy\nsupporting\nHTTP PATCH" as SP 6 | participant "Object\nServer" as OBJ 7 | participant "Container\nServer" as CONT 8 | 9 | Client->ProxyFS: create("/tmp/foo/cat.jpg") 10 | 11 | ProxyFS->DLM: shared-lock-request([/]) 12 | DLM->ProxyFS: shared-lock-grant([/]) 13 | loop until "tmp" found 14 | ProxyFS->SP: GET([/] to find "tmp" dirent) 15 | loop 16 | SP->OBJ: GET(BTree nodes in [/] LogSegments) 17 | OBJ->SP: GET Response 18 | end 19 | SP->ProxyFS: GET Response 20 | end 21 | ProxyFS->DLM: shared-lock-release([/]) 22 | DLM->ProxyFS: shared-lock-released([/]) 23 | 24 | ProxyFS->DLM: shared-lock-request([/tmp/]) 25 | DLM->ProxyFS: shared-lock-grant([/tmp/]) 26 | loop until "foo" found 27 | ProxyFS->SP: GET([/tmp/] to find "foo" dirent) 28 | loop on "read plan" 29 | SP->OBJ: GET(BTree nodes in [/tmp/] LogSegments) 30 | OBJ->SP: GET Response 31 | end 32 | SP->ProxyFS: GET Response 33 | end 34 | ProxyFS->DLM: shared-lock-release([/tmp/]) 35 | DLM->ProxyFS: shared-lock-released([/tmp/]) 36 | 37 | ProxyFS->DLM: exclusive-lock-request([/tmp/foo/]) 38 | DLM->ProxyFS: exclusive-lock-grant([/tmp/foo/]) 39 | loop until "cat.jpg" known to be missing 40 | ProxyFS->SP: GET([/tmp/foo/] to not find "cat.jpg" dirent) 41 | loop on "read plan" 42 | SP->OBJ: GET(BTree nodes in [/tmp/foo/] LogSegments) 43 | OBJ->SP: GET Response 44 | end 45 | SP->ProxyFS: GET Response 46 | end 47 | 48 | ProxyFS->SP: PUT([/tmp/foo/cat.jpg]'s "zeroth" LogSegment (no content)) 49 | ProxyFS->SP: PUT([/tmp/foo/cat.jpg]'s empty "zeroth" LogSegment) 50 | SP->OBJ: PUT([/tmp/foo/cat.jpg]'s empty "zeroth" LogSegment) 51 | OBJ->CONT: Add([/tmp/foo/cat.jpg]'s "zeroth" LogSegment) 52 | CONT->OBJ: Add request queue'd 53 | OBJ->SP: PUT OK 54 | SP->ProxyFS: PUT OK 55 | 56 | ProxyFS->SP: PATCH([/tmp/foo/] with dirent mapping "cat.jpg" to [/tmp/foo/cat.jpg]) 57 | SP->OBJ: PUT([/tmp/foo/]'s "next" LogSegment) 58 | OBJ->CONT: Add([/tmp/foo/]'s "next" LogSegment) 59 | CONT->OBJ: Add request queue'd 60 | OBJ->SP: PUT OK 61 | SP->ProxyFS: PATCH OK 62 | ProxyFS->DLM: exclusive-lock-release([/tmp/foo/]) 63 | DLM->ProxyFS: exclusive-lock-released([/tmp/foo/]) 64 | 65 | 66 | ProxyFS->Client: create("/tmp/foo/cat.jpg") successful 67 | @enduml 68 | -------------------------------------------------------------------------------- /imgr/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Program imgr provides a command-line wrapper around package imgrpkg APIs. 5 | // 6 | // The program requires a single argument that is a path to a package config 7 | // formatted configuration to load. Optionally, overrides the the config may 8 | // be passed as additional arguments in the form .=. 9 | package main 10 | 11 | import ( 12 | "fmt" 13 | "os" 14 | "os/signal" 15 | 16 | "golang.org/x/sys/unix" 17 | 18 | "github.com/NVIDIA/proxyfs/conf" 19 | "github.com/NVIDIA/proxyfs/imgr/imgrpkg" 20 | ) 21 | 22 | func main() { 23 | var ( 24 | confMap conf.ConfMap 25 | err error 26 | signalChan chan os.Signal 27 | signalReceived os.Signal 28 | ) 29 | 30 | if len(os.Args) < 2 { 31 | fmt.Fprintf(os.Stderr, "no .conf file specified\n") 32 | os.Exit(1) 33 | } 34 | 35 | confMap, err = conf.MakeConfMapFromFile(os.Args[1]) 36 | if nil != err { 37 | fmt.Fprintf(os.Stderr, "failed to load config: %v\n", err) 38 | os.Exit(1) 39 | } 40 | 41 | err = confMap.UpdateFromStrings(os.Args[2:]) 42 | if nil != err { 43 | fmt.Fprintf(os.Stderr, "failed to apply config overrides: %v\n", err) 44 | os.Exit(1) 45 | } 46 | 47 | // Start imgr 48 | 49 | err = imgrpkg.Start(confMap) 50 | if nil != err { 51 | fmt.Fprintf(os.Stderr, "imgrpkg.Start(confMap) failed: %v\n", err) 52 | os.Exit(1) 53 | } 54 | 55 | imgrpkg.LogInfof("UP") 56 | 57 | // Arm signal handler used to indicate interruption/termination & wait on it 58 | // 59 | // Note: signal'd chan must be buffered to avoid race with window between 60 | // arming handler and blocking on the chan read 61 | 62 | signalChan = make(chan os.Signal, 1) 63 | 64 | signal.Notify(signalChan, unix.SIGINT, unix.SIGTERM, unix.SIGHUP) 65 | 66 | for { 67 | signalReceived = <-signalChan 68 | if unix.SIGHUP == signalReceived { 69 | imgrpkg.LogInfof("Received SIGHUP") 70 | err = imgrpkg.Signal() 71 | if nil != err { 72 | imgrpkg.LogWarnf("imgrpkg.Signal() failed: %v", err) 73 | } 74 | } else { 75 | break 76 | } 77 | } 78 | 79 | // Stop imgr 80 | 81 | imgrpkg.LogInfof("DOWN") 82 | 83 | err = imgrpkg.Stop() 84 | if nil != err { 85 | fmt.Fprintf(os.Stderr, "imgrpkg.Stop() failed: %v\n", err) 86 | os.Exit(1) 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ci/ansible/tasks/modify_logging_rate_limit.yml: -------------------------------------------------------------------------------- 1 | # Modify logging rate limits. Actually, totally disabling limits, unless 2 | # we observe any unwanted side effects. 3 | --- 4 | - name: Change RateLimitInterval in /etc/systemd/journald.conf 5 | lineinfile: 6 | dest: /etc/systemd/journald.conf 7 | state: present 8 | regexp: '^#?RateLimitInterval' 9 | line: 'RateLimitInterval=0' 10 | become: yes 11 | become_user: root 12 | 13 | - name: Change RateLimitInterval in /etc/systemd/journald.conf 14 | lineinfile: 15 | dest: /etc/systemd/journald.conf 16 | state: present 17 | line: 'RateLimitInterval=0' 18 | become: yes 19 | become_user: root 20 | 21 | - name: Change RateLimitBurst in /etc/systemd/journald.conf 22 | lineinfile: 23 | dest: /etc/systemd/journald.conf 24 | state: present 25 | regexp: '^#?RateLimitBurst' 26 | line: 'RateLimitBurst=0' 27 | become: yes 28 | become_user: root 29 | 30 | - name: Change RateLimitBurst in /etc/systemd/journald.conf 31 | lineinfile: 32 | dest: /etc/systemd/journald.conf 33 | state: present 34 | line: 'RateLimitBurst=0' 35 | become: yes 36 | become_user: root 37 | 38 | - name: Restart service systemd-journald 39 | service: 40 | name: systemd-journald 41 | state: restarted 42 | 43 | 44 | - name: Change RateLimitInterval in /etc/rsyslog.conf 45 | lineinfile: 46 | dest: /etc/rsyslog.conf 47 | state: present 48 | regexp: '^#?\$imjournalRatelimitInterval' 49 | line: '$imjournalRatelimitInterval 0' 50 | become: yes 51 | become_user: root 52 | 53 | - name: Change RateLimitInterval in /etc/rsyslog.conf 54 | lineinfile: 55 | dest: /etc/rsyslog.conf 56 | state: present 57 | line: '$imjournalRatelimitInterval 0' 58 | become: yes 59 | become_user: root 60 | 61 | - name: Change RateLimitBurst in /etc/rsyslog.conf 62 | lineinfile: 63 | dest: /etc/rsyslog.conf 64 | state: present 65 | regexp: '^#?\$imjournalRatelimitBurst' 66 | line: '$imjournalRatelimitBurst 0' 67 | become: yes 68 | become_user: root 69 | 70 | - name: Change RateLimitBurst in /etc/rsyslog.conf 71 | lineinfile: 72 | dest: /etc/rsyslog.conf 73 | state: present 74 | line: '$imjournalRatelimitBurst 0' 75 | become: yes 76 | become_user: root 77 | 78 | - name: Restart service rsyslog 79 | service: 80 | name: rsyslog 81 | state: restarted 82 | -------------------------------------------------------------------------------- /docs/source/architecture/access.rst: -------------------------------------------------------------------------------- 1 | Access Modules & Interfaces 2 | =========================== 3 | 4 | In this section we will discuss the various access methods for ProxyFS. 5 | 6 | 7 | .. image:: /_static/ProxyFS-components.png 8 | :width: 575pt 9 | 10 | Local filesystem access – FUSE 11 | ------------------------------ 12 | 13 | ProxyFS includes a FUSE module to provide a local filesystem capable of 14 | being mounted on the system upon which a ProxyFS process is running. 15 | 16 | NFS Access – nfsd 17 | ----------------- 18 | 19 | The local FUSE mount point can be configured in conjunction with an nfsd 20 | to export the filesystem volume via NFS. 21 | 22 | ProxyFS API – JSON RPC interface 23 | -------------------------------- 24 | 25 | In addition to providing a FUSE module for local filesystem, ProxyFS 26 | includes a direct interface for other system components to more directly 27 | interact with a volume. This interface is utilized directly for SMB 28 | access via ProxyFS’s Samba VFS module. The Swift Proxy server processes 29 | also leverage this API for direct access to the filesystem metadata tree 30 | for object API (AWS S3 and Swift) access. 31 | 32 | SMB Access – ProxyFS Samba VFS 33 | ------------------------------ 34 | 35 | ProxyFS provides a Samba VFS module written in C that integrates 36 | directly with the Samba server processes. This module is provided in a 37 | separate repository called 38 | `proxyfs-vfs `__. A ProxyFS 39 | JSON RPC client is provided in a separate repository called 40 | `proxyfs-jrpc-client `__. 41 | 42 | The ProxyFS Samba VFS module utilizes the ProxyFS JSON RPC interface for 43 | direct access into ProxyFS for a given volume. 44 | 45 | Swift ProxyFS Middleware 46 | ------------------------ 47 | 48 | The Swift Proxy server is an interface to the object back end. The Proxy 49 | server is responsible for the public-facing API requests for AWS S3 and 50 | OpenStack Swift APIs. Much of the API functionality is provided through 51 | Swift extensible middleware capabilities. 52 | 53 | ProxyFS provides object API access through a set of middleware which 54 | interfaces with the APIs provided by the ProxyFS JSON RPC interface. 55 | 56 | This interaction is similar the ProxyFS Samba VFS module, however only 57 | filesystem metadata is exchanged – *not* file data. 58 | -------------------------------------------------------------------------------- /ci/ansible/check_pinned_packages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | 6 | """ 7 | We decided to not pin packages anymore, but if we ever decide to do it again, this 8 | should still work, as long as the file ci/ansible/chef_files/packages/rhel.json keeps 9 | using the same conventions as when this script was created, which looks something like 10 | this: 11 | 12 | { 13 | "proxyfs_packages": [ 14 | ["json-c-devel", "0.11-4.el7_0"], 15 | ["fuse", "2.9.3-5.el7"] 16 | ], 17 | "wireshark_packages": [ 18 | ["wireshark"], 19 | ["libcap"] 20 | ], 21 | "ssh_packages": [ 22 | ["sshpass"] 23 | ], 24 | "gdb_packages": [ 25 | ["gdb", "7.6.1-120.el7"], 26 | ["yum-utils"] 27 | ], 28 | "utils_packages": [ 29 | ["atop"], 30 | ["vim-common"] 31 | ] 32 | } 33 | """ 34 | 35 | import json 36 | import os 37 | import subprocess 38 | import sys 39 | 40 | 41 | script_dir = os.path.abspath(os.path.dirname(__file__)) 42 | json_path = os.path.join(script_dir, "chef_files", "packages", "rhel.json") 43 | 44 | with open(json_path, "r") as json_file: 45 | versions_data = json.load(json_file) 46 | 47 | everything_ok = True 48 | for section, packages in versions_data.items(): 49 | for package_info in packages: 50 | if len(package_info) == 1: 51 | continue 52 | package, pinned_version = package_info 53 | try: 54 | yum_versions = subprocess.check_output( 55 | "repoquery {} --queryformat '%{{vr}}'".format(package), 56 | shell=True, 57 | stderr=subprocess.STDOUT, 58 | ) 59 | except subprocess.CalledProcessError as e: 60 | print("! Error checking {}: {}".format(package, e.output.strip())) 61 | everything_ok = False 62 | continue 63 | yum_versions = yum_versions.strip().split("\n") 64 | if pinned_version not in yum_versions: 65 | print( 66 | "{} not ok! pinned: {} | found in yum: {}".format( 67 | package, pinned_version, ", ".join(yum_versions) 68 | ) 69 | ) 70 | everything_ok = False 71 | 72 | if everything_ok: 73 | print("All pinned packages are installable") 74 | else: 75 | print("\nFinished with errors") 76 | sys.exit(1) 77 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/static/js/navigation.js: -------------------------------------------------------------------------------- 1 | // Open header search bar 2 | $(function() { 3 | $(".search-icon").click(function() { 4 | $(".navbar-main").toggleClass("show"); 5 | $(".search-container").toggleClass("show"); 6 | $(".search-icon").toggleClass("show"); 7 | $('#gsc-i-id1').focus(); 8 | }); 9 | }); 10 | 11 | // Close header search bar 12 | $(function() { 13 | $(".close-search").click(function() { 14 | $(".navbar-main").toggleClass("show"); 15 | $(".search-container").toggleClass("show") 16 | $(".search-icon").toggleClass("show"); 17 | }); 18 | }); 19 | 20 | // Open header drop downs on hover 21 | jQuery(document).ready(function(){ 22 | if (jQuery(window).width() > 767) { 23 | $('ul.navbar-main li ul.dropdown-menu').addClass('dropdown-hover'); 24 | $('ul.navbar-main li').hover(function() { 25 | $(this).find('.dropdown-hover').stop(true, true).delay(400).fadeIn(100); 26 | }, function() { 27 | $(this).find('.dropdown-hover').stop(true, true).delay(100).fadeOut(200); 28 | }); 29 | } else { 30 | $('ul.navbar-main li ul.dropdown-menu').removeClass('dropdown-hover'); 31 | } 32 | }); 33 | jQuery(window).resize(function () { 34 | if (jQuery(window).width() > 767) { 35 | $('ul.navbar-main li ul.dropdown-menu').addClass('dropdown-hover'); 36 | $('ul.navbar-main li').hover(function() { 37 | $(this).find('.dropdown-hover').stop(true, true).delay(400).fadeIn(100); 38 | }, function() { 39 | $(this).find('.dropdown-hover').stop(true, true).delay(100).fadeOut(200); 40 | }); 41 | } else { 42 | $('ul.navbar-main li ul.dropdown-menu').removeClass('dropdown-hover'); 43 | } 44 | }); 45 | 46 | // Remove Search text in smaller browser windows 47 | jQuery(document).ready(function(){ 48 | if (jQuery(window).width() < 1050) { 49 | $('#search-label').text(''); 50 | } else { 51 | $('#search-label').text('Search'); 52 | } 53 | }); 54 | jQuery(window).resize(function () { 55 | if (jQuery(window).width() < 1050) { 56 | $('#search-label').text(''); 57 | } else { 58 | $('#search-label').text('Search'); 59 | } 60 | }); 61 | 62 | // Show placeholder text in Google Search 63 | setTimeout( function() { 64 | $(".gsc-input").attr("placeholder", "search docs.openstack.org"); 65 | }, 1000 ); 66 | 67 | 68 | -------------------------------------------------------------------------------- /retryrpc/ping_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package retryrpc 5 | 6 | import ( 7 | "bytes" 8 | "fmt" 9 | 10 | "golang.org/x/sys/unix" 11 | ) 12 | 13 | // TestPingServer is a struct with pointer receivers implementing RpcTestPing*() 14 | type TestPingServer struct{} 15 | 16 | // TestPingReq is the request object for RpcTestPing*() 17 | type TestPingReq struct { 18 | Message string 19 | } 20 | 21 | // TestPingReply is the response object for RpcTestPing*() 22 | type TestPingReply struct { 23 | Message string 24 | } 25 | 26 | // RpcTestPing simply does a len on the message path and returns the result 27 | func (s *TestPingServer) RpcTestPing(in *TestPingReq, reply *TestPingReply) (err error) { 28 | reply.Message = fmt.Sprintf("pong %d bytes", len(in.Message)) 29 | return nil 30 | } 31 | 32 | var largeStr string = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" 33 | 34 | // RpcTestPingLarge simply does a len on the message path and returns the result 35 | // along with a larger buffer. 36 | func (s *TestPingServer) RpcTestPingLarge(in *TestPingReq, reply *TestPingReply) (err error) { 37 | buf := bytes.Buffer{} 38 | p := fmt.Sprintf("pong %d bytes", len(in.Message)) 39 | buf.WriteString(p) 40 | for i := 0; i < 1000; i++ { 41 | buf.WriteString(largeStr) 42 | } 43 | reply.Message = fmt.Sprintf("%v", buf.String()) 44 | return nil 45 | } 46 | 47 | // RpcTestPingWithError returns an error 48 | func (s *TestPingServer) RpcTestPingWithError(in *TestPingReq, reply *TestPingReply) (err error) { 49 | err = fmt.Errorf("errno: %v", unix.EIO) 50 | reply.Message = fmt.Sprintf("pong %d bytes", len(in.Message)) 51 | return err 52 | } 53 | 54 | // RpcTestPingWithClientID simply does a len on the message path and returns the clientID & result 55 | func (s *TestPingServer) RpcTestPingWithClientID(clientID uint64, in *TestPingReq, reply *TestPingReply) (err error) { 56 | reply.Message = fmt.Sprintf("Client ID: %v pong %d bytes", clientID, len(in.Message)) 57 | return nil 58 | } 59 | 60 | // RpcTestPingWithInvalidClientID is not a valid RPC 61 | // Note: Currently unused 62 | func (s *TestPingServer) RpcTestPingWithInvalidClientID(clientID int, in *TestPingReq, reply *TestPingReply) (err error) { 63 | err = fmt.Errorf("errno: %v", unix.EIO) 64 | reply.Message = fmt.Sprintf("client ID: %v pong %d bytes", clientID, len(in.Message)) 65 | return err 66 | } 67 | -------------------------------------------------------------------------------- /bin/profile-proxyfsd.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2.7 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Collect periodic heap profiles from proxyfsd using the 7 | # HTTP interface. This requies that proxyfsd be compiled with the 8 | # patch included below. 9 | # 10 | import os 11 | import sys 12 | import datetime 13 | import argparse 14 | 15 | cmd_name = os.path.basename(sys.argv[0]) 16 | 17 | heap_profile_url = "http://localhost:6060/debug/pprof/heap" 18 | profile_interval_sec = 30 19 | 20 | def timestamp(): 21 | '''Return a timestamp suitable for use in filenames. 22 | ''' 23 | now = datetime.datetime.now() 24 | ts = ("%04d-%02d-%02d_%02d:%02d:%02d" % 25 | (now.year, now.month, now.day, now.hour, now.minute, now.second)) 26 | return ts 27 | 28 | 29 | def patch_print(): 30 | '''Print the patch that needs to be applied to proxyfsd to allow this 31 | script to work. 32 | 33 | ''' 34 | 35 | patch = ''' 36 | a/proxyfsd/daemon.go b/proxyfsd/daemon.go 37 | index 656412a..8c441b7 100644 38 | --- a/proxyfsd/daemon.go 39 | +++ b/proxyfsd/daemon.go 40 | @@ -2,6 +2,8 @@ package proxyfsd 41 | 42 | import ( 43 | "fmt" 44 | + "net/http" 45 | + _ "net/http/pprof" 46 | "os" 47 | "os/signal" 48 | "sync" 49 | @@ -246,6 +248,11 @@ func Daemon(confFile string, confStrings []string, signalHandlerIsArmed *bool, e 50 | wg.Done() 51 | }() 52 | 53 | + go func() { 54 | + logger.Infof("proxyfsd.Daemon() starting debug HTTP server: %s", 55 | + http.ListenAndServe("localhost:6060", nil)) 56 | + }() 57 | + 58 | // Arm signal handler used to indicate termination and wait on it 59 | // 60 | // Note: signalled chan must be buffered to avoid race with window between 61 | ''' 62 | 63 | print "Apply this patch to proxyfsd sources and recompile:\n", patch, "\n" 64 | return 65 | 66 | def main(): 67 | ''' 68 | Figure out what to do and do it. 69 | ''' 70 | 71 | parser = argparse.ArgumentParser() 72 | parser.add_argument('--patch', action = 'store_true', 73 | help = "Print patch for proxyfsd for profiling.") 74 | 75 | args = parser.parse_args() 76 | 77 | if (args.patch): 78 | patch_print() 79 | return 0 80 | 81 | ts = timestamp() 82 | print >> sys.stderr, ts, ": No action specified" 83 | return 2 84 | 85 | if __name__ == '__main__': 86 | rc = main() 87 | sys.exit(rc) 88 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/header.html: -------------------------------------------------------------------------------- 1 | 40 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/bimodal-get.uml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | title Bimodal GET API - ReadPlan 4 | 5 | autonumber 6 | 7 | box "Swift WSGI" 8 | participant WSGI 9 | participant RPCclient 10 | end box 11 | box "ProxyFS" 12 | participant PFSrpcsvr 13 | participant PFSfs 14 | participant PFSinode 15 | end box 16 | participant SwiftBE 17 | 18 | ->WSGI:?GET with list of ranges 19 | 20 | WSGI -> WSGI:Virtual account 21 | 22 | WSGI -> RPCclient:proxyfs_get_read_plan(vPATH, array of\nranges [start-byte, length][start-byte, length]...)\nEmpty range means all. 23 | 24 | RPCclient -> PFSrpcsvr:RpcGetReadPlan(vPATH, array of\nranges [start-byte, length][start-byte, length]..., number of entries)\nEmpty range means all 25 | 26 | PFSrpcsvr -> PFSrpcsvr:Get mapping of vAccount to volumeName 27 | 28 | PFSrpcsvr -> PFSfs:If volume is not mounted for this user,\nfs.Mount(volumeName, mountOptions, authUser) 29 | 30 | PFSfs -> PFSrpcsvr:Return mountId, rootInodeNumber, err 31 | 32 | 33 | PFSrpcsvr -> PFSfs:fs.Get(mountId, rootInodeNumber, vObjectName) 34 | PFSfs -> PFSfs:Lookup fileInode of object,\nfs.Lookup(mountId, rootInodeNumber, vObjectName) 35 | 36 | PFSfs -> PFSfs:Return fileInode 37 | 38 | PFSfs -> PFSfs: Retrieve read plan fs.GetReadPlan(fileInode, array of\nranges [start-byte, length][start-byte, length]..., number of entries)\nEmpty range means all 39 | 40 | PFSfs -> PFSinode: foreach range\ninode.GetReadPlan(fileInodeNumber, offset, length) 41 | 42 | PFSinode -> PFSfs: Response is read plan for given offset and length 43 | 44 | PFSfs -> PFSrpcsvr:Response is complete read plan 45 | 46 | PFSrpcsvr -> RPCclient:Response for\nRpcGetReadPlan(vPATH) is\n(pPATH, offset, length) tuples and status 47 | 48 | RPCclient -> WSGI: Response for\nproxyfs_get_read_plan(vPATH) is\npPATH, offset, length) tuples and status 49 | 50 | WSGI -> SwiftBE:Reads data using read plan. 51 | 52 | SwiftBE -> WSGI:Response to reading is data and status. 53 | 54 | 55 | WSGI -> RPCclient:proxyfs_get_read_plan_done(vPATH)\nDone with read plan 56 | RPCclient -> PFSrpcsvr:Done with read plan (DETAILS) 57 | PFSrpcsvr -> PFSfs:Done with read plan (DETAILS) 58 | PFSfs -> PFSinode:Done with read plan (DETAILS) 59 | PFSinode -> PFSfs:Response to done with read plan (DETAILS) 60 | 61 | PFSfs -> PFSrpcsvr: Return status 62 | PFSrpcsvr -> RPCclient: Return status 63 | RPCclient -> WSGI: Return status 64 | 65 | @enduml 66 | -------------------------------------------------------------------------------- /bin/proxyfsd-getprofile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # 3 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | # Collect periodic heap profiles from proxyfsd using the 7 | # HTTP interface. This requies that proxyfsd be compiled with the 8 | # patch included below. 9 | # 10 | CMDNAME=`basename $0` 11 | HEAP_PROFILE_URL="http://localhost:6060/debug/pprof/heap" 12 | HEAP_PROFILE_SEC=180 13 | 14 | 15 | # patch for proxyfsd/daemon.go 16 | # 17 | cat < /dev/null 18 | a/proxyfsd/daemon.go b/proxyfsd/daemon.go 19 | index 656412a..8c441b7 100644 20 | --- a/proxyfsd/daemon.go 21 | +++ b/proxyfsd/daemon.go 22 | @@ -2,6 +2,8 @@ package proxyfsd 23 | 24 | import ( 25 | "fmt" 26 | + "net/http" 27 | + _ "net/http/pprof" 28 | "os" 29 | "os/signal" 30 | "sync" 31 | @@ -246,6 +248,11 @@ func Daemon(confFile string, confStrings []string, signalHandlerIsArmed *bool, e 32 | wg.Done() 33 | }() 34 | 35 | + go func() { 36 | + logger.Infof("proxyfsd.Daemon() starting debug HTTP server: %s", 37 | + http.ListenAndServe("localhost:6060", nil)) 38 | + }() 39 | + 40 | // Arm signal handler used to indicate termination and wait on it 41 | // 42 | // Note: signalled chan must be buffered to avoid race with window between 43 | !EOT 44 | 45 | function usage { 46 | echo "${CMDNAME} " 1>&2 47 | exit 2 48 | } 49 | 50 | function timestamp { 51 | /bin/date +%Y-%m-%d_%H%M.%S 52 | } 53 | 54 | dirname="$1" 55 | if [ ! -d "$dirname" ]; then 56 | echo "${CMDNAME}: target directory '${dirname}' does not exist" 1>&2 57 | usage 58 | fi 59 | 60 | wget --no-verbose -O /dev/null ${HEAP_PROFILE_URL} > /dev/null 61 | if [ $? != 0 ]; then 62 | echo "${CMDNAME}: proxyfsd http server at '${HEAP_PROFILE_URL}' did not respond. Is the patch applied?" 1>&2 63 | usage 64 | fi 65 | 66 | proxyfsd_loc="/opt/ss/bin/proxyfsd /usr/bin/proxyfsd" 67 | proxyfsd_bin="" 68 | for fl in $proxyfsd_loc; do 69 | if [ -f "$fl" -a -x "$fl" ]; then 70 | proxyfsd_bin="$fl" 71 | break 72 | fi 73 | done 74 | if [ -z "$proxyfsd_bin" ]; then 75 | echo "${CMDNAME}: can not find proxyfsd executable" 1>&2 76 | usage 77 | fi 78 | 79 | cp $proxyfsd_bin "$dirname/proxyfsd-`timestamp`" 80 | if [ $? != 0 ]; then 81 | echo "${CMDNAME}: copy of '$proxyfsd_bin' to $dirname failed" 82 | usage 83 | fi 84 | 85 | while true; do 86 | 87 | outfl="${dirname}/heap-`timestamp`.prof" 88 | wget --no-verbose -O $outfl $HEAP_PROFILE_URL 89 | # echo "collected $outfl" 90 | 91 | sleep $HEAP_PROFILE_SEC 92 | if [ $? != 0 ]; then 93 | echo "$CMDNAME: sleep exited with rc $?; exiting" 94 | break 95 | fi 96 | done 97 | -------------------------------------------------------------------------------- /docs/source/architecture/uml/file-write-old.uml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | title File Write Path - Old Model 4 | 5 | participant fs 6 | participant inode 7 | participant serializer 8 | participant sortedmap 9 | participant swiftclient 10 | participant swift 11 | participant headhunter 12 | participant disk 13 | 14 | fs->inode: Write(InodeNumber, Data) 15 | inode->headhunter: GetInodeRec(InodeNumber) 16 | headhunter->disk: Read "page" of InodeRec Table 17 | disk->headhunter: returns "page" of InodeRec Table 18 | headhunter->inode: returns LastLogSegment# 19 | inode->swiftclient: ObjectRead(trailer...then JSON'd FileInode) 20 | swiftclient->swift: HTTP GET 21 | swift->swiftclient: returns trailer...then JSON'd FileInode 22 | swiftclient->inode: returns trailer... then JSON'd FileInode 23 | inode->serializer: Do definiteWrite() 24 | serializer->swiftclient: FetchObjectChunkedPutContext() 25 | swiftclient->swift: HTTP PUT Transfer-Encoding: chunked 26 | swiftclient->serializer: returns chunkedPutContext 27 | serializer->swiftclient: SendChunk(Data) 28 | swiftclient->swift: ChunkHeader...then Data 29 | swiftclient->serializer: returns chunk sent status 30 | serializer->sortedmap: Put(FileExtentStruct) 31 | sortedmap->swiftclient: ObjectRead(cstruct'd B+Tree Node) 32 | swiftclient->sortedmap: returns cstruct'd B+Tree Node 33 | sortedmap->serializer: returns insert status 34 | serializer->serializer: Time To Flush 35 | serializer->sortedmap: Flush() 36 | sortedmap->swiftclient: SendChunk(cstruct'd B+Tree Node) 37 | swiftclient->swift: ChunkHeader...then cstruct'd B+Tree Node 38 | swiftclient->sortedmap: returns chunk sent status 39 | sortedmap->serializer: returns flush status 40 | serializer->swiftclient: SendChunk(JSON'd FileInode...then trailer) 41 | swiftclient->swift: ChunkHeader...then JSON'd FileInode...then trailer 42 | swiftclient->serializer: returns chunk sent status 43 | serializer->swiftclient: Close() 44 | swiftclient->swift: Zero-length'd ChunkHeader 45 | swift->swiftclient: returns HTTP Status 46 | swiftclient->serializer: returns HTTP Status 47 | serializer->headhunter: PutLogSegmentRec(LastLogSegment->ObjectPath) 48 | headhunter->disk: Read "page" of LogSegmentRec Table 49 | disk->headhunter: returns "page" of LogSegmentRecTable 50 | headhunter->disk: Write "page" of LogSegmentRec Table 51 | disk->headhunter: returns Write status 52 | headhunter->serializer: returns PutLogSegmentRec() status 53 | serializer->headhunter: PutInodeRec(InodeNumber->LastLogSegment#) 54 | headhunter->disk: Write "page" of InodeRec Table 55 | disk->headhunter: returns Write status 56 | headhunter->serializer: returns PutInodeRec() status 57 | serializer->inode: returns definiteWrite() status 58 | inode->fs: returns Write() status 59 | 60 | @enduml 61 | -------------------------------------------------------------------------------- /cookbooks/swift/recipes/data.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | 5 | # setup up some disk 6 | 7 | [ 8 | "/var/lib/swift", 9 | "/mnt/swift-disk", 10 | ].each do |d| 11 | directory d do 12 | action :create 13 | end 14 | end 15 | 16 | execute "create sparse file" do 17 | command "truncate -s #{node['loopback_gb']}GB /var/lib/swift/disk" 18 | creates "/var/lib/swift/disk" 19 | action :run 20 | end 21 | 22 | execute "create file system" do 23 | command "mkfs.xfs /var/lib/swift/disk" 24 | not_if "xfs_admin -l /var/lib/swift/disk" 25 | action :run 26 | 27 | notifies :run, "execute[set xfs uuid]", :immediately 28 | end 29 | 30 | execute "set xfs uuid" do 31 | # the string "generate" is treated specially by xfs_admin and means 32 | # "make one up for me" 33 | command "xfs_admin -U generate /var/lib/swift/disk" 34 | action :nothing 35 | end 36 | 37 | execute "update fstab" do 38 | command "echo '/var/lib/swift/disk /mnt/swift-disk xfs " \ 39 | "loop,noatime,nouuid,nodiratime,nobarrier,logbufs=8 0 0' >> /etc/fstab" 40 | not_if "grep swift-disk /etc/fstab" 41 | action :run 42 | end 43 | 44 | execute "mount" do 45 | command "mount /mnt/swift-disk" 46 | not_if "mountpoint /mnt/swift-disk" 47 | end 48 | 49 | if node['ec_policy'].empty? then 50 | num_disks = node['disks'] 51 | else 52 | num_disks = [node['disks'], node['ec_disks']].max 53 | end 54 | 55 | (1..num_disks).each do |i| 56 | j = ((i - 1) % node['nodes']) + 1 57 | disk_path = "/mnt/swift-disk/sdb#{i}" 58 | node_path = "/srv/node#{j}" 59 | srv_path = node_path + "/sdb#{i}" 60 | directory disk_path do 61 | owner "#{node['swift_user']}" 62 | group "#{node['swift_group']}" 63 | action :create 64 | end 65 | directory node_path do 66 | owner "#{node['swift_user']}" 67 | group "#{node['swift_group']}" 68 | action :create 69 | end 70 | link srv_path do 71 | to disk_path 72 | end 73 | end 74 | 75 | # run dirs 76 | 77 | [ 78 | "/var/run/swift", 79 | "/var/cache/swift", 80 | ].each do |d| 81 | directory d do 82 | owner "#{node['swift_user']}" 83 | group "#{node['swift_group']}" 84 | action :create 85 | end 86 | end 87 | 88 | (1..node['nodes']).each do |i| 89 | recon_cache_path = "/var/cache/swift/node#{i}" 90 | directory recon_cache_path do 91 | owner "#{node['swift_user']}" 92 | group "#{node['swift_group']}" 93 | recursive true 94 | end 95 | end 96 | 97 | # make $swift_user able to read /var/log/syslog 98 | group "adm" do 99 | action :modify 100 | members "#{node['swift_user']}" 101 | append true 102 | end 103 | -------------------------------------------------------------------------------- /iclient/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Program iclient provides a command-line wrapper around package iclientpkg APIs. 5 | // 6 | // The program requires a single argument that is a path to a package config 7 | // formatted configuration to load. Optionally, overrides the the config may 8 | // be passed as additional arguments in the form .=. 9 | package main 10 | 11 | import ( 12 | "fmt" 13 | "os" 14 | "os/signal" 15 | 16 | "golang.org/x/sys/unix" 17 | 18 | "github.com/NVIDIA/proxyfs/conf" 19 | "github.com/NVIDIA/proxyfs/iclient/iclientpkg" 20 | ) 21 | 22 | func main() { 23 | var ( 24 | confMap conf.ConfMap 25 | err error 26 | fissionErrChan chan error 27 | signalChan chan os.Signal 28 | signalReceived os.Signal 29 | ) 30 | 31 | if len(os.Args) < 2 { 32 | fmt.Fprintf(os.Stderr, "no .conf file specified\n") 33 | os.Exit(1) 34 | } 35 | 36 | confMap, err = conf.MakeConfMapFromFile(os.Args[1]) 37 | if nil != err { 38 | fmt.Fprintf(os.Stderr, "failed to load config: %v\n", err) 39 | os.Exit(1) 40 | } 41 | 42 | err = confMap.UpdateFromStrings(os.Args[2:]) 43 | if nil != err { 44 | fmt.Fprintf(os.Stderr, "failed to apply config overrides: %v\n", err) 45 | os.Exit(1) 46 | } 47 | 48 | // Start iclient 49 | 50 | fissionErrChan = make(chan error, 1) 51 | 52 | err = iclientpkg.Start(confMap, fissionErrChan) 53 | if nil != err { 54 | fmt.Fprintf(os.Stderr, "iclientpkg.Start(confMap) failed: %v\n", err) 55 | os.Exit(1) 56 | } 57 | 58 | iclientpkg.LogInfof("UP") 59 | 60 | // Arm signal handler used to indicate interruption/termination & wait on it 61 | // 62 | // Note: signal'd chan must be buffered to avoid race with window between 63 | // arming handler and blocking on the chan read 64 | 65 | signalChan = make(chan os.Signal, 1) 66 | 67 | signal.Notify(signalChan, unix.SIGINT, unix.SIGTERM, unix.SIGHUP) 68 | 69 | // Now await an indication to exit 70 | 71 | for { 72 | select { 73 | case signalReceived = <-signalChan: 74 | if unix.SIGHUP == signalReceived { 75 | iclientpkg.LogInfof("Received SIGHUP") 76 | err = iclientpkg.Signal() 77 | if nil != err { 78 | iclientpkg.LogWarnf("iclientpkg.Signal() failed: %v", err) 79 | } 80 | } else { 81 | // Stop iclient 82 | 83 | iclientpkg.LogInfof("DOWN") 84 | 85 | err = iclientpkg.Stop() 86 | if nil == err { 87 | os.Exit(0) 88 | } else { 89 | fmt.Fprintf(os.Stderr, "iclientpkg.Stop() failed: %v\n", err) 90 | os.Exit(1) 91 | } 92 | } 93 | case err = <-fissionErrChan: 94 | iclientpkg.LogFatalf("unexpected error from package fission: %v", err) 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /iauth/iauth-swift/iauth-swift.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "encoding/json" 8 | "fmt" 9 | "net/http" 10 | "strings" 11 | ) 12 | 13 | type authInStruct struct { 14 | AuthURL string 15 | AuthUser string 16 | AuthKey string 17 | Account string 18 | Container string 19 | } 20 | 21 | // PerformAuth accepts a JSON string, performs the OpenStack Swift Authorization 22 | // process and returns the AuthToken and StorageURL that may be used to access 23 | // the OpenStack Swift Account/Container/Objects. 24 | // 25 | // The format of authInJSON is determined by the Go JSON unmarshalling conventions 26 | // of the AuthInStruct declared above. 27 | func PerformAuth(authInJSON string) (authToken string, storageURL string, err error) { 28 | var ( 29 | authIn authInStruct 30 | authRequest *http.Request 31 | authResponse *http.Response 32 | storageURLSplit []string 33 | ) 34 | 35 | err = json.Unmarshal([]byte(authInJSON), &authIn) 36 | if nil != err { 37 | err = fmt.Errorf("json.Unmarshal(\"%s\",) failed: %v", authInJSON, err) 38 | return 39 | } 40 | 41 | authRequest, err = http.NewRequest("GET", authIn.AuthURL, nil) 42 | if nil != err { 43 | err = fmt.Errorf("http.NewRequest(\"GET\", \"%s\", nil) failed: %v", authIn.AuthURL, err) 44 | return 45 | } 46 | 47 | authRequest.Header.Add("X-Auth-User", authIn.AuthUser) 48 | authRequest.Header.Add("X-Auth-Key", authIn.AuthKey) 49 | 50 | authRequest.Header.Add("User-Agent", "iauth-swift") 51 | 52 | authResponse, err = http.DefaultClient.Do(authRequest) 53 | if nil != err { 54 | err = fmt.Errorf("http.DefaultClient.Do(authRequest) failed: %v", err) 55 | return 56 | } 57 | 58 | if http.StatusOK != authResponse.StatusCode { 59 | err = fmt.Errorf("authResponse.Status unexpected: %v", authResponse.Status) 60 | return 61 | } 62 | 63 | authToken = authResponse.Header.Get("X-Auth-Token") 64 | storageURL = authResponse.Header.Get("X-Storage-Url") 65 | 66 | if strings.HasPrefix(authIn.AuthURL, "https://") && strings.HasPrefix(storageURL, "http://") { 67 | // We need to correct for the case where AuthURL starts with "https://"" 68 | // but the Swift Proxy is behind a TLS terminating proxy. In this case, 69 | // Swift Proxy auth will actually see an AuthURL starting with "http://"" 70 | // and respond with a StorageURL starting with "http://"". 71 | 72 | storageURL = strings.Replace(storageURL, "http://", "https://", 1) 73 | } 74 | 75 | storageURLSplit = strings.Split(storageURL, "/") 76 | 77 | storageURLSplit[4] = authIn.Account 78 | 79 | storageURLSplit = append(storageURLSplit, authIn.Container) 80 | 81 | storageURL = strings.Join(storageURLSplit, "/") 82 | 83 | err = nil 84 | return 85 | } 86 | -------------------------------------------------------------------------------- /benchmark.fio: -------------------------------------------------------------------------------- 1 | ; Job/Section Selection: --section={write_1|read_1|write_2|read_2|write_4|read_4|write_8|read_8|write_16|read_16} 2 | ; 3 | ; Suggested sequence: 4 | ; 5 | ; Startup file server 6 | ; Mount file system 7 | ; Erase all files in file system 8 | ; Unmount file system 9 | ; Restart file server 10 | ; Remount file system 11 | ; fio --section=write_1 benchmark.fio 12 | ; Record results 13 | ; Unmount file system 14 | ; Restart file server 15 | ; Remount file system 16 | ; fio --section=read_1 benchmark.fio 17 | ; Record results 18 | ; Erase all files in file system 19 | ; Unmount file system 20 | ; Restart file server 21 | ; Remount file system 22 | ; fio --section=write_2 benchmark.fio 23 | ; Record results 24 | ; Unmount file system 25 | ; Restart file server 26 | ; Remount file system 27 | ; fio --section=read_2 benchmark.fio 28 | ; Record results 29 | ; Erase all files in file system 30 | ; Unmount file system 31 | ; Restart file server 32 | ; Remount file system 33 | ; fio --section=write_4 benchmark.fio 34 | ; Record results 35 | ; Unmount file system 36 | ; Restart file server 37 | ; Remount file system 38 | ; fio --section=read_4 benchmark.fio 39 | ; Record results 40 | ; Erase all files in file system 41 | ; Unmount file system 42 | ; Restart file server 43 | ; Remount file system 44 | ; fio --section=write_8 benchmark.fio 45 | ; Record results 46 | ; Unmount file system 47 | ; Restart file server 48 | ; Remount file system 49 | ; fio --section=read_8 benchmark.fio 50 | ; Record results 51 | ; Erase all files in file system 52 | ; Unmount file system 53 | ; Restart file server 54 | ; Remount file system 55 | ; fio --section=write_16 benchmark.fio 56 | ; Record results 57 | ; Unmount file system 58 | ; Restart file server 59 | ; Remount file system 60 | ; fio --section=read_16 benchmark.fio 61 | ; Record results 62 | ; Erase all files in file system 63 | ; Unmount file system 64 | ; Stop file server 65 | 66 | [global] 67 | directory=/mnt 68 | end_fsync=1 69 | filename_format=fio.$jobnum.$filenum 70 | group_reporting 71 | iodepth=1 72 | ioengine=psync 73 | direct=1 74 | blocksize=64Ki 75 | size=4Gi 76 | 77 | [write_1] 78 | readwrite=write 79 | numjobs=1 80 | 81 | [read_1] 82 | readwrite=read 83 | numjobs=1 84 | 85 | [write_2] 86 | readwrite=write 87 | numjobs=2 88 | 89 | [read_2] 90 | readwrite=read 91 | numjobs=2 92 | 93 | [write_4] 94 | readwrite=write 95 | numjobs=4 96 | 97 | [read_4] 98 | readwrite=read 99 | numjobs=4 100 | 101 | [write_8] 102 | readwrite=write 103 | numjobs=8 104 | 105 | [read_8] 106 | readwrite=read 107 | numjobs=8 108 | 109 | [write_16] 110 | readwrite=write 111 | numjobs=16 112 | 113 | [read_16] 114 | readwrite=read 115 | numjobs=16 116 | -------------------------------------------------------------------------------- /docs/source/theme/swiftopensource/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block header %}{% endblock %} 6 | ProxyFS File Access: {{ title }} 7 | 8 | 9 | 10 | {{ metatags }} 11 | {% include 'css.html' %} 12 | {%- for cssfile in css_files %} 13 | 14 | {%- endfor %} 15 | {# FAVICON #} 16 | {% if favicon %} 17 | 18 | {% endif %} 19 | {% if theme_analytics_tracking_code %} 20 | 21 | 30 | 31 | {% endif %} 32 | 33 | 34 | {% include 'header.html' %} 35 |
36 |
37 |
38 | {% include 'titlerow.html' %} 39 |
40 |
41 |
42 | {% block body %}{% endblock %} 43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | {% if prev %} 51 | 52 | {% endif %} 53 | {% if next %} 54 | 55 | {% endif %} 56 |
57 |
58 |
59 | {% include 'sidebartoc.html' %} 60 |
61 |
62 | {% include 'footer.html' %} 63 | {% include 'script_footer.html' %} 64 | {% block script_footer %}{% endblock %} 65 | 66 | 67 | -------------------------------------------------------------------------------- /ihtml/static-content.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package ihtml 5 | 6 | //go:generate make-static-content/make-static-content ihtml stylesDotCSS text/css s static-content/styles.css styles_dot_css_.go 7 | 8 | //go:generate make-static-content/make-static-content ihtml utilsDotJS application/javascript s static-content/utils.js utils_dot_js_.go 9 | 10 | //go:generate make-static-content/make-static-content ihtml jsontreeDotJS application/javascript s static-content/jsontree.js jsontree_dot_js_.go 11 | 12 | //go:generate make-static-content/make-static-content ihtml bootstrapDotCSS text/css s static-content/bootstrap.min.css bootstrap_dot_min_dot_css_.go 13 | 14 | //go:generate make-static-content/make-static-content ihtml bootstrapDotJS application/javascript s static-content/bootstrap.min.js bootstrap_dot_min_dot_js_.go 15 | //go:generate make-static-content/make-static-content ihtml jqueryDotJS application/javascript s static-content/jquery.min.js jquery_dot_min_dot_js_.go 16 | //go:generate make-static-content/make-static-content ihtml popperDotJS application/javascript b static-content/popper.min.js popper_dot_min_dot_js_.go 17 | 18 | //go:generate make-static-content/make-static-content ihtml openIconicBootstrapDotCSS text/css s static-content/open-iconic/font/css/open-iconic-bootstrap.min.css open_iconic_bootstrap_dot_css_.go 19 | 20 | //go:generate make-static-content/make-static-content ihtml openIconicDotEOT application/vnd.ms-fontobject b static-content/open-iconic/font/fonts/open-iconic.eot open_iconic_dot_eot_.go 21 | //go:generate make-static-content/make-static-content ihtml openIconicDotOTF application/font-sfnt b static-content/open-iconic/font/fonts/open-iconic.otf open_iconic_dot_otf_.go 22 | //go:generate make-static-content/make-static-content ihtml openIconicDotSVG image/svg+xml s static-content/open-iconic/font/fonts/open-iconic.svg open_iconic_dot_svg_.go 23 | //go:generate make-static-content/make-static-content ihtml openIconicDotTTF application/font-sfnt b static-content/open-iconic/font/fonts/open-iconic.ttf open_iconic_dot_ttf_.go 24 | //go:generate make-static-content/make-static-content ihtml openIconicDotWOFF application/font-woff b static-content/open-iconic/font/fonts/open-iconic.woff open_iconic_dot_woff_.go 25 | -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | ProxyFS Introduction 2 | ==================== 3 | 4 | ProxyFS is a hierarchical file system that provides integrated file and 5 | object API access for data stored with an object storage back-end. 6 | 7 | .. image:: /_static/ProxyFS-file-object.png 8 | :width: 200pt 9 | 10 | Background 11 | ---------- 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | 16 | architecture/background 17 | 18 | Not a Gateway 19 | ------------- 20 | 21 | Rather than using a gateway to provide file-based access, ProxyFS is 22 | directly integrated into the core of OpenStack Swift object storage to 23 | enable direct AWS S3 and Swift object API access. This makes it 24 | compatible with its corresponding projects for `S3 25 | API `__ and `public cloud 26 | synchronization `__. 27 | 28 | Multiple Modes of Access 29 | ------------------------ 30 | 31 | ProxyFS supports SMB and NFS along with AWS S3 and OpenStack Swift 32 | object protocols. This enables filesystem clients to mount and 33 | read/write data that is simultaneously read/write (GET/PUT/etc) 34 | accessible to object API clients. 35 | 36 | Full Filesystem 37 | --------------- 38 | 39 | ProxyFS is a full filesystem. It is not filesystem-like. Full filesystem 40 | operations are supported such as rename, move, growing files, modifying 41 | data, etc. 42 | 43 | ProxyFS is designed to support filesystem-based applications that could 44 | benefit from leveraging cloud storage platforms. 45 | 46 | Modernize Workflows 47 | ------------------- 48 | 49 | ProxyFS enables file-based applications and workflows can coexist with 50 | new applications that leverage object APIs such as AWS S3 / Swift API 51 | and integrate with public cloud services. 52 | 53 | Many workflows (and users!) that have increasing storage needs that are 54 | rooted in the expectations of current filesystem access. However, these 55 | workflows could benefit from the architecture and capabilities of object 56 | and cloud storage. 57 | 58 | ProxyFS enables the integration of object storage into existing 59 | file-based workflows / applications while at the same time supporting 60 | object APIs for newer, “cloud native” applications. 61 | 62 | ProxyFS allows the same data that is accessed by S3 and Swift API 63 | accessible by a Filesystem API. This provides a bridge to allow data 64 | services for both existing applications and new applications. 65 | 66 | 67 | API 68 | --- 69 | 70 | .. toctree:: 71 | :maxdepth: 1 72 | 73 | api/index 74 | 75 | 76 | Architecture 77 | ------------ 78 | 79 | .. toctree:: 80 | :maxdepth: 1 81 | 82 | architecture/log-structured-intro 83 | architecture/access 84 | architecture/example-flows 85 | 86 | 87 | Reference Diagrams 88 | ------------------ 89 | 90 | .. toctree:: 91 | :maxdepth: 2 92 | 93 | architecture/uml-references 94 | -------------------------------------------------------------------------------- /cookbooks/swift/recipes/source.rb: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | 5 | # ensure source_root 6 | 7 | directory "#{node['source_root']}" do 8 | owner "#{node['swift_user']}" 9 | group "#{node['swift_group']}" 10 | action :create 11 | end 12 | 13 | # python install 14 | 15 | execute "git python-swiftclient" do 16 | cwd "#{node['source_root']}" 17 | command "sudo -u #{node['swift_user']} git clone -b #{node['swiftclient_repo_branch']} #{node['swiftclient_repo']}" 18 | creates "#{node['source_root']}/python-swiftclient" 19 | action :run 20 | end 21 | 22 | execute "git swift-bench" do 23 | cwd "#{node['source_root']}" 24 | command "sudo -u #{node['swift_user']} git clone -b #{node['swift_bench_repo_branch']} #{node['swift_bench_repo']}" 25 | creates "#{node['source_root']}/swift-bench" 26 | action :run 27 | end 28 | 29 | execute "git swift" do 30 | cwd "#{node['source_root']}" 31 | command "sudo -u #{node['swift_user']} git clone -b #{node['swift_repo_branch']} #{node['swift_repo']}" 32 | creates "#{node['source_root']}/swift" 33 | action :run 34 | end 35 | 36 | execute "fix semantic_version error from testtools" do 37 | command "pip install --upgrade testtools" 38 | end 39 | 40 | execute "python-swiftclient-install" do 41 | cwd "#{node['source_root']}/python-swiftclient" 42 | command "pip install -e . && pip install -r test-requirements.txt" 43 | if not node['full_reprovision'] 44 | creates "/usr/local/lib/python2.7/dist-packages/python-swiftclient.egg-link" 45 | end 46 | action :run 47 | end 48 | 49 | execute "swift-bench-install" do 50 | cwd "#{node['source_root']}/swift-bench" 51 | # swift-bench has an old version of hacking in the test requirements, 52 | # seems to pull back pbr to 0.11 and break everything; not installing 53 | # swift-bench's test-requirements is probably better than that 54 | command "pip install -e ." 55 | if not node['full_reprovision'] 56 | creates "/usr/local/lib/python2.7/dist-packages/swift-bench.egg-link" 57 | end 58 | action :run 59 | end 60 | 61 | execute "python-swift-install" do 62 | cwd "#{node['source_root']}/swift" 63 | command "pip install -e . && pip install -r test-requirements.txt" 64 | if not node['full_reprovision'] 65 | creates "/usr/local/lib/python2.7/dist-packages/swift.egg-link" 66 | end 67 | action :run 68 | end 69 | 70 | execute "install tox" do 71 | command "pip install tox==3.5.3" 72 | if not node['full_reprovision'] 73 | creates "/usr/local/lib/python2.7/dist-packages/tox" 74 | end 75 | action :run 76 | end 77 | 78 | [ 79 | 'swift', 80 | 'python-swiftclient', 81 | ].each do |dirname| 82 | execute "ln #{dirname}" do 83 | command "ln -s #{node['source_root']}/#{dirname} /home/#{node['swift_user']}/#{dirname}" 84 | creates "/home/#{node['swift_user']}/#{dirname}" 85 | end 86 | end 87 | 88 | -------------------------------------------------------------------------------- /retryrpc/perfrpc/tls.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2021, NVIDIA CORPORATION. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package main 5 | 6 | import ( 7 | "crypto/tls" 8 | "crypto/x509/pkix" 9 | "fmt" 10 | "net" 11 | "os" 12 | "time" 13 | 14 | "github.com/NVIDIA/proxyfs/icert/icertpkg" 15 | ) 16 | 17 | type tlsCertsStruct struct { 18 | caCertPEMBlock []byte 19 | caKeyPEMBlock []byte 20 | endpointCertPEMBlock []byte 21 | endpointKeyPEMBlock []byte 22 | endpointTLSCert tls.Certificate 23 | caCertFile string 24 | caKeyFile string 25 | endpointCertFile string 26 | endpointKeyFile string 27 | } 28 | 29 | var tlsCerts *tlsCertsStruct 30 | 31 | func tlsSetFileNames(tlsCerts *tlsCertsStruct, tlsDir string) { 32 | tlsCerts.caCertFile = tlsDir + "/caCertFile" 33 | tlsCerts.caKeyFile = tlsDir + "/caKeyFile" 34 | tlsCerts.endpointCertFile = tlsDir + "/endpointCertFile" 35 | tlsCerts.endpointKeyFile = tlsDir + "/endpointKeyFile" 36 | } 37 | 38 | // Utility function to initialize tlsCerts 39 | func tlsCertsAllocate(ipAddr string, dnsName string, ttl time.Duration, tlsDir string) (tlsCerts *tlsCertsStruct) { 40 | var ( 41 | err error 42 | ) 43 | 44 | tlsCerts = &tlsCertsStruct{} 45 | tlsSetFileNames(tlsCerts, tlsDir) 46 | 47 | tlsCerts.caCertPEMBlock, tlsCerts.caKeyPEMBlock, err = icertpkg.GenCACert( 48 | icertpkg.GenerateKeyAlgorithmEd25519, 49 | pkix.Name{ 50 | Organization: []string{"Test Organization CA"}, 51 | Country: []string{}, 52 | Province: []string{}, 53 | Locality: []string{}, 54 | StreetAddress: []string{}, 55 | PostalCode: []string{}, 56 | }, 57 | ttl, 58 | tlsCerts.caCertFile, 59 | tlsCerts.caKeyFile) 60 | 61 | if err != nil { 62 | fmt.Printf("icertpkg.GenCACert() failed: %v", err) 63 | os.Exit(1) 64 | } 65 | 66 | dnsToIPAddr, lookupErr := net.LookupIP(dnsName) 67 | if dnsName != "" && lookupErr != nil { 68 | fmt.Printf("Unable to lookup DNS name: %v - err: %v\n", dnsName, lookupErr) 69 | os.Exit(1) 70 | } 71 | ipAddr = dnsToIPAddr[0].String() 72 | 73 | tlsCerts.endpointCertPEMBlock, tlsCerts.endpointKeyPEMBlock, err = icertpkg.GenEndpointCert( 74 | icertpkg.GenerateKeyAlgorithmEd25519, 75 | pkix.Name{ 76 | Organization: []string{"Test Organization Endpoint"}, 77 | Country: []string{}, 78 | Province: []string{}, 79 | Locality: []string{}, 80 | StreetAddress: []string{}, 81 | PostalCode: []string{}, 82 | }, 83 | []string{dnsName}, 84 | []net.IP{net.ParseIP(ipAddr)}, 85 | ttl, 86 | tlsCerts.caCertPEMBlock, 87 | tlsCerts.caKeyPEMBlock, 88 | tlsCerts.endpointCertFile, 89 | tlsCerts.endpointKeyFile) 90 | 91 | if err != nil { 92 | fmt.Printf("icertpkg.genEndpointCert() failed: %v", err) 93 | os.Exit(1) 94 | } 95 | 96 | tlsCerts.endpointTLSCert, err = tls.X509KeyPair(tlsCerts.endpointCertPEMBlock, tlsCerts.endpointKeyPEMBlock) 97 | if err != nil { 98 | fmt.Printf("tls.LoadX509KeyPair() failed: %v", err) 99 | os.Exit(1) 100 | } 101 | return 102 | } 103 | --------------------------------------------------------------------------------