Skip to content

Removes cgo#64

Merged
jscalev merged 1 commit into
mainfrom
dev/jcalev/RemoveCGO
Aug 26, 2025
Merged

Removes cgo#64
jscalev merged 1 commit into
mainfrom
dev/jcalev/RemoveCGO

Conversation

@jscalev

@jscalev jscalev commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Removes static compile since that didn't fix the glibc dependency issue.

Removing cgo.

@viveklingaiah

Copy link
Copy Markdown
Contributor

Alternatively, I'm thinking if we could move away from using lsof here check_binary_write_lock()

check_binary_write_lock() {

  • May be use a different and more available command like pgrep/ps to know if the binary is being used by a different process

lsof -c <command_name>: Lists files opened by processes running a specific command.

there is also another incident where on SUSE, the lsof command execution just doesn't finish as the customer has large number of files open
Incident 611001400 : run command not working

@viveklingaiah

viveklingaiah commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

Actually, Bhaskar Brahma @D1v38om83r was the one to add the function check_binary_write_lock() for CSE that was ported to RC. Bhaskar, could you let us know the purpose behind check_binary_write_lock() ? Why it was added ?

check_binary_write_lock() was added here - Azure/custom-script-extension-linux#153
PR description: Fix for text file busy custom-script-extension binary.
Use the shim file to detect open file handles to custom-script-extension binary, and kill the processes that own them before attempting to execute the binary.

could we just use possibly a more available command like ps to see if the binary (RC here or CSE) for same check ?

@D1v38om83r

D1v38om83r commented Aug 25, 2025

Copy link
Copy Markdown
Collaborator

This was added as a response to the shim failing to launch the go binary, there used to be class of CSE enable errors that was a result of this.

@jscalev jscalev merged commit 9ccdd07 into main Aug 26, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

4 participants