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

Make gcloud_trace.sh script work on Google COS #16

Open
meysholdt opened this issue Mar 21, 2020 · 0 comments
Open

Make gcloud_trace.sh script work on Google COS #16

meysholdt opened this issue Mar 21, 2020 · 0 comments

Comments

@meysholdt
Copy link

I tried to run the gcloud_trace.sh against a COS instance.

It failed as follows:

$ ./gcloud_trace.sh -instance myinstance -ta "-cs 1"
Uploading trace script to myinstance
trace.sh                                                                                                                                                                   100% 4536     6.3MB/s   00:00    
Collecting trace on myinstance
sudo: unable to execute /tmp/trace.sh: Permission denied
Downloading recorded trace from myinstance
scp: /tmp/trace/trace.tar.gz: No such file or directory
ERROR: (gcloud.compute.scp) [/usr/bin/scp] exited with return code [1].

because /tmp is mounted as noexec by design:

$ mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec)

Possible fixes:
a) allow to configure the remote directory for trace.sh via argument of gcloud_trace.sh
b) detect COS nodes and automatically choose a dir without noexec
c) detect COS nodes and run the trace.sh inside a toolbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant