Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add region as mount option #238

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ commands:
- run:
name: Install dependencies
command: |
yum install --skip-broken -y curl
yum install -y curl
- run:
name: Install latest Rust
command: |
Expand Down Expand Up @@ -232,6 +232,15 @@ jobs:
workflows:
workflow:
jobs:
- test:
name: python3_12
image: python:3.12.4
- test:
name: python3_11
image: python:3.11.9
- test:
name: python3_10
image: python:3.10.13
- test:
name: python3_9
image: python:3.9.13
Expand Down Expand Up @@ -265,10 +274,10 @@ workflows:
- build-rpm-package:
name: rocky8
image: rockylinux/rockylinux:8
- build-rpm-package-rustup:
- build-rpm-package:
name: amazon-linux-latest
image: amazonlinux:latest
- build-rpm-package-rustup:
- build-rpm-package:
name: amazon-linux-2
image: amazonlinux:2
- build-rpm-package:
Expand All @@ -292,10 +301,10 @@ workflows:
- build-rpm-package-rustup:
name: fedora34
image: fedora:34
- build-rpm-package-rustup:
- build-rpm-package:
name: fedora35
image: fedora:35
- build-rpm-package-rustup:
- build-rpm-package:
name: fedora36
image: fedora:36
- build-suse-rpm-package:
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ SOURCE_TARBALL = $(PACKAGE_NAME).tar.gz
SPECFILE = $(PACKAGE_NAME).spec
BUILD_DIR = build/rpmbuild
PROXY_VERSION = 2.0.0
RPM_BUILD_FLAGS ?= --with system_rust
export PYTHONPATH := $(shell pwd)/src

.PHONY: clean
Expand Down Expand Up @@ -49,16 +48,12 @@ rpm-only:
cp $(SPECFILE) $(BUILD_DIR)/SPECS
cp $(SOURCE_TARBALL) $(BUILD_DIR)/SOURCES
cp config.toml $(BUILD_DIR)/SOURCES
rpmbuild -ba --define "_topdir `pwd`/$(BUILD_DIR)" --define "include_vendor_tarball false" $(BUILD_DIR)/SPECS/$(SPECFILE) $(RPM_BUILD_FLAGS)
rpmbuild -ba --define "_topdir `pwd`/$(BUILD_DIR)" --define "include_vendor_tarball false" $(BUILD_DIR)/SPECS/$(SPECFILE)
cp $(BUILD_DIR)/RPMS/*/*rpm build

.PHONY: rpm
rpm: sources rpm-only

.PHONY: rpm-without-system-rust
rpm-without-system-rust: sources
$(MAKE) rpm-only RPM_BUILD_FLAGS="--without system_rust"

.PHONY: deb
deb:
./build-deb.sh
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The `efs-utils` package has been verified against the following MacOS distributi
* OpenSSL-devel 1.0.2+
* Python 3.7/3.8
* `stunnel` 4.56+
- `rust` 1.70+
- `rust` 1.68+
- `cargo`

## Optional
Expand Down Expand Up @@ -117,7 +117,7 @@ for more guidance.)
Other distributions require building the package from source and installing it.

If your distribution doesn't provide a rust or cargo package, or it provides versions
that are older than 1.70, then you can install rust and cargo through rustup:
that are older than 1.68, then you can install rust and cargo through rustup:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
Expand Down Expand Up @@ -167,7 +167,7 @@ $ sudo apt-get -y install ./build/amazon-efs-utils*deb
```

If your Debian distribution doesn't provide a rust or cargo package, or your distribution provides versions
that are older than 1.70, then you can install rust and cargo through rustup:
that are older than 1.68, then you can install rust and cargo through rustup:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
Expand All @@ -177,7 +177,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
**`make rpm` fails due to "feature `edition2021` is required"**:

Update to a version of rust and cargo
that is newer than 1.70. To install a new version of rust and cargo, run
that is newer than 1.68. To install a new version of rust and cargo, run
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
Expand Down Expand Up @@ -260,12 +260,18 @@ To mount file system within a given network namespace, run:
$ sudo mount -t efs -o netns=netns-path file-system-id efs-mount-point/
```

To mount file system to the mount target in specific availability zone (e.g. us-east-1a), run:
To mount file system to the mount target in a specific availability zone (e.g. us-east-1a), run:

```bash
$ sudo mount -t efs -o az=az-name file-system-id efs-mount-point/
```

To mount file system to the mount target in a specific region (e.g. us-east-1), run:

```bash
$ sudo mount -t efs -o region=region-name file-system-id efs-mount-point/
```

**Note: The [prequisites in the crossaccount section below](#crossaccount-option-prerequisites) must be completed before using the crossaccount option.**

To mount the filesystem mount target in the same physical availability zone ID (e.g. use1-az1) as the client instance over cross-AWS-account mounts, run:
Expand Down Expand Up @@ -372,7 +378,7 @@ To utilize the improved performance benefits of efs-proxy, you must re-mount any

Efs-proxy is not compatible with OCSP or Mac clients. In these cases, efs-utils will automatically revert back to using stunnel.

If you are building efs-utils v2.0.0 from source, then you need Rust and Cargo >= 1.70.
If you are building efs-utils v2.0.0 from source, then you need Rust and Cargo >= 1.68.

## Upgrading stunnel for RHEL/CentOS

Expand Down
39 changes: 9 additions & 30 deletions amazon-efs-utils.spec
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,12 @@ Requires(preun) : /sbin/service /sbin/chkconfig
Requires(postun) : /sbin/service
%endif

# Conditional to allow building without
# rust installed with yum
%bcond_without system_rust

# If yum provides rust and cargo
# use rpmbuild --with system_rust
%if %{with system_rust}
BuildRequires: cargo rust
# RHEL 7 doesn't provide a Rust or Cargo package,
# so users are expected to install it through rustup.
# The conditional here checks for amzn2 because on amzn2,
# '0%{?rhel}' also evaluates to 7.
%if 0%{?amzn2} || 0%{?rhel} != 7
BuildRequires : cargo rust
%endif

BuildRequires: openssl-devel
Expand All @@ -96,25 +94,6 @@ This package provides utilities for simplifying the use of EFS file systems
%global debug_package %{nil}

%prep

# If yum doesn't provides rust and cargo
# use rpmbuild --without system_rust
%if %{without system_rust}
source $HOME/.cargo/env || true
%endif

# Ensure cargo is installed
if ! command -v cargo &> /dev/null; then
echo "Error: cargo is not in PATH. Please install cargo."
exit 1
fi

# Ensure rustc is installed
if ! command -v rustc &> /dev/null; then
echo "Error: rustc is not PATH. Please install rustc."
exit 1
fi

%setup -n %{name}
mkdir -p %{_builddir}/%{name}/src/proxy/.cargo
%if "%{include_vendor_tarball}" == "true"
Expand Down Expand Up @@ -197,17 +176,17 @@ fi

* Tue Jun 18 2024 Arnav Gupta <[email protected]> - 2.0.3
- Upgrade py version
- Replace deprecated usage of datetime
- Replace deprecated usage of datetime

* Mon May 20 2024 Anthony Tse <[email protected]> - 2.0.2
- Check for efs-proxy PIDs when cleaning tunnel state files
- Add PID to log entries

* Tue Apr 23 2024 Ryan Stankiewicz <[email protected]> - 2.0.1
- Disable Nagle's algorithm for efs-proxy TLS mounts to improve latencies
- Disable Nagle's algorithm for efs-proxy TLS mounts to improve latencies

* Mon Apr 08 2024 Ryan Stankiewicz <[email protected]> - 2.0.0
- Replace stunnel, which provides TLS encryptions for mounts, with efs-proxy, a component built in-house at AWS. Efs-proxy lays the foundation for upcoming feature launches at EFS.
- Replace stunnel, which provides TLS encryptions for mounts, with efs-proxy, a component built in-house at AWS. Efs-proxy lays the foundation for upcoming feature launches at EFS.

* Mon Mar 18 2024 Sean Zatz <[email protected]> - 1.36.0
- Support new mount option: crossaccount, conduct cross account mounts via ip address. Use client AZ-ID to choose mount target.
Expand Down
3 changes: 3 additions & 0 deletions man/mount.efs.8
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ this option is by default passed and the EFS file system is mounted over TLS\&.
\fBnotls\fR
Mounts the EFS file system without TLS, applies for Mac distributions only\&.
.TP
\fBregion\fR
Mounts the EFS file system from the specified region, overriding any config file value\&.
.TP
\fBtlsport=\fR\fIn\fR
Configures the proxy process to listen for connections from the NFS client on the specified port\&. This is applicable to both non-tls and tls mounts.
By default, the \
Expand Down
Loading