[vdsm] boot order in vm.conf

2013-06-13 Thread Sandro Bonazzola
Hi,
This is my vm.conf:

vmId=f785ebfd-a9dc-4453-be0e-ae7e57a804b0
memSize=4096
macAddr=00:16:3e:71:bb:e5
display=vnc
drive=pool:63570f35-35b9-4f82-aea5-7a34535a670d,domain:77a192ce-175e-4085-bd1f-342e4993b802,image:279076a8-a888-4ac2-8b40-b72fd488c173,volume:bf24cc76-ada5-428a-8ded-0662d08fe5d5
cdrom=/Fedora-18-x86_64-DVD.iso
boot=d
vmName=oVirt Hosted Engine
spiceSecureChannels=_main,_display,_inputs,_cursor,_playback,_record,_smartcard,_usbredir
bridge=ovirtmgmt
nicModel=virtio

I create the vm calling vdsClient create.
After Fedora installation I need to boot from HD instead of cdrom.
How may I specify the boot order for having it as hd,cdrom booting from
hd on reboot?

-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com

___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


[vdsm] Fwd: Re: [libvirt] AttributeError in virConnect.__del__ at program exit

2013-06-13 Thread Sandro Bonazzola
FYI


 Messaggio originale 
Oggetto:Re: [libvirt] AttributeError in virConnect.__del__ at program
exit
Data:   Thu, 13 Jun 2013 09:10:13 +0200
Mittente:   Sandro Bonazzola 
A:  Cole Robinson 
CC: libvir-l...@redhat.com



Il 13/06/2013 08:54, Sandro Bonazzola ha scritto:
> Il 12/06/2013 19:31, Cole Robinson ha scritto:
>> On 06/12/2013 04:10 AM, Sandro Bonazzola wrote:
>>> Il 11/06/2013 18:21, Cole Robinson ha scritto:
 On 06/11/2013 07:58 AM, Sandro Bonazzola wrote:
> Hi,
> using vdsm python code, I've the following error at program exit that
> seems to be related to libvirt python code, something wrong in a 
> destructor:
>
> Exception AttributeError: AttributeError("virConnect instance has  no
> attribute 'domainEventCallbacks'",) in  of > ignored
>
> I'm using libvirt 1.0.6
>
> Is it a known issue? Is there any workaround / fix ?
>
 I've seen this too, sometimes via the virtinst test suite. Once upon a 
 time I
 tracked it down to whether the virtinst code did 'import selinux' or not, 
 so
 maybe it's a just some weird race, or a side effect of something other
 libraries do in their cleanup path. By inspection alone the __del__ handler
 doesn't seem to be doing anything wrong.

 - Cole
>>> It seems related only to domainEventCallbacks so maybe it appears only
>>> after a domain creation / modification.
>>>
>> Oh, sorry, now that I look at the code it makes a bit more sense. The error I
>> was recalling was a __del__ Exception but wasn't involving domain events.
>>
>> But I still don't see why __del__ is complaining, since the whole thing is
>> wrapped in try: ... except AttributeError. So not sure what the issue is.
>>
>> - Cole
>
> According to the python documentation, you can't handle exception in
> __del__:
> http://docs.python.org/2/reference/datamodel.html#object.__del__
>
> Warning
>
> Due to the precarious circumstances under which __del__()
> 
> methods are invoked, exceptions that occur during their execution are
> ignored, and a warning is printed to sys.stderr instead.
>
> So you have to test the existence of the attribute before using it and
> not try to use it and try to handle an exception that can't be handled.

You can use hasattr for checking if the object has the needed attribute.


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


-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com




--
libvir-list mailing list
libvir-l...@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


Re: [vdsm] vdsm version 4.10.3-17

2013-06-13 Thread Dan Kenigsberg
On Wed, Jun 12, 2013 at 06:53:48PM -0400, Douglas Schilling Landgraf wrote:
> Hi,
> 
> VDSM version 4.10.3-17 is available. Please help providing votes
> from your tests on koji's website to make it stable as soon as
> possible for F18. (required 3).
> 
> Changes on vdsm-4.10.3-17:
> - Makefile.am: ignore false positive pyflakes lvm.py
> - Deactivate libvirtVM.Drives()
> - vdsm: fix Vm cleanup routine
> - Support teardownVolumePath(None)
> 
> F18:
> https://admin.fedoraproject.org/updates/vdsm-4.10.3-17.fc18
> 
> In case you are using F19:
> https://admin.fedoraproject.org/updates/python-pthreading-0.1.2-1.fc19
> 

Thanks.

Would you have a build for EL6, too? For some, it is even more important
than F18.

> Please let me know if you have any questions.
> 
> For more info about votes/karma to make it stable, please check:
> http://fedoraproject.org/wiki/Bodhi#Karma
> http://fedoraproject.org/wiki/Bodhi#Possible_workflows_with_the_karma_system
> 
> Thanks!
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


Re: [vdsm] vdsm version 4.10.3-17

2013-06-13 Thread Mike Burns

On 06/13/2013 06:30 AM, Dan Kenigsberg wrote:

On Wed, Jun 12, 2013 at 06:53:48PM -0400, Douglas Schilling Landgraf wrote:

Hi,

VDSM version 4.10.3-17 is available. Please help providing votes
from your tests on koji's website to make it stable as soon as
possible for F18. (required 3).

Changes on vdsm-4.10.3-17:
- Makefile.am: ignore false positive pyflakes lvm.py
- Deactivate libvirtVM.Drives()
- vdsm: fix Vm cleanup routine
- Support teardownVolumePath(None)

F18:
https://admin.fedoraproject.org/updates/vdsm-4.10.3-17.fc18

In case you are using F19:
https://admin.fedoraproject.org/updates/python-pthreading-0.1.2-1.fc19



Thanks.

Would you have a build for EL6, too? For some, it is even more important
than F18.


Please let me know if you have any questions.

For more info about votes/karma to make it stable, please check:
http://fedoraproject.org/wiki/Bodhi#Karma
http://fedoraproject.org/wiki/Bodhi#Possible_workflows_with_the_karma_system

Thanks!


All 3 are available on ovirt.org already in the updates-testing repo[1]

[1] http://resources.ovirt.org/releases/updates-testing/
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


Re: [vdsm] boot order in vm.conf

2013-06-13 Thread Sandro Bonazzola
Il 13/06/2013 09:06, Sandro Bonazzola ha scritto:
> Hi,
> This is my vm.conf:
>
> vmId=f785ebfd-a9dc-4453-be0e-ae7e57a804b0
> memSize=4096
> macAddr=00:16:3e:71:bb:e5
> display=vnc
> drive=pool:63570f35-35b9-4f82-aea5-7a34535a670d,domain:77a192ce-175e-4085-bd1f-342e4993b802,image:279076a8-a888-4ac2-8b40-b72fd488c173,volume:bf24cc76-ada5-428a-8ded-0662d08fe5d5
> cdrom=/Fedora-18-x86_64-DVD.iso
> boot=d
> vmName=oVirt Hosted Engine
> spiceSecureChannels=smain,sdisplay,sinputs,scursor,splayback,srecord,ssmartcard,susbredir
> bridge=ovirtmgmt
> nicModel=virtio
>
> I create the vm calling vdsClient create.
> After Fedora installation I need to boot from HD instead of cdrom.
> How may I specify the boot order for having it as hd,cdrom booting from
> hd on reboot?
>
drive=pool:63570f35-35b9-4f82-aea5-7a34535a670d,domain:77a192ce-175e-4085-bd1f-342e4993b802,image:279076a8-a888-4ac2-8b40-b72fd488c173,volume:bf24cc76-ada5-428a-8ded-0662d08fe5d5,bootOrder:1

seems to work for setting the HD as first device. However using this introduce 
a conflict on boot=d, boot option can't be used. cdrom also seems that can't be 
used if I specify the cdrom device. However, I'm not able to create a valid 
cdrom device:
I'm trying with:

devices={deviceType:disk,type:disk,device:cdrom,readonly:true,bootOrder:2,alias:cdrom0,iface=ide'}
and I've:
Bad volume specification {'index': '0', 'iface': "ide'", 'bootOrder': '2', 
'alias': 'cdrom0', 'readonly': 'true', 'deviceType': 'disk', 'device': 'cdrom', 
'type': 'disk'}




-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com

___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


[vdsm] [About the IDS and LEASE file in VDSM] Why don't merge those two files into one file with the different file offset?

2013-06-13 Thread Qixiaozhen
Hi, all

I hava a question about the IDS and lease file in the VDSM. In the demo code of 
sanlock, these two files are contained in the same file.

In the VDSM 4.09, the offset of IDS is 0. However, the value of offset in 
version 4.10 is 'SDM_LEASE_OFFSET = 512 * 2048'. The comment in the code 
explains that the differences for them are just for upgrade.

According to my understanding, the content of IDS file contains the current 
cluster lock of the domain, and those in Lease file are the heart-beat info.

Why don't merge those two files into one file with the different file offset? 
In 4.09/4.10, we maintance two files. I think that 'two files' is much more 
complex than 'one file'.

Could anyone explain this for me?

Thx




sample code in sanlock(version 2.7), the cluster lock and heart-beat info are 
contained in 'disk':


HOST_ID = 1
LOCKSPACE_NAME = "lockspace1"
RESOURCE_NAME = "resource1"

def main():
print "Creating the sanlock disk"
fd, disk = tempfile.mkstemp()# the lease file and 
ids file are contained in 'disk'
os.close(fd)

offset = sanlock.get_alignment(disk)

SNLK_DISKS = [(disk, offset)]

print "Registering to sanlock"
fd = sanlock.register()

print "Initializing '%s'" % (LOCKSPACE_NAME,)
sanlock.write_lockspace(LOCKSPACE_NAME, disk)

print "Initializing '%s' on '%s'" % (RESOURCE_NAME, LOCKSPACE_NAME)
sanlock.write_resource(LOCKSPACE_NAME, RESOURCE_NAME, SNLK_DISKS)

print "Acquiring the id '%i' on '%s'" % (HOST_ID, LOCKSPACE_NAME)
sanlock.add_lockspace(LOCKSPACE_NAME, HOST_ID, disk)

try:
print "Acquiring '%s' on '%s'" % (RESOURCE_NAME, LOCKSPACE_NAME)
sanlock.acquire(LOCKSPACE_NAME, RESOURCE_NAME, SNLK_DISKS, slkfd=fd,
version=0)
print "Releasing '%s' on '%s'" % (RESOURCE_NAME, LOCKSPACE_NAME)
sanlock.release(LOCKSPACE_NAME, RESOURCE_NAME, SNLK_DISKS, slkfd=fd)
finally:
print "Releasing the id '%i' on '%s'" % (HOST_ID, LOCKSPACE_NAME)
sanlock.rem_lockspace(LOCKSPACE_NAME, HOST_ID, disk)

print "Removing the sanlock disk"
os.remove(disk)

if __name__ == '__main__':
main()
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


[vdsm] Can anyone tell me the function of these two files(IDS and LEASE) in VDSM? FW: [About the IDS and LEASE file in VDSM] Why don't merge those two files into one file with the different file offse

2013-06-13 Thread Qixiaozhen
Can anyone tell me the function of these two files(IDS and LEASE)?

Thanks

发件人: Qixiaozhen
发送时间: 2013年6月13日 21:57
收件人: 'vdsm-devel@lists.fedorahosted.org'
抄送: Luohao (brian); Wangshen (C); Xujunxi
主题: [About the IDS and LEASE file in VDSM] Why don't merge those two files into 
one file with the different file offset?

Hi, all

I hava a question about the IDS and lease file in the VDSM. In the demo code of 
sanlock, these two files are contained in the same file.

In the VDSM 4.09, the offset of IDS is 0. However, the value of offset in 
version 4.10 is 'SDM_LEASE_OFFSET = 512 * 2048'. The comment in the code 
explains that the differences for them are just for upgrade.

According to my understanding, the content of IDS file contains the current 
cluster lock of the domain, and those in Lease file are the heart-beat info.

Why don't merge those two files into one file with the different file offset? 
In 4.09/4.10, we maintance two files. I think that 'two files' is much more 
complex than 'one file'.

Could anyone explain this for me?

Thx




sample code in sanlock(version 2.7), the cluster lock and heart-beat info are 
contained in 'disk':


HOST_ID = 1
LOCKSPACE_NAME = "lockspace1"
RESOURCE_NAME = "resource1"

def main():
print "Creating the sanlock disk"
fd, disk = tempfile.mkstemp()# the lease file and 
ids file are contained in ‘disk’
os.close(fd)

offset = sanlock.get_alignment(disk)

SNLK_DISKS = [(disk, offset)]

print "Registering to sanlock"
fd = sanlock.register()

print "Initializing '%s'" % (LOCKSPACE_NAME,)
sanlock.write_lockspace(LOCKSPACE_NAME, disk)

print "Initializing '%s' on '%s'" % (RESOURCE_NAME, LOCKSPACE_NAME)
sanlock.write_resource(LOCKSPACE_NAME, RESOURCE_NAME, SNLK_DISKS)

print "Acquiring the id '%i' on '%s'" % (HOST_ID, LOCKSPACE_NAME)
sanlock.add_lockspace(LOCKSPACE_NAME, HOST_ID, disk)

try:
print "Acquiring '%s' on '%s'" % (RESOURCE_NAME, LOCKSPACE_NAME)
sanlock.acquire(LOCKSPACE_NAME, RESOURCE_NAME, SNLK_DISKS, slkfd=fd,
version=0)
print "Releasing '%s' on '%s'" % (RESOURCE_NAME, LOCKSPACE_NAME)
sanlock.release(LOCKSPACE_NAME, RESOURCE_NAME, SNLK_DISKS, slkfd=fd)
finally:
print "Releasing the id '%i' on '%s'" % (HOST_ID, LOCKSPACE_NAME)
sanlock.rem_lockspace(LOCKSPACE_NAME, HOST_ID, disk)

print "Removing the sanlock disk"
os.remove(disk)

if __name__ == '__main__':
main()
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel