Skip to content

Commit

Permalink
Merge pull request os-autoinst#5644 from perlpunk/configure-vnc-offset
Browse files Browse the repository at this point in the history
Make VNC port offset configurable
  • Loading branch information
mergify[bot] authored May 17, 2024
2 parents ebb5c77 + c49d609 commit 279edb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/OpenQA/Worker/Settings.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ has 'global_settings';
has 'webui_hosts';
has 'webui_host_specific_settings';

use constant VNCPORT_OFFSET => $ENV{VNCPORT_OFFSET} // 90;

sub new ($class, $instance_number = undef, $cli_options = {}) {
my $settings_file = ($ENV{OPENQA_CONFIG} || '/etc/openqa') . '/workers.ini';
my $cfg;
Expand Down Expand Up @@ -73,7 +75,7 @@ sub new ($class, $instance_number = undef, $cli_options = {}) {
# TODO: This should be sent to the scheduler to be included in the worker's table.
if (defined $instance_number) {
$ENV{QEMUPORT} = $instance_number * 10 + 20002;
$ENV{VNC} = $instance_number + 90;
$ENV{VNC} = $instance_number + VNCPORT_OFFSET;
}

# assign default retry-delay for web UI connection
Expand Down

0 comments on commit 279edb5

Please sign in to comment.