Closed julia326 closed 7 years ago
It must a be a command within the script (scripts are called with the interpreter sh <path>
so they don't need the x
bit).
Do you have access to /tmp/secotrec1fa19berror.txt
?
I do, and the contents are:
Error:
CMD: "bash /tmp/run-genspio4e9e0a-cmd.sh" returned 126
Contents of /tmp/run-genspio4e9e0a-cmd.sh
are:
export genspio_trap_42_63599=$$
trap 'exit 77' USR1
if { { { true && { ( eval "$(printf -- "exec %s>%s" 1 '/tmp/cmd-Copying__tmp_secotrec748042script_sh-stdout-0')" || { echo 'Exec "exec %s>%s" 1 '/tmp/cmd-Copying__tmp_secotrec748042script_sh-stdout-0' failed' >&2 ; }
eval "$(printf -- "exec %s>%s" 2 '/tmp/cmd-Copying__tmp_secotrec748042script_sh-stderr-0')" || { echo 'Exec "exec %s>%s" 2 '/tmp/cmd-Copying__tmp_secotrec748042script_sh-stderr-0' failed' >&2 ; }
{ { 'gcloud' 'compute' 'copy-files' '--zone' 'us-east1-c' '/tmp/secotrec748042script.sh' 'juliasec-secobox:/tmp/secotrec748042script.sh' ; } ; }
) ; [ $? -eq 0 ] ; } ; } ; [ $? -eq 0 ] ; } ; }
then :
else { 'printf' 'SECOTREC: Copying /tmp/secotrec748042script.sh; FAILED:\n\n' ; }
{ 'printf' '``````````stdout\n' ; }
{ 'cat' '/tmp/cmd-Copying__tmp_secotrec748042script_sh-stdout-0' ; }
{ 'printf' '\n``````````\n' ; }
{ 'printf' '``````````stderr\n' ; }
{ 'cat' '/tmp/cmd-Copying__tmp_secotrec748042script_sh-stderr-0' ; }
{ 'printf' '\n``````````\n' ; }
{ printf -- '%s\n' "EDSL.fail called" >&2 ; kill -s USR1 ${genspio_trap_42_63599} ; }
fi
{ 'gcloud' 'compute' 'ssh' 'juliasec-secobox' '--zone' 'us-east1-c' '--command' 'sh /tmp/secotrec748042script.sh' ; }
/tmp/run-genspio4e9e0a-cmd.sh (END)
A few notes:
With this it kinda worked: https://github.com/hammerlab/secotrec/blob/access-rights-40/src/lib/gcloud_instance.ml#L124-L125
displays an error message but files' access rights are still changed and then we can execute:
chmod: cannot access 'sudo': No such file or directory
About the versions, can't find anything in the SDK's meta-changelog
This is the branch that "fixed" the problem https://github.com/hammerlab/secotrec/commits/access-rights-40
Did this ever happen again?
I haven't seen this happen since, set up a new secobox recently and it went fine.
@julia326 what's gcloud
's version on the one that works now?
julia@fuzzypgv-secobox:~$ gcloud --version
Google Cloud SDK 154.0.0
bq 2.0.24
core 2017.05.01
gcloud
gsutil 4.25
OK, so the lesson is “If you see some suspicious SSH activity regarding access rights, upgrade gcloud
or post you problem here.“
Running
secotrec-gke up
results in: