Skip to content

Add lock for writing and reading self.runbook.admin_private_key_file#4285

Merged
LiliDeng merged 1 commit intomainfrom
baihua/key_path
Feb 23, 2026
Merged

Add lock for writing and reading self.runbook.admin_private_key_file#4285
LiliDeng merged 1 commit intomainfrom
baihua/key_path

Conversation

@lubaihua33
Copy link
Collaborator

When cocurrency is not 1, and admin_private_key_file in the runbook is empty, there might be VM connection issue.

When multiple LISA threads run concurrently, they contend for access to self.runbook.admin_private_key_file. This leads to a race condition during read/write operations. Specifically, if one thread reads admin_private_key_file as empty and begins generating a new key, another thread may do the same before the first thread finishes writing the file path. As a result, multiple keys are generated simultaneously. The VM creation process may use one key, while the connection attempt uses another, causing the VM to become unreachable.

This PR adds a lock for self.runbook.admin_private_key_file

@lubaihua33 lubaihua33 requested a review from LiliDeng as a code owner February 14, 2026 14:43
@LiliDeng LiliDeng merged commit fd90777 into main Feb 23, 2026
58 checks passed
@LiliDeng LiliDeng deleted the baihua/key_path branch February 23, 2026 14:54
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.

2 participants