Skip to content

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

Open
lubaihua33 wants to merge 1 commit intomainfrom
baihua/key_path
Open

Add lock for writing and reading self.runbook.admin_private_key_file#4285
lubaihua33 wants to merge 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
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.

1 participant

Comments