Bug 704062

Summary: src host can not create properly compress file with special symbols via monitor when do migration
Product: Red Hat Enterprise Linux 5 Reporter: FuXiangChun <xfu>
Component: kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 5.7CC: gcosta, juzhang, michen, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-17 16:52:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description FuXiangChun 2011-05-12 02:30:29 UTC
Description of problem:
src host save VM state to compress file of including special symbols ! and <>, dest host can not load it.

Version-Release number of selected component (if applicable):
Host info:
# uname -r
2.6.18-260.el5
# rpm -q kvm
kvm-83-232.el5

How reproducible:


Steps to Reproduce:
1./usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -name 57 -smp 2 -m 3G -uuid 9e6f04cf-2ad7-45aa-9333-2d2ee26570c6 -boot c -drive file=/root/mnt/winxp32.raw,if=ide,media=disk,cache=none,boot=on,format=raw,werror=stop -soundhw ac97 -net nic,vlan=1,macaddr=52:54:00:94:a3:8b,model=rtl8139 -net tap,vlan=1,script=/etc/qemu-ifup -notify all -balloon none -monitor stdio  -vnc :1
2. type migrate "exec:gzip -c >/root/mnt/statfile!.gz" or migrate "exec:gzip -c >/root/mnt/statfile<>.gz" via host monitor
3./usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -name 57 -smp 2 -m 3G -uuid 9e6f04cf-2ad7-45aa-9333-2d2ee26570c6 -boot c -drive file=/root/mnt/winxp32.raw,if=ide,media=disk,cache=none,boot=on,format=raw,werror=stop -soundhw ac97 -net nic,vlan=1,macaddr=52:54:00:94:a3:8b,model=rtl8139 -net tap,vlan=1,script=/etc/qemu-ifup -notify all -balloon none -monitor stdio  -vnc :1 -incoming "exec:gzip -c -d /root/mnt/statfile!.gz(or statfile<>.gz)" 
  
Actual results:
-bash: !.gz": event not found or load of migration failed

Expected results:
dest host load successful or src remind error message

Additional info:
statfile<>.gz file can not be created,and statfile!.gz file size is incorrect.

Comment 1 FuXiangChun 2011-05-12 03:06:31 UTC
actual results
1.compress file with <> can not be created. 
2.compress file with ! size is wrong.
  du -sch statfile\!.gz 
   1.7M statfile!.gz
   1.7M total
 
have two expected results
1. src host can create compress file with special symbol and dest host can resume from it
2. src host can not create compress file with special symbol but monitor should remind user via error message

Comment 2 Glauber Costa 2011-05-16 18:52:22 UTC
This doesn't look like a bug for me.
the effect of exec migration, is that the shell will execute the commands as you typed.

bash puts special meaning into those characters, so does migration. Have you tried scaping those characters or single-quoting them ?