[pve-devel] [PATCH] fix hotplug ip configuration
Alexandre DERUMIER
aderumier at odiso.com
Mon Jun 29 14:10:45 CEST 2015
>>I wonder if we can avoid running lxc-info, by using something similar
>>we have in:
>>
>>sub find_lxc_console_pids { ... }
>>
>>We can get the pids of all running containers, including pids for console,
>>and we can also replace list_active_containers() ?
yes, I think it better too if we can need to run lxc-info.
I'll check that.
----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Lundi 29 Juin 2015 12:52:44
Objet: Re: [pve-devel] [PATCH] fix hotplug ip configuration
> +sub find_lxc_pid {
> + my ($vmid) = @_;
> +
> + my $pid = undef;
> + my $parser = sub {
> + my $line = shift;
> + $pid = $1 if $line =~ m/PID:\s+(\d+)/;
> + };
> + PVE::Tools::run_command(['lxc-info', '-n', $vmid], outfunc => $parser);
> +
> + return $pid;
> +}
> +
I wonder if we can avoid running lxc-info, by using something similar
we have in:
sub find_lxc_console_pids { ... }
We can get the pids of all running containers, including pids for console,
and we can also replace list_active_containers() ?
More information about the pve-devel
mailing list