[libvirt] storage: pool definition discarded by pool-create failure

2011-11-21 Thread lvroyce

1.how to reproduce:
(1)just use LVM disk,leave libvirt create vg
(2)xml:
pool type='logical'
namepic_pool2/name
source
device path='/dev/sdb1'/
device path='/dev/sdb2'/
/source
target
path/dev/pic_pool2/path
/target
/pool

(3)steps:
a.start libvirtd,copy xml
b.virsh pool-define lvm_pool.xml
c.virsh pool-list --all
lvm_pool exsists
c.virsh pool-create lvm_pool.xml
lvm_pool disappears

2.analyze:
here pool-create fails because of vg has not been built before 
vgchange,and pool-create will delete pool-def after failure.
pool-create can fail because a lot of reasons, but it doesn't mean 
previous pool definition should be obselete,previous definition should 
remain unchanged if following pool management fails.


3.fix:
shall we make backend-startPool gurantee pool unchanged in condition of 
start fails or offer an undo function after failure?


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] storage:lvm pool creation fails because of vg not built

2011-11-21 Thread lvroyce

1.how to reproduce
the reproduce steps just as 
http://www.redhat.com/archives/libvir-list/2011-November/msg01151.html


2.analyse:
since create = define + start
so pool-create can't work for the vg pre-built condition,
shall we change create = define + build + start(if vg does not exist)
and create=define+start(if vg exists)?

Thank you for your suggestion!

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] fix crash when starting network

2011-11-10 Thread lvroyce

tested-by: Wen Ruo Lvlvro...@linux.vnet.ibm.com

tested
1.net-start cmd with bridge mac specified (failed)
2.attach-device cmd with a hot plug nic(ok)

My network is as below:
network
namedefault/name
uuid361441af-e1f0-472d-a503-dfcbbefa03fb/uuid
forward mode='nat'/
bridge name='virbr0' stp='on' delay='0' /
mac address='00:16:3E:5D:C7:9E'/
ip address='192.168.122.1' netmask='255.255.255.0'
dhcp
range start='192.168.122.2' end='192.168.122.254' /
/dhcp
/ip
/network

It fails at brSetInterfaceMac--return ioctl(ctl-fd, SIOCSIFHWADDR, ifr)
but SIOCGIFHWADDR succeed.
error msg is:
cannot create dummy tap device 'virbr0-nic' to set mac address on bridge 
'virbr0':no such device


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] can't start domain with a corrupted disk attatched

2011-11-03 Thread lvroyce

Hi all,

   I came across below issue when testing:

   1.make a volume and attach it to  a domain A
   2.unplug the vg from the host in order to emulating a volume failure
   3.start domain A(failed)

In step 3 can't start domainA . because can't find disk listed in 
xml when create the Domain.


I'm not sure if it is reasonable. In common sense, we can still 
start our system even if we have a corrupt data disk .And also ,if in 
data center we carelessly attatch a corrupt volumn to all the guest, it 
will result in all guests fail to boot .


I suggest to  automatically detach a disk if it can't be found and 
just give out a warning.Please let me know your opinion about if it is a 
bug or a feature.Thanks.



--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [libvirt[]PATCH v2] Fix URI alias prefix matching

2011-11-01 Thread lvroyce

On 2011?11?01? 15:12, Philipp Hahn wrote:

Now you have it the other way around, that any prefix matches:
  virsh -c hai will match hail.
Why not simply use STREQ instead of STREQLEN?

Sincerely
Philipp
ooops..You're right.But here I think we can't use STREQ because in 
config file the compared string is hail=qemu:///systemnot just hail 
with  NULL followed


is this one right?

size_t alias_len;
alias_len = strlen(alias);

if (STREQLEN(entry-str, alias, alias_len)  alias_len == 
(offset-entry-str))


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/7] Update systemtap probing

2011-10-28 Thread lvroyce

Tested by:Royce Lvlvro...@linux.vnet.ibm.com

I'm not sure whether I encountered are  env/config related problem or 
bugs,so I submit my installation process here for you to reference.


1.env description:
host os:Ubuntu 11.04(kernel 2.6.38-8-generic,x86_64)
libvirt:0.9.6
qemu:0.15.50
dtrace:sun D 1.6
systemtap:version 1.3/0.148 non-git sources

2.install systemtaped libvirt
(1)configure
./configure --prefix=/usr --with-dtrace
(2)make

---error1:
dtrace: failed to compile script probes.d: line 2: invalid control 
directive: #file:

solution:
delete lines begin with #

--error2:
Invoking: ld -o probes.o -r probes.tmp.o /usr/lib/dtrace/drti.o
ld: i386 architecture of input file `probes.tmp.o' is incompatible 
with i386:x86-64 output
dtrace: failed to link script probes.d: failed to link probes.o: ld 
exited with status 1

so the script incompatible for 64 system,is it a bug?
solution:
change DTRACE=/usr/bin/dtrace to DTRACE=/usr/bin/dtrace -64

--error3:(with ./configure --prefix=/usr --enable-dtrace)
*** objects  probes.o is not portable!
/usr/bin/ld: probes.o: relocation R_X86_64_32 against `.rodata' can 
not be used when making a shared object; recompile with -fPIC

probes.o: could not read symbols: Bad value
tried:
(1)reconfig with
./configure --with-dtrace --disable-share
result:
compile success,but libvirt_probes.stp size is 0,stp script 
can't be used

(2)add flags with -fPIC
result:
nothing changed,still the same error
(3)tried configure --with-pic
result:
nothing changed,still the same error

3.Here is my question:
(1)Is the system-enabled libvirt support 64bit system?
(2)Do you have suggestion about error3?

Sorry to bother you so many times,But I do think applying these patches 
are  important and useful for future debugging.Thank you for your time!


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 0/7] Update systemtap probing

2011-10-28 Thread lvroyce
You're right, that is the root cause of the numeric errors, supporting 
systemtap should install not only package systemtap,but also 
systemtap* to get dtrace installed.
And also,many Ubuntu versions  have a bug called:systemtap process 
probes requires CONFIG_UTRACE enabled,which means I can't use it 
without recompile the kernel :'(


Thank you so much!

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCHv2] snapshot: detect when qemu lacks disk-snapshot support

2011-10-20 Thread lvroyce

Tested by: Royce Lv

Patch works as expected:
tested with cmd snapshot-create domain_name --disk-only
(1)when without hmp cmd support ,snapshot failed,0 size source file deleted
(2)when source file creating failed,no snapshot taken and no crash  with 
need_unlink flag set


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] qemu: Relax -no-shutdown check to [0.14.0, 0.15.0]

2011-10-20 Thread lvroyce

tested-by :Royce Lvlvro...@linux.vnet.ibm.com
patch workes expected,qemu version 0.15.50.reboot domain with ACPI support.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] snapshot: use correct qmp monitor command

2011-10-19 Thread lvroyce

Tested by:lvroyce
test with cmd snapshot-create domain --disk-only ,patch works when qmp 
or hmp monitor accessible,


Got trace below when issue cmd snapshot-delete domain --snapshotname 
name,no delvm/savevm in qmp, only delvm/savevm commands in hmp.Is 
this for future compability?


2011-09-19 16:15:54.938: 25648: debug : qemuMonitorJSONIOProcessLine:115 
: Line [{id: libvirt-11, error: {class: CommandNotFound, 
desc: The command delvm has not been found, data: {name: delvm}}}]
2011-09-19 16:15:54.939: 25666: debug : virJSONValueToString:1071 : 
result={execute:human-monitor-command,arguments:{command-line:delvm 
\1319011620\},id:libvirt-12}
2011-09-19 16:15:54.939: 25666: debug : qemuMonitorJSONCommandWithFd:224 
: Send command 
'{execute:human-monitor-command,arguments:{command-line:delvm 
\1319011620\},id:libvirt-12}' for write with FD -1




--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Make saving domain XML more robust

2011-10-12 Thread lvroyce

tested-by: Royce Lv lvro...@linux.vnet.ibm.com

Patch works as expected.Use setmaxmem cmd,tested cases of set mem 
success ,writing tmp config file failure and rename failure.old xml file 
reserves in case of failure so still can be used,and tmp config file 
cleared leaving no trash to xml folder.


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list