Skip to content

Commit 366af3a

Browse files
committed
Modify the diff command to compare cluster_user_home and cluster_user_local_home
1 parent d9844d0 commit 366af3a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cookbooks/aws-parallelcluster-environment/recipes/init/config_default_user_home.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@
6767
rsync -a /tmp#{node['cluster']['cluster_user_home']}/ #{node['cluster']['cluster_user_local_home']}
6868
usermod -d #{node['cluster']['cluster_user_local_home']} #{node['cluster']['cluster_user']}
6969
chown -R #{node['cluster']['cluster_user']}: #{node['cluster']['cluster_user_local_home']}
70-
diff_output=$(diff -r /tmp#{node['cluster']['cluster_user_home']} #{node['cluster']['cluster_user_local_home']})
70+
diff_output=$(diff -r #{node['cluster']['cluster_user_home']} #{node['cluster']['cluster_user_local_home']})
7171
if [ $? -eq 0 ]; then
7272
rm -rf /tmp#{node['cluster']['cluster_user_home']}
7373
rm -rf #{node['cluster']['cluster_user_home']}
7474
else
75-
echo "Data integrity check failed comparing #{node['cluster']['cluster_user_home']} and /tmp#{node['cluster']['cluster_user_home']}: $diff_output" >&2
75+
echo "Data integrity check failed comparing #{node['cluster']['cluster_user_local_home']} and #{node['cluster']['cluster_user_home']}: $diff_output" >&2
7676
systemctl start sshd
7777
exit 1
7878
fi

cookbooks/aws-parallelcluster-environment/spec/unit/recipes/config_default_user_home_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
rsync -a /tmp#{user_home}/ #{user_local_home}
3535
usermod -d #{user_local_home} #{cluster_user}
3636
chown -R #{cluster_user}: #{user_local_home}
37-
diff_output=$(diff -r /tmp#{user_home} #{user_local_home})
37+
diff_output=$(diff -r #{user_home} #{user_local_home})
3838
if [ $? -eq 0 ]; then
3939
rm -rf /tmp#{user_home}
4040
rm -rf #{user_home}
4141
else
42-
echo "Data integrity check failed comparing #{user_home} and /tmp#{user_home}: $diff_output"
42+
echo "Data integrity check failed comparing #{user_local_home} and #{user_home}: $diff_output" >&2
4343
systemctl start sshd
4444
exit 1
4545
fi

0 commit comments

Comments
 (0)