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

Agent update prior 0.6.2 #13

Open
mjudeikis opened this issue Jul 11, 2021 · 2 comments
Open

Agent update prior 0.6.2 #13

mjudeikis opened this issue Jul 11, 2021 · 2 comments

Comments

@mjudeikis
Copy link
Contributor

We use this flow to update the agent:

func() error {
     return syscall.Unlink(u.binaryPath)
},
func() error {
     return os.Rename(b.Name(), u.binaryPath)
},

Os.temp creates tmpfs :

 df -T /tmp/go-build* | awk '{print $2}' | tail -n1
tmpfs

and agent is for sure not on tmpfs:

df -T /usr/local/bin/synpse | awk '{print $2}' | tail -n1                                                                                                                                                                                                                                         
btrfs 

This gives error:

invalid cross-device link

Solution: Move to byte level operation for agent move.

@rusenask
Copy link
Contributor

ah yes, just need to read and write as bytes

@mjudeikis
Copy link
Contributor Author

😢 Fix soon will be there.

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

2 participants