[pve-devel] problem with my nexenta plugin when start vm with pve-manager, need perl help

Alexandre DERUMIER aderumier at odiso.com
Tue Aug 21 14:29:26 CEST 2012

this is strange, using iscsidirect plugin, give me same syntax

-drive file=iscsi://,if=none,id=drive-virtio1,aio=native

but launch fine ....

Dumper of $cmd with iscsidirect

 $VAR1 = [           '/usr/bin/kvm',           '-id',           '115',           '-chardev',           'socket,id=qmp,path=/var/run/qemu-server/115.qmp,server,nowait',           '-mon',           'chardev=qmp,mode=control',           '-vnc',           'unix:/var/run/qemu-server/115.vnc,x509,password',           '-pidfile',           '/var/run/qemu-server/115.pid',           '-daemonize',           '-name',           'testalex',           '-smp',           'sockets=1,cores=2',           '-nodefaults',           '-boot',           'menu=on',           '-vga',           'cirrus',           '-k',           'fr',           '-m',           100,           '-usbdevice',           'tablet',           '-drive',           'file=iscsi://,if=none,id=drive-virtio1,aio=native',           '-device',           'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb',           '-drive',           'if=none,id=drive-ide2,media=cdrom,aio=native',           '-device',           'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200',           '-drive',           'file=/var/lib/vz/images/115/vm-115-disk-1.raw,if=none,id=drive-virtio0,bps_rd=10485760,aio=native,cache=none',           '-device',           'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=101'         ];

Dumper of $cmd with nexentaplugin

 $VAR1 = [           '/usr/bin/kvm',           '-id',           '115',           '-chardev',           'socket,id=qmp,path=/var/run/qemu-server/115.qmp,server,nowait',           '-mon',           'chardev=qmp,mode=control',           '-vnc',           'unix:/var/run/qemu-server/115.vnc,x509,password',           '-pidfile',           '/var/run/qemu-server/115.pid',           '-daemonize',           '-name',           'testalex',           '-smp',           'sockets=1,cores=2',           '-nodefaults',           '-boot',           'menu=on',           '-vga',           'cirrus',           '-k',           'fr',           '-m',           100,           '-usbdevice',           'tablet',           '-drive',           'file=iscsi:,if=none,id=drive-virtio1,aio=native',           '-device',           'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb',           '-drive',           'if=none,id=drive-ide2,media=cdrom,aio=native',           '-device',           'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200',           '-drive',           'file=/var/lib/vz/images/115/vm-115-disk-1.raw,if=none,id=drive-virtio0,bps_rd=10485760,aio=native,cache=none',           '-device',           'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=101'         ];

The only difference is the call to nexenta api to find the lun number, in sub path{}
my $map = nexenta_list_lun_mapping_entries($name,$scfg);
die "could not find lun number" if !$map;
my $lun = @$map[0]->{lun};

I had try to hardcode the lun number, removing the call, and now it's launching fine.
so this is something related to HTTP::Request->new or LWP::UserAgent ....

I'm lost ... 

----- Mail original ----- 

De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mardi 21 Août 2012 14:10:52 
Objet: Re: problem with my nexenta plugin when start vm with pve-manager, need perl help 

Am 21.08.2012 14:03, schrieb Alexandre DERUMIER: 
> Hi, 
> I have a problem with my nexenta plugin when starting vm with pve-manager. 
> I didn't see the problem before, I think I also use command line during my tests. 
> (Stefan do you have the problem ?) 
> command line works fine : qm start ... 
> but task in pve-manager exit(1) in run_command here : 
> # catch exec errors 
> if ($orig_pid != $$) { 
> warn "ERROR: $err"; 
> POSIX::_exit (1); 
> kill ('KILL', $$); 
> } 
> I have displayed the error: 
> "Insecure dependency in exec while running with -T switch at /usr/share/perl/5.10/IPC/Open3.pm line 168." 
> Command line generated is same , command line or pve-manager... 
> the nexenta drive add this specific line, but if don't see anything special. 
> -drive file=iscsi://,if=none,id=drive-virtio1,aio=native 

My test equipment won't be available before thursday ;-( So i can't test 
right now. 

Perl does security checks when it runs as root and tries to distinguish 
if there parameters passed directly to Open3 without any syntax checking. 





Alexandre D e rumier 

Ingénieur Systèmes et Réseaux 

Fixe : 03 20 68 88 85 

Fax : 03 20 68 90 88 

45 Bvd du Général Leclerc 59100 Roubaix 
12 rue Marivaux 75002 Paris 

More information about the pve-devel mailing list