Skip to content

Conversation

@rushikeshjadhav
Copy link
Contributor

@rushikeshjadhav rushikeshjadhav commented Jun 30, 2025

Using the same path for both source and destination may cause scp to fail, especially when the source path (e.g. a temp path on macOS) does not exist on the remote system. Thus, resorting to use mktemp on destination.

@rushikeshjadhav rushikeshjadhav force-pushed the issue-325-host-execute-script branch from 87dab23 to 9414d56 Compare July 2, 2025 19:30
@rushikeshjadhav rushikeshjadhav force-pushed the issue-325-host-execute-script branch from 9414d56 to 1963450 Compare September 19, 2025 09:21
lib/host.py Outdated
Comment on lines 235 to 236
self.scp(script.name, remote_path)
self.ssh(['chmod', '0755', remote_path])
Copy link
Member

Choose a reason for hiding this comment

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

Should probably be moved in try scope in case for some reason a call fails even if unlikely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, have moved them.

…te_script scp

Using the same path for both source and destination may cause scp to fail,
especially when the source path (e.g. a temp path on macOS) does not exist
on the remote system. Thus, resorting to use mktemp on destination.

Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
@rushikeshjadhav
Copy link
Contributor Author

@Wescoeur @ydirson please see if this needs changes or whether it can be merged.

@rushikeshjadhav
Copy link
Contributor Author

@stormi please see if we need more approvals before merging this.

@stormi stormi merged commit b7ccb98 into xcp-ng:master Nov 24, 2025
1 check passed
@rushikeshjadhav rushikeshjadhav deleted the issue-325-host-execute-script branch November 27, 2025 07:20
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.

6 participants