Skip to content

Commit

Permalink
[lxd] Add 60 seconds timeout for state operations
Browse files Browse the repository at this point in the history
If no timeout is set, LXD uses a hardcoded 30 second timeout when waiting on
operations to complete and if the wait timeout occurs, it can lead to incorrect
behavior in the LXD backend.

Fixes #1777
  • Loading branch information
Chris Townsend committed Oct 30, 2020
1 parent ccfdaaf commit a76ca22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/backends/lxd/lxd_virtual_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ const QUrl mp::LXDVirtualMachine::network_leases_url()

void mp::LXDVirtualMachine::request_state(const QString& new_state)
{
const QJsonObject state_json{{"action", new_state}};
const QJsonObject state_json{{"action", new_state}, {"timeout", 60}};

auto state_task = lxd_request(manager, "PUT", state_url(), state_json, 5000);

Expand Down

0 comments on commit a76ca22

Please sign in to comment.