spark-ec2
spark-ec2 copied to clipboard
EC2 setup does not work for any user but root
Hi,
I was trying to use the spark-ec2 script from Spark to create a new Spark cluster wit an user different than root (--user=ec2-user). Unfortunately the part of the script that attempts to copy the templates into the target machines fail because it tries to rsync /etc/* and /root/*
This is the full traceback
rsync: recv_generator: mkdir "/root/spark-ec2" failed: Permission denied (13) *** Skipping any contents from this failed directory ***
sent 95 bytes received 17 bytes 224.00 bytes/sec
total size is 1444 speedup is 12.89
rsync error: some files/attrs were not transferred (see previous errors) (code 2 3) at main.c(1039) [sender=3.0.6]
Traceback (most recent call last):
File "/home/ec2-user/spark-1.4.0/ec2/spark_ec2.py", line 1455, in
Is there a workaround for this? I want to improve security of our operations by avoiding user root on the instances.
Unfortunately the spark-ec2 scripts are only designed to work as the root user right now. There isn't any simple workaround and I think supporting non-root users will require extensive code changes.
Should probably remove that --user parameter then.
@adamjk - Good call. Is that option useful for anything? I've never used it. Perhaps we should remove it?
+1 on removing the option.
I agree. Please remove the option as is confusing.