Skip to content

fix: check connection status in request#2303

Merged
frankiejol merged 2 commits intomainfrom
fix/2293_status2
Mar 13, 2026
Merged

fix: check connection status in request#2303
frankiejol merged 2 commits intomainfrom
fix/2293_status2

Conversation

@frankiejol
Copy link
Member

Creates a refresh machine request to check in background the status of the client connection

closes #2293

@frankiejol frankiejol added this to the v2.4.6 milestone Mar 13, 2026
Copilot AI review requested due to automatic review settings March 13, 2026 10:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to avoid rvd_back --hibernate/--shutdown --disconnected crashing while checking client connection status by moving the connection refresh into a backend refresh_machine request and then reading the refreshed status from a readonly Ravada::Front::Domain object.

Changes:

  • Reworks _verify_connection to enqueue Ravada::Request->refresh_machine(...) and then check client_status() via Ravada::Front::Domain.
  • Updates disconnected-domain selection to use list_domains_data + Ravada::Front::Domain->open(...) and removes the old helper.
  • Adds can_hybernate to Ravada::Front::Domain::KVM to align front-domain capability reporting with backend KVM.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
script/rvd_back Moves connection verification to a refresh_machine request, switches disconnected filtering to readonly front domains, and tweaks request-wait output.
lib/Ravada/Front/Domain/KVM.pm Exposes can_hybernate for front KVM domains.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

uid => Ravada::Utils::user_daemon->id
,id_domain => $domain->id
);
_wait_request($req);
if ($req->error) {
warn $req->error."\n";
}
print "\n\t".$req->output if $req->output;
Comment on lines 1127 to 1135
|| ( $disconnected && $domain->is_active
&& !$domain->autostart
&& _client_status($domain) eq 'disconnected')
&& $domain->client_status() eq 'disconnected')
) {

delete $name{$domain->name};
if ( $disconnected && $domain->client_status() eq 'disconnected') {
if ( $disconnected ) {
next if $domain->client_status() ne 'disconnected';
next if _verify_connection($domain);
Comment on lines +822 to +825
_wait_request($req);

$domain = Ravada::Front::Domain->open($domain->id);
my $status = $domain->client_status();
@frankiejol frankiejol merged commit e85121a into main Mar 13, 2026
1 check passed
@frankiejol frankiejol deleted the fix/2293_status2 branch March 13, 2026 10:47
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.

Verify client status core dumped

2 participants