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

avoid text file busy error on track #2494

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

felipemadero
Copy link
Collaborator

Why this should be merged

Closes #2465

How this works

How this was tested

How is this documented

}
if err := os.Chmod(pluginPath, constants.DefaultPerms755); err != nil {
return err
if !utils.IsExecutable(pluginPath) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be checking if the file exists before creating a new copy, and then checking if it's not already executable before doing the chmod?

Copy link
Collaborator Author

@felipemadero felipemadero Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the file exists and is not executable it is sign of a problem in the previous setup. It can be a partial copy for
example. So probably it is best to copy it again.
Also, if it is not executable, there is not risk of encountering text file busy error during copy
because that happens when the binary is being executed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, could you add a comment explaining that context here? 🙏

}
if err := os.Chmod(pluginPath, constants.DefaultPerms755); err != nil {
return err
if !utils.IsExecutable(pluginPath) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make a unit for these code paths?

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

Successfully merging this pull request may close these issues.

[Bug]: text file busy error during local cluster track subnet
2 participants