[
https://issues.apache.org/jira/browse/VCL-641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nathaniel Sherry updated VCL-641:
---------------------------------
Description:
Using the libvirt module, vcld executes `virsh list --all` on a vmhost, which
results in the following output
Id Name State
----------------------------------------------------
19 VM1 running
(Note: This bug reporting system seems to be trimming extra spaces from the
above output.)
The name of the VM ("VM1") is then extracted as " VM1", and the command
`virsh dumpxml " VM1"` fails.
>From looking at libvirt.pm's get_domain_info function, it looks like the
>expectation is that there will only be one space between the id and name
>columns:
my ($id, $name, $state) = $line =~ /^\s*([\d\-]+)\s(.+?)\s+(\w+|shut off)$/g;
I have worked around this issue by adding a '+' after the \s between id and name
my ($id, $name, $state) = $line =~ /^\s*([\d\-]+)\s+(.+?)\s+(\w+|shut off)$/g;
was:
Using the libvirt module, vcld executes `virsh list --all` on a vmhost, which
results in the following output
Id Name State
----------------------------------------------------
19 VM1 running
(Note: This bug reporting system seems to be trimming extra spaces from the
above output.)
The name of the VM ("VM1") is then extracted as " VM1", and the command
`virsh dumpxml " VM1"` fails.
>From looking at libvirt.pm's get_domain_info function, it looks like the
>expectation is that there will only be one space between the id and name
>columns:
my ($id, $name, $state) = $line =~ /^\s*([\d\-]+)\s(.+?)\s+(\w+|shut off)$/g;
> VCL fails to properly trim whitespace from `virsh list --all`
> -------------------------------------------------------------
>
> Key: VCL-641
> URL: https://issues.apache.org/jira/browse/VCL-641
> Project: VCL
> Issue Type: Bug
> Components: vcld (backend)
> Affects Versions: 2.3
> Environment: CentOS 6.3
> Reporter: Nathaniel Sherry
> Labels: libvirt,, vcld, virsh
>
> Using the libvirt module, vcld executes `virsh list --all` on a vmhost, which
> results in the following output
> Id Name State
> ----------------------------------------------------
> 19 VM1 running
> (Note: This bug reporting system seems to be trimming extra spaces from the
> above output.)
> The name of the VM ("VM1") is then extracted as " VM1", and the command
> `virsh dumpxml " VM1"` fails.
> From looking at libvirt.pm's get_domain_info function, it looks like the
> expectation is that there will only be one space between the id and name
> columns:
> my ($id, $name, $state) = $line =~ /^\s*([\d\-]+)\s(.+?)\s+(\w+|shut off)$/g;
> I have worked around this issue by adding a '+' after the \s between id and
> name
> my ($id, $name, $state) = $line =~ /^\s*([\d\-]+)\s+(.+?)\s+(\w+|shut off)$/g;
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira