Skip to content

Commit af39e46

Browse files
author
Himani Anil Deshpande
committed
Update the efs-utils to use a different Cargo.toml
1 parent 2731b83 commit af39e46

File tree

6 files changed

+80
-7
lines changed

6 files changed

+80
-7
lines changed

CHANGELOG.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ This file is used to list changes made in each version of the AWS ParallelCluste
99
**CHANGES**
1010
- Upgrade Slurm to version 24.05.8.
1111

12-
**BUG FIXES**
13-
- Use `v2.1.0-patched.tar.gz` which pins backtrace version to v3.0.74
14-
1512
**BUG FIXES**
1613
- Fix a bug in the installation of ARM Performance Library that was causing the build image fail in isolated environments
1714
due to cookbook retrieving GCC dependencies from GCC website rather than ParallelCluster bucket.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[package]
2+
name = "efs-proxy"
3+
edition = "2021"
4+
build = "build.rs"
5+
# The version of efs-proxy is tied to efs-utils.
6+
version = "2.1.0"
7+
publish = false
8+
9+
[dependencies]
10+
anyhow = "1.0.72"
11+
async-trait = "0.1"
12+
bytes = { version = "1.4.0" }
13+
chrono = "0.4"
14+
clap = { version = "=4.0.0", features = ["derive"] }
15+
fern = "0.6"
16+
futures = "0.3"
17+
log = "0.4"
18+
log4rs = { version = "0", features = ["rolling_file_appender", "compound_policy", "size_trigger", "fixed_window_roller"]}
19+
nix = { version = "0.26.2", features = ["signal"]}
20+
onc-rpc = "0.2.3"
21+
rand = "0.8.5"
22+
s2n-tls = "0.0"
23+
s2n-tls-tokio = "0.0"
24+
s2n-tls-sys = "0.0"
25+
serde = {version="1.0.175",features=["derive"]}
26+
serde_ini = "0.2.0"
27+
thiserror = "1.0.44"
28+
tokio = { version = "1.29.0, <1.39", features = ["full"] }
29+
tokio-util = "0.7.8"
30+
uuid = { version = "1.4.1", features = ["v4", "fast-rng", "macro-diagnostics"]}
31+
xdr-codec = "0.4.4"
32+
backtrace = "=0.3.74"
33+
34+
[dev-dependencies]
35+
test-case = "*"
36+
tokio = { version = "1.29.0", features = ["test-util"] }
37+
tempfile = "3.10.1"
38+
39+
[build-dependencies]
40+
xdrgen = "0.4.4"

cookbooks/aws-parallelcluster-environment/resources/efs/partial/_debian.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
def install_script_code(efs_utils_tarball, efs_utils_package, efs_utils_version)
1717
<<-EFSUTILSINSTALL
1818
set -e
19-
tar xf #{efs_utils_tarball}
2019
cd efs-utils-#{efs_utils_version}
2120
./build-deb.sh
2221
apt-get -y install ./build/#{efs_utils_package}*deb

cookbooks/aws-parallelcluster-environment/resources/efs/partial/_install_from_tar.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@
5050
action :create_if_missing
5151
end
5252

53+
bash "Untar the efs-utils" do
54+
cwd node['cluster']['sources_dir']
55+
code <<-EFSUTILSUNTAR
56+
set -e
57+
tar xf #{efs_utils_tarball}
58+
EFSUTILSUNTAR
59+
end
60+
61+
cookbook_file "#{node['cluster']['sources_dir']}/efs-utils-#{package_version}/src/proxy/Cargo.toml" do
62+
source 'efs/Cargo.toml'
63+
owner 'root'
64+
group 'root'
65+
mode '0755'
66+
action :create
67+
end
68+
5369
# Install EFS Utils following https://docs.aws.amazon.com/efs/latest/ug/installing-amazon-efs-utils.html
5470
bash "install efs utils" do
5571
cwd node['cluster']['sources_dir']

cookbooks/aws-parallelcluster-environment/resources/efs/partial/_redhat_based.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
def install_script_code(efs_utils_tarball, efs_utils_package, efs_utils_version)
1717
<<-EFSUTILSINSTALL
1818
set -e
19-
tar xf #{efs_utils_tarball}
2019
cd efs-utils-#{efs_utils_version}
2120
make rpm
2221
yum -y install ./build/#{efs_utils_package}*rpm

cookbooks/aws-parallelcluster-environment/spec/unit/resources/efs_spec.rb

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,15 @@ def mock_already_installed(package, expected_version, installed)
8888
cached(:tarball_path) { "#{source_dir}/efs-utils-#{utils_version}.tar.gz" }
8989
cached(:tarball_url) { "https://#{aws_region}-aws-parallelcluster.s3.#{aws_region}.test_aws_domain/archives/dependencies/efs/v#{utils_version}.tar.gz" }
9090
cached(:tarball_checksum) { 'TARBALL CHECKSUM' }
91+
cached(:bash_untar_code) do
92+
<<-EFSUTILSUNTAR
93+
set -e
94+
tar xf #{tarball_path}
95+
EFSUTILSUNTAR
96+
end
9197
cached(:bash_code) do
9298
<<-EFSUTILSINSTALL
9399
set -e
94-
tar xf #{tarball_path}
95100
cd efs-utils-#{utils_version}
96101
./build-deb.sh
97102
apt-get -y install ./build/amazon-efs-utils*deb
@@ -127,6 +132,12 @@ def mock_already_installed(package, expected_version, installed)
127132
.with(checksum: tarball_checksum)
128133
end
129134

135+
it 'it untars the downloaded tarball' do
136+
is_expected.to run_bash('Untar the efs-utils')
137+
.with(cwd: source_dir)
138+
.with(code: bash_untar_code)
139+
end
140+
130141
it 'installs package from downloaded tarball' do
131142
is_expected.to run_bash('install efs utils')
132143
.with(cwd: source_dir)
@@ -168,10 +179,15 @@ def mock_already_installed(package, expected_version, installed)
168179
cached(:tarball_path) { "#{source_dir}/efs-utils-#{utils_version}.tar.gz" }
169180
cached(:tarball_url) { "https://#{aws_region}-aws-parallelcluster.s3.#{aws_region}.test_aws_domain/archives/dependencies/efs/v#{utils_version}.tar.gz" }
170181
cached(:tarball_checksum) { 'TARBALL CHECKSUM' }
182+
cached(:bash_untar_code) do
183+
<<-EFSUTILSUNTAR
184+
set -e
185+
tar xf #{tarball_path}
186+
EFSUTILSUNTAR
187+
end
171188
cached(:bash_code) do
172189
<<-EFSUTILSINSTALL
173190
set -e
174-
tar xf #{tarball_path}
175191
cd efs-utils-#{utils_version}
176192
make rpm
177193
yum -y install ./build/amazon-efs-utils*rpm
@@ -218,6 +234,12 @@ def mock_already_installed(package, expected_version, installed)
218234
.with(checksum: tarball_checksum)
219235
end
220236

237+
it 'it untars the downloaded tarball' do
238+
is_expected.to run_bash('Untar the efs-utils')
239+
.with(cwd: source_dir)
240+
.with(code: bash_untar_code)
241+
end
242+
221243
it 'installs package from downloaded tarball' do
222244
is_expected.to run_bash('install efs utils')
223245
.with(cwd: source_dir)

0 commit comments

Comments
 (0)