[ovirt-users] Re: Cannot delete snapshot

2021-04-27 Thread Giulio Casella
Thanks Shani, this did the trick. I managed to tweak the database and
then correctly remove the snapshot.

In the meanwhile, in bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1948599, this has been
confirmed as a bug.

Regards,
Giulio Casella

On 22/04/2021 14:31, Shani Leviim wrote:
> Since 6180c2e8-141a-4126-bcb1-5af5caa98175 doesn't exist on the VDSM, it
> should be removed from the DB,
> and since it's the parent id for image
> e77e2773-eecb-46a6-87c7-14df14f7d95b, it also should be changed.
> Something like this:
> UPDATE images set parentid = '19fa612d-2f93-46a5-93e7-c74afc2937fa'
> where image_guid = 'e77e2773-eecb-46a6-87c7-14df14f7d95b';
> 
> Then you can remove the 6180c2e8 image.
> 
> It will be safe if you'll have a backup before making any DB changes.
> 
> *Regards,
> *
> *Shani Leviim
> *
> 
> 
> On Thu, Apr 22, 2021 at 3:06 PM Giulio Casella  <mailto:giu...@di.unimi.it>> wrote:
> 
> 
> 
> On 22/04/2021 13:20, Shani Leviim wrote:
> > Hi,
> > You can use the DeleteImage tool [1], but it's first recommended to
> > backup your engine.
> >
> > To be on the safe side, here are some checks it's better to execute
> > before deleting:
> > - In order to locate the illegal image, you can run this command
> on the
> > host:
> > vdsm-tool dump-volume-chains 
> 
> Ok, that is the relevant part of the output:
> 
> image:    2fd9b340-14ce-42cd-a880-8f75eb3b72e7
> 
>              - 19fa612d-2f93-46a5-93e7-c74afc2937fa
>                status: OK, voltype: INTERNAL, format: COW, legality:
> LEGAL, type: SPARSE, capacity: 53687091200, truesize: 45902462976
> 
>              - e77e2773-eecb-46a6-87c7-14df14f7d95b
>                status: OK, voltype: LEAF, format: COW, legality: LEGAL,
> type: SPARSE, capacity: 53687091200, truesize: 27917287424
> 
> So I have on storage two images, first one is a snapshot, second one is
> Active VM.
> 
> Being the VM up and running I think I could say that on storage the
> situation is consistent.
> 
> >
> > - It's also recommended to verify that the engine and vdsm are synced
> > about that image, once you've found it, by running this command on the
> > engine:
> > SELECT *
> >      FROM images_storage_domain_view images_storage_domain_view
> >      WHERE image_group_id = ;
> >
> 
> That's the point: engine (database) sees 3 images, whilst vdsm sees
> only 2.
> 
> And this is output of:
> 
> select
> 
> image_guid,parentid,imagestatus,vm_snapshot_id,volume_type,volume_format,active
> from images where image_group_id='image-group-id';
> 
>               image_guid              |               parentid
>      | imagestatus |            vm_snapshot_id            | volume_type
> | volume_format | active
> 
> --+--+-+--+-+---+
>  6180c2e8-141a-4126-bcb1-5af5caa98175 |
> 19fa612d-2f93-46a5-93e7-c74afc2937fa |           1 |
> 281a4331-89fa-4544-b6ab-22c0e5ac6459 |           2 |             4 | f
>  19fa612d-2f93-46a5-93e7-c74afc2937fa |
> ---- |           4 |
> 6488f4c8-efc4-43df-aafc-497fb7d51fbb |           2 |             4 | f
>  e77e2773-eecb-46a6-87c7-14df14f7d95b |
> 6180c2e8-141a-4126-bcb1-5af5caa98175 |           1 |
> 59f69d6f-f300-45e4-8487-1fe4368a5933 |           2 |             4 | t
> 
> So there is in the database an image (the one with image-guid
> "6180c2e8-141a-4126-bcb1-5af5caa98175") not existing on storage.
> 
> > [1]
> > DeleteImage tool:
> > SELECT DeleteImage('image-id');
> >
> >     DELETE
> >     FROM images
> >     WHERE image_guid = v_image_guid;
> >
> 
> I think it could not be enough, I think I should adjust parentship
> relations in "images" table.
> 
> Just looking at that table it seems not so difficult, but: is it
> sufficient? Is it safe?
> 
> Regards,
> Giulio
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/BRNH5ERLXGUYSTWJ5F2C44CKVVRQVTHU/


[ovirt-users] Re: Cannot delete snapshot

2021-04-22 Thread Giulio Casella


On 22/04/2021 13:20, Shani Leviim wrote:
> Hi,
> You can use the DeleteImage tool [1], but it's first recommended to
> backup your engine.
> 
> To be on the safe side, here are some checks it's better to execute
> before deleting:
> - In order to locate the illegal image, you can run this command on the
> host:
> vdsm-tool dump-volume-chains 

Ok, that is the relevant part of the output:

image:2fd9b340-14ce-42cd-a880-8f75eb3b72e7

 - 19fa612d-2f93-46a5-93e7-c74afc2937fa
   status: OK, voltype: INTERNAL, format: COW, legality:
LEGAL, type: SPARSE, capacity: 53687091200, truesize: 45902462976

 - e77e2773-eecb-46a6-87c7-14df14f7d95b
   status: OK, voltype: LEAF, format: COW, legality: LEGAL,
type: SPARSE, capacity: 53687091200, truesize: 27917287424

So I have on storage two images, first one is a snapshot, second one is
Active VM.

Being the VM up and running I think I could say that on storage the
situation is consistent.

> 
> - It's also recommended to verify that the engine and vdsm are synced
> about that image, once you've found it, by running this command on the
> engine:
> SELECT *
>      FROM images_storage_domain_view images_storage_domain_view
>      WHERE image_group_id = ;
> 

That's the point: engine (database) sees 3 images, whilst vdsm sees only 2.

And this is output of:

select
image_guid,parentid,imagestatus,vm_snapshot_id,volume_type,volume_format,active
from images where image_group_id='image-group-id';

  image_guid  |   parentid
 | imagestatus |vm_snapshot_id| volume_type
| volume_format | active
--+--+-+--+-+---+
 6180c2e8-141a-4126-bcb1-5af5caa98175 |
19fa612d-2f93-46a5-93e7-c74afc2937fa |   1 |
281a4331-89fa-4544-b6ab-22c0e5ac6459 |   2 | 4 | f
 19fa612d-2f93-46a5-93e7-c74afc2937fa |
---- |   4 |
6488f4c8-efc4-43df-aafc-497fb7d51fbb |   2 | 4 | f
 e77e2773-eecb-46a6-87c7-14df14f7d95b |
6180c2e8-141a-4126-bcb1-5af5caa98175 |   1 |
59f69d6f-f300-45e4-8487-1fe4368a5933 |   2 | 4 | t

So there is in the database an image (the one with image-guid
"6180c2e8-141a-4126-bcb1-5af5caa98175") not existing on storage.

> [1]
> DeleteImage tool:
> SELECT DeleteImage('image-id');
> 
>     DELETE
>     FROM images
>     WHERE image_guid = v_image_guid;
> 

I think it could not be enough, I think I should adjust parentship
relations in "images" table.

Just looking at that table it seems not so difficult, but: is it
sufficient? Is it safe?

Regards,
Giulio
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/KTBOIHMHVCEAY2B23TDGPO7BIYYB2LJ2/


[ovirt-users] Re: Cannot delete snapshot

2021-04-21 Thread Giulio Casella
I tried, with no luck. Giving "disk snapshot id" as a parameter to that
psql procedure nothing happened. Giving the "vm_snapshot_id" as found in
the "images" table made the snapshot disappear from the gui, but not
from the "images" table.

SO I decided to look into DeleteSnapshot procedure, that resolve as:

DELETE FROM snapshots WHERE snapshot_id = v_snapshot_id;

It only acts on the "snapshots" table, and not on the "image" table,
where the parentship between snapshots is still wrong.

How safe is to manually modify "images" table and set correct parentship?





On 20/04/2021 15:56, Shani Leviim wrote:
> Thanks, Ritesh.
> 
> In order to delete that snapshot, run this command on psql:
> SELECT DeleteSnapshot('snapshot-id');
> 
> *Regards,
> *
> *Shani Leviim
> *
> 
> 
> On Tue, Apr 20, 2021 at 3:25 PM Ritesh Chikatwar  > wrote:
> 
> adding @Shani Leviim  
> 
> On Tue, Apr 20, 2021 at 5:35 PM Thomas Hoberg  > wrote:
> 
> I have used these tools to get rid of snapshots that wouldn't go
> away any other way:
> 
> https://www.ovirt.org/develop/developer-guide/db-issues/helperutilities.html
> 
> 
> ___
> Users mailing list -- users@ovirt.org 
> To unsubscribe send an email to users-le...@ovirt.org
> 
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> 
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> 
> List Archives:
> 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/37K5J2X2OUDQKN5J3J7ISOV26FMTHCTY/
> 
> 
> 
> 
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct: 
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives: 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/LS3BUPQIVHQMG7I7C6IL7QTXJTJE7KCE/
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/RAGYLKOM2DMLOCGIDYGZGCNVSQAASBIQ/


[ovirt-users] Re: Cannot delete snapshot

2021-04-20 Thread Giulio Casella
Hi Nir,
in bugzilla I see it could be a bug, so I'm waiting for software update
to fix it.
In the meanwhile is there some fix I can do on the database? The VM is
working fine, but I cannot operate with snapshots, and my backup is stuck...

TIA,
Giulio Casella

On 12/04/2021 16:54, Giulio Casella wrote:
> Hi,
> a colleague has submitted a bugzilla:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1948599
> 
> Regards,
> Giulio Casella
> 
> On 12/04/2021 14:33, Nir Soffer wrote:
>> On Mon, Apr 12, 2021 at 11:19 AM Giulio Casella  wrote:
>>>
>>> Hi,
>>> I'm having (another) issue working with snapshots.
>>>
>>> Since a few days my backup system (storware vprotect) cannot delete a
>>> snapshot. Message reported by SPM is:
>>>
>>> HSMGetAllTasksStatusesVDS failed: value=Volume does not exist:
>>> ('6180c2e8-141a-4126-bcb1-5af5caa98175',) abortedcode=201
>>>
>>> Other snapshots from other VMs are working fine (created and deleted as
>>> needed).
>>>
>>> I verified it, I can reach on SPM filesystem other snapshots from the
>>> same VM, but that one doesn't exist.
>>>
>>> I suspect that during normal backup management that snapshot has been
>>> correctly removed from file system, but still live in ovirt database.
>>>
>>> I'm pretty sure vProtect use ovirt API to operate, it doesn't directly
>>> interact with ovirt database. That's why I'm talking to you and not to
>>> storware guys.
>>>
>>> Is there a (safe) way to get rid of that snapshot?
>>
>> If the snapshot was already removed, ovirt should detect this and
>> complete the operation successfully.
>>
>> Please file ovirt bug for this, and attach engine and vdsm logs showing
>> the effected snapshot and disk snapshot id.
>>
>> You can get find the snapshot id is the UI. You can see the disk snapshot
>> id in vm > snapshots > disks > disk id
>>
>> Then grep engine and vdsm log for the disk id an attach all the logs
>> mentioning this disk id.
>>
>> It will be also useful to get a database dump so we can see what engine
>> knows about this snapshot.
>>
>> Benny, can  you recommend some queries to extract relevant info?
>>
>> Nir
>>
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct: 
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives: 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/CXESZXGGVOVFVKUMX5SMEKGTYU5X2SB3/
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/XYFAE5CBBYJPXZ53SQPXL7DU74AP6U3E/


[ovirt-users] Re: Cannot delete snapshot

2021-04-12 Thread Giulio Casella
Hi,
a colleague has submitted a bugzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=1948599

Regards,
Giulio Casella

On 12/04/2021 14:33, Nir Soffer wrote:
> On Mon, Apr 12, 2021 at 11:19 AM Giulio Casella  wrote:
>>
>> Hi,
>> I'm having (another) issue working with snapshots.
>>
>> Since a few days my backup system (storware vprotect) cannot delete a
>> snapshot. Message reported by SPM is:
>>
>> HSMGetAllTasksStatusesVDS failed: value=Volume does not exist:
>> ('6180c2e8-141a-4126-bcb1-5af5caa98175',) abortedcode=201
>>
>> Other snapshots from other VMs are working fine (created and deleted as
>> needed).
>>
>> I verified it, I can reach on SPM filesystem other snapshots from the
>> same VM, but that one doesn't exist.
>>
>> I suspect that during normal backup management that snapshot has been
>> correctly removed from file system, but still live in ovirt database.
>>
>> I'm pretty sure vProtect use ovirt API to operate, it doesn't directly
>> interact with ovirt database. That's why I'm talking to you and not to
>> storware guys.
>>
>> Is there a (safe) way to get rid of that snapshot?
> 
> If the snapshot was already removed, ovirt should detect this and
> complete the operation successfully.
> 
> Please file ovirt bug for this, and attach engine and vdsm logs showing
> the effected snapshot and disk snapshot id.
> 
> You can get find the snapshot id is the UI. You can see the disk snapshot
> id in vm > snapshots > disks > disk id
> 
> Then grep engine and vdsm log for the disk id an attach all the logs
> mentioning this disk id.
> 
> It will be also useful to get a database dump so we can see what engine
> knows about this snapshot.
> 
> Benny, can  you recommend some queries to extract relevant info?
> 
> Nir
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/CXESZXGGVOVFVKUMX5SMEKGTYU5X2SB3/


[ovirt-users] Cannot delete snapshot

2021-04-12 Thread Giulio Casella
Hi,
I'm having (another) issue working with snapshots.

Since a few days my backup system (storware vprotect) cannot delete a
snapshot. Message reported by SPM is:

HSMGetAllTasksStatusesVDS failed: value=Volume does not exist:
('6180c2e8-141a-4126-bcb1-5af5caa98175',) abortedcode=201

Other snapshots from other VMs are working fine (created and deleted as
needed).

I verified it, I can reach on SPM filesystem other snapshots from the
same VM, but that one doesn't exist.

I suspect that during normal backup management that snapshot has been
correctly removed from file system, but still live in ovirt database.

I'm pretty sure vProtect use ovirt API to operate, it doesn't directly
interact with ovirt database. That's why I'm talking to you and not to
storware guys.

Is there a (safe) way to get rid of that snapshot?

TIA

Regards,
Giulio Casella
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/7ZU7NWHBW3B2NBPQPNRVAAU7CVJ5PEKG/


[ovirt-users] Re: Locked disks

2021-03-31 Thread Giulio Casella
FYI: after upgrading to ovirt 4.4.5 (both manager and ovirt nodes) the
issue seems fixed (or at least it didn't happen in about a week, with
4.4.4 I had the problem every couple of day).

Regards,
gc


On 04/02/2021 09:08, Giulio Casella wrote:
> I've not been able to reproduce, if happens again I'll submit a bugzilla.
> 
> Thank you.
> 
> Regards,
> gc
> 
> 
> On 03/02/2021 17:49, Shani Leviim wrote:
>> In such a case, the disks shouldn't remain locked - sounds like a bug.
>> This one requires a deeper look.
>> If you're able to reproduce it again, please open a bug in Bugzilla
>> (https://bugzilla.redhat.com <https://bugzilla.redhat.com>) with engine
>> and vdsm logs,
>> so we'll be able to investigate it.
>>
>> *Regards,
>> *
>> *Shani Leviim
>> *
>>
>>
>> On Wed, Feb 3, 2021 at 5:39 PM Giulio Casella > <mailto:giu...@di.unimi.it>> wrote:
>>
>> Hi,
>> I tried unlock_entity.sh, and it solved the issue. So far so good.
>>
>> But it's still unclear why disks were locked.
>>
>> Let me make an hypothesis: in ovirt 4.3 a failure in snapshot removal
>> would lead to a snapshot in illegal status. No problem, you can remove
>> again and the situation is fixed.
>> In ovirt 4.4 a failure in snapshot removal leave the whole disk in
>> locked state (maybe a bug?), preventing any further action.
>>
>> Does it make sense?
>>
>>
>> On 03/02/2021 12:25, Giulio Casella wrote:
>> > Hi Shani,
>> > no tasks listed in UI, and now "taskcleaner.sh -o" reports no task
>> (just
>> > before I gave "taskcleaner.sh -r").
>> > But disks are still locked, and "unlock_entity.sh -q -t all -c"
>> > (accordingly) reports only two disk's uuid (with their vm's uuid).
>> >
>> > Time to give a chance to unlock_entity.sh?
>> >
>> > Regards,
>> > gc
>> >
>> > On 03/02/2021 11:52, Shani Leviim wrote:
>> >> Hi Giulio,
>> >> Before running unlock_entity.sh, let's try to find if there's any
>> task
>> >> in progress.
>> >> Is there any hint on the events in the UI?
>> >> Or try to run [1]:
>> >> ./taskcleaner.sh -o  
>> >>
>> >> Also, you can verify what entities are locked [2]:
>> >> ./unlock_entity.sh -q -t all -c
>> >>
>> >> [1]
>> >>
>> 
>> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh
>> 
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh>
>> >>
>> 
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh
>> 
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh>>
>> >> [2]
>> >>
>> 
>> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh
>> 
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh>
>> >>
>> 
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh
>> 
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh>>
>> >>
>> >> *Regards,
>> >> *
>> >> *Shani Leviim
>> >> *
>> >>
>> >>
>> >> On Wed, Feb 3, 2021 at 10:43 AM Giulio Casella
>> mailto:giu...@di.unimi.it>
>> >> <mailto:giu...@di.unimi.it <mailto:giu...@di.unimi.it>>> wrote:
>> >>
>> >>     Since yesterday I found a couple VMs with locked disk. I
>> don't know the
>> >>     reason, I suspect some interaction made by our backup system
>> (vprotect,
>> >>     snapshot based), despite it's working for more than a year.
>> >>
>> >>     I'd give a chance to unlock_entity.sh script, but it reports:
>> >>
>> >>     CAUTION, this operation may lead to data corruption and
>> should be used
>> >>     with care. Please contact support prior to running this command
>> >>
>> >>     Do you think I should trust? Is it safe? VMs are i

[ovirt-users] Re: Locked disks

2021-02-04 Thread Giulio Casella
I've not been able to reproduce, if happens again I'll submit a bugzilla.

Thank you.

Regards,
gc


On 03/02/2021 17:49, Shani Leviim wrote:
> In such a case, the disks shouldn't remain locked - sounds like a bug.
> This one requires a deeper look.
> If you're able to reproduce it again, please open a bug in Bugzilla
> (https://bugzilla.redhat.com <https://bugzilla.redhat.com>) with engine
> and vdsm logs,
> so we'll be able to investigate it.
> 
> *Regards,
> *
> *Shani Leviim
> *
> 
> 
> On Wed, Feb 3, 2021 at 5:39 PM Giulio Casella  <mailto:giu...@di.unimi.it>> wrote:
> 
> Hi,
> I tried unlock_entity.sh, and it solved the issue. So far so good.
> 
> But it's still unclear why disks were locked.
> 
> Let me make an hypothesis: in ovirt 4.3 a failure in snapshot removal
> would lead to a snapshot in illegal status. No problem, you can remove
> again and the situation is fixed.
> In ovirt 4.4 a failure in snapshot removal leave the whole disk in
> locked state (maybe a bug?), preventing any further action.
> 
> Does it make sense?
> 
> 
> On 03/02/2021 12:25, Giulio Casella wrote:
> > Hi Shani,
> > no tasks listed in UI, and now "taskcleaner.sh -o" reports no task
> (just
> > before I gave "taskcleaner.sh -r").
> > But disks are still locked, and "unlock_entity.sh -q -t all -c"
> > (accordingly) reports only two disk's uuid (with their vm's uuid).
> >
> > Time to give a chance to unlock_entity.sh?
> >
> > Regards,
> > gc
> >
> > On 03/02/2021 11:52, Shani Leviim wrote:
> >> Hi Giulio,
> >> Before running unlock_entity.sh, let's try to find if there's any
> task
> >> in progress.
> >> Is there any hint on the events in the UI?
> >> Or try to run [1]:
> >> ./taskcleaner.sh -o  
> >>
> >> Also, you can verify what entities are locked [2]:
> >> ./unlock_entity.sh -q -t all -c
> >>
> >> [1]
> >>
> 
> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh
> 
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh>
> >>
> 
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh
> 
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh>>
> >> [2]
> >>
> 
> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh
> 
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh>
> >>
> 
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh
> 
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh>>
> >>
> >> *Regards,
> >> *
> >> *Shani Leviim
> >> *
> >>
> >>
> >> On Wed, Feb 3, 2021 at 10:43 AM Giulio Casella
> mailto:giu...@di.unimi.it>
> >> <mailto:giu...@di.unimi.it <mailto:giu...@di.unimi.it>>> wrote:
> >>
> >>     Since yesterday I found a couple VMs with locked disk. I
> don't know the
> >>     reason, I suspect some interaction made by our backup system
> (vprotect,
> >>     snapshot based), despite it's working for more than a year.
> >>
> >>     I'd give a chance to unlock_entity.sh script, but it reports:
> >>
> >>     CAUTION, this operation may lead to data corruption and
> should be used
> >>     with care. Please contact support prior to running this command
> >>
> >>     Do you think I should trust? Is it safe? VMs are in production...
> >>
> >>     My manager is 4.4.4.7-1.el8 (CentOS stream 8), hosts are
> oVirt Node
> >>     4.4.4
> >>
> >>
> >>     TIA,
> >>     Giulio
> >>     ___
> >>     Users mailing list -- users@ovirt.org
> <mailto:users@ovirt.org> <mailto:users@ovirt.org
> <mailto:users@ovirt.org>>
> >>     To unsubscribe send an email to users-le...@ovirt.org
> <mailto:users-le...@ovirt.org>
> >>     <mailto:users-le...@ovirt.org <mailto:

[ovirt-users] Re: Locked disks

2021-02-03 Thread Giulio Casella
Hi,
I tried unlock_entity.sh, and it solved the issue. So far so good.

But it's still unclear why disks were locked.

Let me make an hypothesis: in ovirt 4.3 a failure in snapshot removal
would lead to a snapshot in illegal status. No problem, you can remove
again and the situation is fixed.
In ovirt 4.4 a failure in snapshot removal leave the whole disk in
locked state (maybe a bug?), preventing any further action.

Does it make sense?


On 03/02/2021 12:25, Giulio Casella wrote:
> Hi Shani,
> no tasks listed in UI, and now "taskcleaner.sh -o" reports no task (just
> before I gave "taskcleaner.sh -r").
> But disks are still locked, and "unlock_entity.sh -q -t all -c"
> (accordingly) reports only two disk's uuid (with their vm's uuid).
> 
> Time to give a chance to unlock_entity.sh?
> 
> Regards,
> gc
> 
> On 03/02/2021 11:52, Shani Leviim wrote:
>> Hi Giulio,
>> Before running unlock_entity.sh, let's try to find if there's any task
>> in progress.
>> Is there any hint on the events in the UI?
>> Or try to run [1]:
>> ./taskcleaner.sh -o  
>>
>> Also, you can verify what entities are locked [2]:
>> ./unlock_entity.sh -q -t all -c
>>
>> [1]
>> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh>
>> [2]
>> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh
>> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh>
>>
>> *Regards,
>> *
>> *Shani Leviim
>> *
>>
>>
>> On Wed, Feb 3, 2021 at 10:43 AM Giulio Casella > <mailto:giu...@di.unimi.it>> wrote:
>>
>> Since yesterday I found a couple VMs with locked disk. I don't know the
>> reason, I suspect some interaction made by our backup system (vprotect,
>> snapshot based), despite it's working for more than a year.
>>
>> I'd give a chance to unlock_entity.sh script, but it reports:
>>
>> CAUTION, this operation may lead to data corruption and should be used
>> with care. Please contact support prior to running this command
>>
>> Do you think I should trust? Is it safe? VMs are in production...
>>
>> My manager is 4.4.4.7-1.el8 (CentOS stream 8), hosts are oVirt Node
>> 4.4.4
>>
>>
>> TIA,
>> Giulio
>> ___
>> Users mailing list -- users@ovirt.org <mailto:users@ovirt.org>
>> To unsubscribe send an email to users-le...@ovirt.org
>> <mailto:users-le...@ovirt.org>
>> Privacy Statement: https://www.ovirt.org/privacy-policy.html
>> <https://www.ovirt.org/privacy-policy.html>
>> oVirt Code of Conduct:
>> https://www.ovirt.org/community/about/community-guidelines/
>> <https://www.ovirt.org/community/about/community-guidelines/>
>> List Archives:
>> 
>> https://lists.ovirt.org/archives/list/users@ovirt.org/message/M4HYMDMHOKC5DCHDP6CFLM4RWJQNN7R4/
>> 
>> <https://lists.ovirt.org/archives/list/users@ovirt.org/message/M4HYMDMHOKC5DCHDP6CFLM4RWJQNN7R4/>
>>
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct: 
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives: 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/FEXMZKZFYCWUOVZXZ3C3XZ7VBVYKFJGH/
> 

o
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/3DF3R5TKES43OJ2X4UF5SU25XLSFX5JG/


[ovirt-users] Re: Locked disks

2021-02-03 Thread Giulio Casella
Hi Shani,
no tasks listed in UI, and now "taskcleaner.sh -o" reports no task (just
before I gave "taskcleaner.sh -r").
But disks are still locked, and "unlock_entity.sh -q -t all -c"
(accordingly) reports only two disk's uuid (with their vm's uuid).

Time to give a chance to unlock_entity.sh?

Regards,
gc

On 03/02/2021 11:52, Shani Leviim wrote:
> Hi Giulio,
> Before running unlock_entity.sh, let's try to find if there's any task
> in progress.
> Is there any hint on the events in the UI?
> Or try to run [1]:
> ./taskcleaner.sh -o  
> 
> Also, you can verify what entities are locked [2]:
> ./unlock_entity.sh -q -t all -c
> 
> [1]
> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/taskcleaner.sh>
> [2]
> https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh
> <https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/dbutils/unlock_entity.sh>
> 
> *Regards,
> *
> *Shani Leviim
> *
> 
> 
> On Wed, Feb 3, 2021 at 10:43 AM Giulio Casella  <mailto:giu...@di.unimi.it>> wrote:
> 
> Since yesterday I found a couple VMs with locked disk. I don't know the
> reason, I suspect some interaction made by our backup system (vprotect,
> snapshot based), despite it's working for more than a year.
> 
> I'd give a chance to unlock_entity.sh script, but it reports:
> 
> CAUTION, this operation may lead to data corruption and should be used
> with care. Please contact support prior to running this command
> 
> Do you think I should trust? Is it safe? VMs are in production...
> 
> My manager is 4.4.4.7-1.el8 (CentOS stream 8), hosts are oVirt Node
> 4.4.4
> 
> 
> TIA,
> Giulio
> ___
> Users mailing list -- users@ovirt.org <mailto:users@ovirt.org>
> To unsubscribe send an email to users-le...@ovirt.org
> <mailto:users-le...@ovirt.org>
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> <https://www.ovirt.org/privacy-policy.html>
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> <https://www.ovirt.org/community/about/community-guidelines/>
> List Archives:
> 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/M4HYMDMHOKC5DCHDP6CFLM4RWJQNN7R4/
> 
> <https://lists.ovirt.org/archives/list/users@ovirt.org/message/M4HYMDMHOKC5DCHDP6CFLM4RWJQNN7R4/>
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/FEXMZKZFYCWUOVZXZ3C3XZ7VBVYKFJGH/


[ovirt-users] Locked disks

2021-02-03 Thread Giulio Casella
Since yesterday I found a couple VMs with locked disk. I don't know the
reason, I suspect some interaction made by our backup system (vprotect,
snapshot based), despite it's working for more than a year.

I'd give a chance to unlock_entity.sh script, but it reports:

CAUTION, this operation may lead to data corruption and should be used
with care. Please contact support prior to running this command

Do you think I should trust? Is it safe? VMs are in production...

My manager is 4.4.4.7-1.el8 (CentOS stream 8), hosts are oVirt Node 4.4.4


TIA,
Giulio
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/M4HYMDMHOKC5DCHDP6CFLM4RWJQNN7R4/


[ovirt-users] Re: ovirt node 4.4 and infiniband

2020-05-26 Thread Giulio Casella
Hi Dominik,


> 
> Does installing mlnx-ofed-basic enables a CentOS 8 based oVirt host to
> use Infiniband?

it should. After a fresh CentOS install ("minimal install") I enable
Mellanox repo, dnf install mlnx-ofed-basic -y, and I can see ib0 device
(and I can get IP via DHCP for example).
I still didn't try to use real infiniband functionalities (in our
scenario NFS over IP over IB), but I'm quite confident about this.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/CKA5DBRXJD4LLX57VUNO2HL2UQWQBDLL/


[ovirt-users] ovirt node 4.4 and infiniband

2020-05-25 Thread Giulio Casella
Hi all,
I have in production a 4.3.9 setup of ovirt, based on a standalone
engine, not HE.
I have 3 datacenters (an 3 clusters). One of these clusters is composed
of many tenth of HP blades, accessing storage via InfiniBand (used as
normal NICs, via ipoib). They're not the state of the art, but I cannot
renew the entire hardware.

After a setup of ovirt node 4.4 I cannot see ib0 nic.

I managed to see it installing CentOS 8, enabling Mellanox repo
(https://linux.mellanox.com/public/repo/mlnx_ofed/latest/rhel8.1/mellanox_mlnx_ofed.repo)
and installing package "mlnx-ofed-basic".

In Ovirt Node it's not possible, that package require dependencies from
CentOS 8 repos, not present in ovirt repo.

Is there any chances to have infiniband NICs working in ovirt?

TIA,
gc
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/DSB62G3CWZ5YE7DAMAUE72LMBZ24FNNG/


[ovirt-users] Re: Bridge not forwarding frames on node.

2020-05-14 Thread Giulio Casella

Maybe you can check the vm network filter.
Take a look at Network -> vNic profile ->  and 
choose edit. If "Network Filter" has the default value 
"vdsm-no-mac-spoofing", it can prevent bridge normal behaviour. Maybe 
"No network filter" can do the magic.


HTH.

Cheers,
Giulio

On 14/05/2020 17:16, Stefano Danzi wrote:



Il 14/05/2020 12:50, Dominik Holler ha scritto:



On Wed, May 13, 2020 at 9:44 PM s.danzi <mailto:s.da...@hawai.it>> wrote:


Hi to all!

I'm having an issue with networks bridges on ovirt node.

It's look like this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1279161

On VM I have a bridge between a tap device and network interface. 
On node side the interface is bridged with bond0 vlan 128

(bond0.128 lacp).

When I ping an host on the other side of tap device I can see this:

Arp request goes from my lan to the tap device on vm. Arp reply
return from tap vm and bridge forward this to vm networks
interface. Using tcpdump on vm interface on node I can see the arp
reply, using tcpdump on bond0.128 or on bridge I can't see the arp
reply.  Arp request is forwarded from bond0.128 to vm net but arp
reply isn't forwarded from vm net to bond0.128.



Any chance that there is network filtering involved?
Please check if the related vNIC profile has No Network Filter.
If there is a Network Filter set, please shutdown the VM, set to No 
Network Filter in the vNIC profile, and start the VM again and check 
if the issue is gone.


Hi! No Network filter It was my first check.


___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/WCD554AXHF7TQH7CMZ5QXK37HLRWF2G2/



--
Giulio Casellagiulio at di.unimi.it
System and network architect
Computer Science Dept. - University of Milano
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/ASTFMC6TIJWPPVETPQNUO46PCW52SWNE/


[ovirt-users] Fedora 30 guest - kernel issue

2019-10-25 Thread Giulio Casella
Hi everybody,
yesterday I updated some of my fedora 30 ovirt guest, and after reboot I
wasn't able to control consoles via spice: I could see desktop, but
mouse and keyboard were not working (nor were key command in
remote-viewer menu, like ctrl-alt-F2 and so on).

Let me specify it's not strictly an ovirt issue, and the problem goes
away booting with old kernel (kernel-5.2.18-200.fc30.x86_64): the
problem arises only with fedora kernel version kernel-5.3.6-200.fc30.x86_64.

So: anyone has already faced this, before I dive into logfiles?

TIA,
Giulio
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/3RQFAW4L5G5SOKPI2RHJQICALM4JCZNT/


[ovirt-users] Re: Cloud Init static route

2019-10-09 Thread Giulio Casella
You can try adding something like this (taken from official cloud-init
docs):

network:
  version: 1
  config:
- type: route
  destination: 192.168.24.0/24
  gateway: 192.168.24.2
  metric: 2

to "custom script" field in the "initial run" section of the "Run once"
dialog.

Or in the analog part of the VM properties if you want to make it permanent.

In both cases cloud-init must be present (and automatically executed at
boot) in guest.

HTH


Il 09/10/2019 12:41, Tommaso - Shellrent ha scritto:
> Hi,
> 
>     on our system we need to setup a static route to all the vm's.
> 
> How can we do it via cloud-init? it seems to be not possible via the
> ovirt interface
> 
> 
> regards,
> 
> -- 
> Shellrent Logo
>   
> *Tommaso De Marchi*
> COO Chief Operating Officer - Shellrent S.r.l.
> Tel. 0444321155  | Fax 04441492177
> Via dell'Edilizia, 19 - 36100 Vicenza
> 
> 
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct: 
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives: 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/7GG2FY6R7IG6EOWQSNFQS4LM6JOMOA4V/
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/YNADOMEYTFGDTDTOQI3UQO4BFMFJIM6P/


[ovirt-users] Re: python sdk create a windows machine with initial run sysprep

2019-08-29 Thread Giulio Casella
That option has to be passed when you start the VM, not in the creation
phase:

api.vms.get(NEW_VM_NAME).start(use_sysprep=true)



Il 29/08/2019 12:45, Harry Conings ha scritto:
> Hi
> i am trying to create virtual machines from a template but i cannot seem to 
> find how to ad the inital run sysprep option
> how should i give that option ?
> my code
> 
>  NEW_VM_NAME = 'W10MYMACINE'
> TEMPLATE_NAME = 'W10TEMP'
> CLUSTER_NAME= 'MYCLUSTER'
> 
> try:
> api.vms.add(params.VM(name=NEW_VM_NAME, 
> cluster=api.clusters.get(CLUSTER_NAME),
>   template=api.templates.get(TEMPLATE_NAME)))
> print 'VM was created from Template successfully'
> print 'Waiting for VM to reach Down status'
> while api.vms.get(NEW_VM_NAME).status.state != 'down':
> sleep(1)
> except Exception as e:
> print 'Failed to create VM from Template:\n%s' % str(e)
> 
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct: 
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives: 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/CIWFZXRJTELNSMH34A5XBQQFFZETZXIA/
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/TG2CJFWZIY7G426UF2FT5CY6EGU4U74Q/


[ovirt-users] storware vProtect

2019-06-05 Thread Giulio Casella
Hi everyone,
I'm evaluating some datacenter backup solution, and finally I'm going to
give a chance to storware vprotect for my ovirt DC (2 clusters, 3+32
hypervisors, about 100+ VMs).

How many of you are using it? Any suggestion? Any caveat not immediately
visible? Hints? Drawbacks?

For example I have some problem mounting backup of some VM (pfsense
firewalls), based on UFS filesystem. And I couldn't browse mounted
backup from WebUI (NFS problems between server and node).
I know these are problems I can easily get around, but I'm more
concerned about issue I can't see right now.

TIA,
gc
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/5PKX667Y7JKGI6T52SXPKF7TYD2LNAXR/


[ovirt-users] Re: VM info after upgrade to 4.3.2

2019-03-22 Thread Giulio Casella
Il 22/03/2019 09:28, Simone Tiraboschi ha scritto:
> 
> 
> On Fri, Mar 22, 2019 at 9:18 AM Giulio Casella  <mailto:giu...@di.unimi.it>> wrote:
> 
> Hi guys,
> I noticed a strange behaviour after updating (part of) my setup to 4.3.2
> (previously 4.3.1).
> In detail I have the engine (stand alone, not hosted engine) version
> 4.3.2, and hosts (ovirt-node-ng) are 4.3.2 and 4.3.1.
> 
> In admin portal, VMs running on 4.3.2 hosts report incomplete
> informations: some of them report no IP address and uptime, none of them
> report memory, CPU and network usage.
> Also a couple of VMs stay in "Powering up" state indefinitely
> (nevertheless the VM is up and running). In this state I can't even
> migrate the VM.
> 
> VMs running on 4.3.1 hosts, instead, are fine, reporting correct
> informations.
> 
> For completeness: VMs are a mix of CentOS 7, Fedora, Windows 10, Windows
> server, ..., with ovirt-guest-agent installed, but the OS seems to make
> no difference.
> 
> Any ideas?
> 
> 
> Can you please check /var/log/vdsm/vdsm.log looking for something like
> 
>   File "/usr/lib/python2.7/site-packages/vdsm/virt/guestagent.py", line 505, 
> in getGuestInfo
> del qga['appsList']
> KeyError: 'appsList'
> 
> ?
> 
> If so, I think it's https://bugzilla.redhat.com/1676893

I confirm I'm in that situation.
I think I will rollback to 4.3.1 and wait for 4.3.3.

Thank you,
Giulio
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/6K56OKP37SIYT62U35PDMGGAHNJTFULA/


[ovirt-users] VM info after upgrade to 4.3.2

2019-03-22 Thread Giulio Casella
Hi guys,
I noticed a strange behaviour after updating (part of) my setup to 4.3.2
(previously 4.3.1).
In detail I have the engine (stand alone, not hosted engine) version
4.3.2, and hosts (ovirt-node-ng) are 4.3.2 and 4.3.1.

In admin portal, VMs running on 4.3.2 hosts report incomplete
informations: some of them report no IP address and uptime, none of them
report memory, CPU and network usage.
Also a couple of VMs stay in "Powering up" state indefinitely
(nevertheless the VM is up and running). In this state I can't even
migrate the VM.

VMs running on 4.3.1 hosts, instead, are fine, reporting correct
informations.

For completeness: VMs are a mix of CentOS 7, Fedora, Windows 10, Windows
server, ..., with ovirt-guest-agent installed, but the OS seems to make
no difference.

Any ideas?

TIA,
Giulio Casella

___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/JWDOTKAOWVXSQH7UB4UISFLQSIPS57RG/


[ovirt-users] Re: Mounting ISO in subfolder

2019-02-01 Thread Giulio Casella
Il 01/02/2019 13:19, Gianluca Cecchi ha scritto:
> On Fri, Feb 1, 2019 at 12:47 PM Giulio Casella  <mailto:giu...@di.unimi.it>> wrote:
> 
> 
> This could be a (partially satisfying solution), but I can have only one
> storage domain for ISOs, right?
> AFAIK you can have one ISO domain, one export domain and many data
> domains; "engine-iso-uploader list" reports only ISO domain.
> 
>  
> You can have only one iso domain attached (and so active) at a time. But
> you can have many iso domains defined.
> And the same domain can be defined across different domains
> The same applies to export domains. When you select "Attach Export"
> button in Computers -> Datacenters -> MyDc you get a list of defined
> export domain among which to select the one to attach, in case you have
> more than one defined.

Correct. So the solution to use more than one ISO domain to logically
organize groups of ISOs cannot be accomplished, I'd like to see all my
ISOs at the same time.

That's why I think subfolders could be a nice enhancement for ISO
storage domains.

Cheers,
gc

___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/KDSUNX6RYMNP44BJSNETEOM3DP35VGFE/


[ovirt-users] Re: Mounting ISO in subfolder

2019-02-01 Thread Giulio Casella
Il 01/02/2019 12:12, Greg Sheremeta ha scritto:
> ISO domains are deprecated, so my guess is it will be closed.
> And storage domains aren't intended for the user to edit manually.
> 
> Perhaps the best way for you to organize is to make a few separate
> storage domains for your subsets of ISOs.
> windows_domain - win7.iso
> windows_domain - win81.iso
> el_domain - centos7.iso
> el_domain - rhel7.iso
> 

This could be a (partially satisfying solution), but I can have only one
storage domain for ISOs, right?
AFAIK you can have one ISO domain, one export domain and many data
domains; "engine-iso-uploader list" reports only ISO domain.

___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/7HK3ZJ57KETFSE6SHMSSKJUWPJ33KR5Y/


[ovirt-users] Re: Mounting ISO in subfolder

2019-02-01 Thread Giulio Casella
Il 31/01/2019 18:14, Sandro Bonazzola ha scritto:
> As far as I can tell, there are no tools that creates subdirectories
> within storage domains.
> Did you manually upload the iso into the nfs mount creating a
> subdirectory there?
> I think this layout is not supported at all.

Yes, I did (sorry :-)). My ISOs are growing, and I'd like to have a
hierarchical structure.
To say the truth it was only a test, I wasn't sure to see ISOs in
subdir. But when I've seen them (correctly listed in admin portal as
"foo/bar.iso"), I'd expect to be able mount them.

I also filed a bug
(https://bugzilla.redhat.com/show_bug.cgi?id=1671046), if the answer
will be NOTABUG, I'll try with a RFE.

Thanks,
gc


TL;DR

The scenario I'm trying to implement is a DVD video store, provided by
images in ISO domain, automatically mounted on VM on demand, via a
backend python script. That's why in this case a hyerarchical structure
would be much better than a flat one.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/HRTTZSKLMNIYBDXHD6274DRM76AZXGM6/


[ovirt-users] Mounting ISO in subfolder

2019-01-30 Thread Giulio Casella
Hi,
I noticed that if I create a directory in root of ISO domain and put an
image in it, you can see it in admin portal image list (listed as
"foo/bar.iso"), but mounting that iso in a VM ("change CD") fails

"Error while executing action Change CD: Drive image file could not be
found"

I can easily reproduce this behaviour in ovirt 4.2.8 and rhv 4.2.7.

Is it a bug?

Cheers,
gc
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/WRVLT542RUQPE76MA6YO5KGZIMKVDS6I/


[ovirt-users] Re: oVirt Node 4.2.7 upgrade fails with broken dependencies ?

2018-12-19 Thread Giulio Casella
Starting from this morning collectd-* packages appeared in
ovirt-4.2-centos-opstools repo. Updated, re-enabled epel repo, and now
everything is working fine.

Ciao,
g


Il 14/11/2018 16:30, Sandro Bonazzola ha scritto:
> 
> 
> Il giorno mer 14 nov 2018 alle ore 16:27 Jayme  <mailto:jay...@gmail.com>> ha scritto:
> 
> I am having the same issue as well attempting to update oVirt node
> to latest. 
> 
> 
> Please manually disable EPEL repository for now. We are checking with
> CentOS OpsTools SIG if we can get an updated collectd there.
>  
> 
> 
> 
> 
> On Wed, Nov 14, 2018 at 11:07 AM Giulio Casella  <mailto:giu...@di.unimi.it>> wrote:
> 
> It's due to a update of collectd in epel, but ovirt repos
> contain also
> collectd-write_http and collectd-disk (still not updated). We
> have to
> wait for ovirt guys to release updated versions in
> ovirt-4.2-centos-opstools repo.
> 
> I think it'll be a matter of few days.
> 
> Ciao,
> Giulio
> 
> Il 14/11/2018 13:51, Rogério Ceni Coelho ha scritto:
> > Ovirt Engine with same problem.
> >
> > [root@nscovirt42prdpoa ~]# yum update
> > Loaded plugins: fastestmirror, versionlock
> > Loading mirror speeds from cached hostfile
> >  * base: centos.brnet.net.br <http://centos.brnet.net.br>
> <http://centos.brnet.net.br>
> >  * epel: mirror.ci.ifes.edu.br <http://mirror.ci.ifes.edu.br>
> <http://mirror.ci.ifes.edu.br>
> >  * extras: centos.brnet.net.br <http://centos.brnet.net.br>
> <http://centos.brnet.net.br>
> >  * ovirt-4.2: mirror.linux.duke.edu
> <http://mirror.linux.duke.edu> <http://mirror.linux.duke.edu>
> >  * ovirt-4.2-epel: mirror.ci.ifes.edu.br
> <http://mirror.ci.ifes.edu.br> <http://mirror.ci.ifes.edu.br>
> >  * updates: centos.brnet.net.br <http://centos.brnet.net.br>
> <http://centos.brnet.net.br>
> > Resolving Dependencies
> > --> Running transaction check
> > ---> Package collectd.x86_64 0:5.8.0-6.1.el7 will be updated
> > --> Processing Dependency: collectd(x86-64) = 5.8.0-6.1.el7
> for package:
> > collectd-disk-5.8.0-6.1.el7.x86_64
> > --> Processing Dependency: collectd(x86-64) = 5.8.0-6.1.el7
> for package:
> > collectd-write_http-5.8.0-6.1.el7.x86_64
> > ---> Package collectd.x86_64 0:5.8.1-1.el7 will be an update
> > ---> Package collectd-postgresql.x86_64 0:5.8.0-6.1.el7 will
> be updated
> > ---> Package collectd-postgresql.x86_64 0:5.8.1-1.el7 will be
> an update
> > ---> Package ovirt-engine-extensions-api-impl.noarch
> 0:4.2.7.4-1.el7
> > will be updated
> > ---> Package ovirt-engine-extensions-api-impl.noarch
> 0:4.2.7.5-1.el7
> > will be an update
> > ---> Package ovirt-engine-lib.noarch 0:4.2.7.4-1.el7 will be
> updated
> > ---> Package ovirt-engine-lib.noarch 0:4.2.7.5-1.el7 will be
> an update
> > ---> Package ovirt-engine-setup.noarch 0:4.2.7.4-1.el7 will be
> updated
> > ---> Package ovirt-engine-setup.noarch 0:4.2.7.5-1.el7 will be
> an update
> > ---> Package ovirt-engine-setup-base.noarch 0:4.2.7.4-1.el7
> will be updated
> > ---> Package ovirt-engine-setup-base.noarch 0:4.2.7.5-1.el7
> will be an
> > update
> > ---> Package ovirt-engine-setup-plugin-ovirt-engine.noarch
> > 0:4.2.7.4-1.el7 will be updated
> > ---> Package ovirt-engine-setup-plugin-ovirt-engine.noarch
> > 0:4.2.7.5-1.el7 will be an update
> > ---> Package ovirt-engine-setup-plugin-ovirt-engine-common.noarch
> > 0:4.2.7.4-1.el7 will be updated
> > ---> Package ovirt-engine-setup-plugin-ovirt-engine-common.noarch
> > 0:4.2.7.5-1.el7 will be an update
> > ---> Package
> ovirt-engine-setup-plugin-vmconsole-proxy-helper.noarch
> > 0:4.2.7.4-1.el7 will be updated
> > ---> Package
> ovirt-engine-setup-plugin-vmconsole-proxy-helper.noarch
> > 0:4.2.7.5-1.el7 will be an update
> > ---> Package ovirt-engine-setup-plugin-websocket-proxy.noarch
> > 0:4.2.7.4-1.el7 will be updated
> &g

[ovirt-users] Re: oVirt Node 4.2.7 upgrade fails with broken dependencies ?

2018-11-14 Thread Giulio Casella
It's due to a update of collectd in epel, but ovirt repos contain also
collectd-write_http and collectd-disk (still not updated). We have to
wait for ovirt guys to release updated versions in
ovirt-4.2-centos-opstools repo.

I think it'll be a matter of few days.

Ciao,
Giulio

Il 14/11/2018 13:51, Rogério Ceni Coelho ha scritto:
> Ovirt Engine with same problem.
> 
> [root@nscovirt42prdpoa ~]# yum update
> Loaded plugins: fastestmirror, versionlock
> Loading mirror speeds from cached hostfile
>  * base: centos.brnet.net.br 
>  * epel: mirror.ci.ifes.edu.br 
>  * extras: centos.brnet.net.br 
>  * ovirt-4.2: mirror.linux.duke.edu 
>  * ovirt-4.2-epel: mirror.ci.ifes.edu.br 
>  * updates: centos.brnet.net.br 
> Resolving Dependencies
> --> Running transaction check
> ---> Package collectd.x86_64 0:5.8.0-6.1.el7 will be updated
> --> Processing Dependency: collectd(x86-64) = 5.8.0-6.1.el7 for package:
> collectd-disk-5.8.0-6.1.el7.x86_64
> --> Processing Dependency: collectd(x86-64) = 5.8.0-6.1.el7 for package:
> collectd-write_http-5.8.0-6.1.el7.x86_64
> ---> Package collectd.x86_64 0:5.8.1-1.el7 will be an update
> ---> Package collectd-postgresql.x86_64 0:5.8.0-6.1.el7 will be updated
> ---> Package collectd-postgresql.x86_64 0:5.8.1-1.el7 will be an update
> ---> Package ovirt-engine-extensions-api-impl.noarch 0:4.2.7.4-1.el7
> will be updated
> ---> Package ovirt-engine-extensions-api-impl.noarch 0:4.2.7.5-1.el7
> will be an update
> ---> Package ovirt-engine-lib.noarch 0:4.2.7.4-1.el7 will be updated
> ---> Package ovirt-engine-lib.noarch 0:4.2.7.5-1.el7 will be an update
> ---> Package ovirt-engine-setup.noarch 0:4.2.7.4-1.el7 will be updated
> ---> Package ovirt-engine-setup.noarch 0:4.2.7.5-1.el7 will be an update
> ---> Package ovirt-engine-setup-base.noarch 0:4.2.7.4-1.el7 will be updated
> ---> Package ovirt-engine-setup-base.noarch 0:4.2.7.5-1.el7 will be an
> update
> ---> Package ovirt-engine-setup-plugin-ovirt-engine.noarch
> 0:4.2.7.4-1.el7 will be updated
> ---> Package ovirt-engine-setup-plugin-ovirt-engine.noarch
> 0:4.2.7.5-1.el7 will be an update
> ---> Package ovirt-engine-setup-plugin-ovirt-engine-common.noarch
> 0:4.2.7.4-1.el7 will be updated
> ---> Package ovirt-engine-setup-plugin-ovirt-engine-common.noarch
> 0:4.2.7.5-1.el7 will be an update
> ---> Package ovirt-engine-setup-plugin-vmconsole-proxy-helper.noarch
> 0:4.2.7.4-1.el7 will be updated
> ---> Package ovirt-engine-setup-plugin-vmconsole-proxy-helper.noarch
> 0:4.2.7.5-1.el7 will be an update
> ---> Package ovirt-engine-setup-plugin-websocket-proxy.noarch
> 0:4.2.7.4-1.el7 will be updated
> ---> Package ovirt-engine-setup-plugin-websocket-proxy.noarch
> 0:4.2.7.5-1.el7 will be an update
> ---> Package ovirt-engine-vmconsole-proxy-helper.noarch 0:4.2.7.4-1.el7
> will be updated
> ---> Package ovirt-engine-vmconsole-proxy-helper.noarch 0:4.2.7.5-1.el7
> will be an update
> ---> Package ovirt-engine-websocket-proxy.noarch 0:4.2.7.4-1.el7 will be
> updated
> ---> Package ovirt-engine-websocket-proxy.noarch 0:4.2.7.5-1.el7 will be
> an update
> ---> Package ovirt-release42.noarch 0:4.2.7-1.el7 will be updated
> ---> Package ovirt-release42.noarch 0:4.2.7.1-1.el7 will be an update
> --> Finished Dependency Resolution
> Error: Package: collectd-write_http-5.8.0-6.1.el7.x86_64
> (@ovirt-4.2-centos-opstools)
>            Requires: collectd(x86-64) = 5.8.0-6.1.el7
>            Removing: collectd-5.8.0-6.1.el7.x86_64
> (@ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.8.0-6.1.el7
>            Updated By: collectd-5.8.1-1.el7.x86_64 (epel)
>                collectd(x86-64) = 5.8.1-1.el7
>            Available: collectd-5.7.2-1.el7.x86_64
> (ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.7.2-1.el7
>            Available: collectd-5.7.2-3.el7.x86_64
> (ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.7.2-3.el7
>            Available: collectd-5.8.0-2.el7.x86_64
> (ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.8.0-2.el7
>            Available: collectd-5.8.0-3.el7.x86_64
> (ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.8.0-3.el7
>            Available: collectd-5.8.0-5.el7.x86_64
> (ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.8.0-5.el7
> Error: Package: collectd-disk-5.8.0-6.1.el7.x86_64
> (@ovirt-4.2-centos-opstools)
>            Requires: collectd(x86-64) = 5.8.0-6.1.el7
>            Removing: collectd-5.8.0-6.1.el7.x86_64
> (@ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.8.0-6.1.el7
>            Updated By: collectd-5.8.1-1.el7.x86_64 (epel)
>                collectd(x86-64) = 5.8.1-1.el7
>            Available: collectd-5.7.2-1.el7.x86_64
> (ovirt-4.2-centos-opstools)
>                collectd(x86-64) = 5.7.2-1.el7
>            

[ovirt-users] Re: cloud-init behaviour after reboot and growpart

2018-10-23 Thread Giulio Casella
Maybe you can try disabling unused data sources. In /etc/cloud/cloud.cfg
of el7 vm:

datasource_list: ["NoCloud", "ConfigDrive"]

If I remember correctly ovirt use ConfigDrive to pass data to VM cloud-init.

Hope this helps.

Bye,
gc


Il 23/10/2018 12:37, Nathanaël Blanchet ha scritto:
> Hi all,
> 
> After having successfully run cloud-init with the "initial run" box
> checked, I meet an issue after rebooting the el7 vm. At the boot time,
> cloud-init waits for a data source that doesn't exist anymore and I have
> to wait serveral timeouts like this one:
> 
> open 'http://169.254.169.254/openstack' with {'url':
> 'http://169.254.169.254/openstack', 'headers': {'User-Agent':
> 'Cloud-Init/0.7.9'}, 'allow_redirects': True, 'method': 'GET',
> 'timeout': 10.0} configuration
> 
> As a workaround,  I must include in the initial custom script "touch
> /etc/cloud/cloud-init.disabled" so as to the vm to boot properly.
> 
> Now I'd like cloud-init not to be fully disabled because I need it
> resizes the filesystem after the growpart step.
> 
> Can anyone help me with this?
> 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/HSXXBXHMO2GQ7FWDC5WRB6IA6MPXDCIR/


[ovirt-users] Re: IPoIB broken with ovirt 4.2.6

2018-10-09 Thread Giulio Casella
> Thanks for the heads up! We are preparing oVirt 4.2.7 RC2 today,
> I'll issue a oVirt Node 4.2.6 Async 2 in parallel, should both go
> out tomorrow.
> 
> 
> Released

You rock!
Upgraded and working fine.

Thanks,
gc
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/Q6FFXMEYETFPVMRBJSEPMIPMDFY3GTBJ/


[ovirt-users] Re: IPoIB broken with ovirt 4.2.6

2018-10-03 Thread Giulio Casella
Il 04/09/2018 12:54, Sandro Bonazzola ha scritto:
> 
> 
> 2018-09-03 16:22 GMT+02:00 Giulio Casella  <mailto:giu...@di.unimi.it>>:
> 
> Hi,
> latest ovirt node stable (4.2.6 today) introduced a bug in kernel: IP
> over infiniband is not workingh anymore after an upgrade, due to kernel
> 3.10.0-862.11.6.el7.x86_64.
> 
> You can find some detail here:
> 
> https://bugs.centos.org/view.php?id=15193
> <https://bugs.centos.org/view.php?id=15193>
> 
> dmesg is full of "failed to modify QP to RTR: -22", and the networking
> stack (in my case used to connect to storage) is broken. The interface
> can obtain an address via DHCP, but also a simple ICMP ping fails.
> 
> Does someone have news about a fix for this issue?
> 
> 
> Thanks for reporting, I wasn't aware of this issue.
> We'll issue an async respin as soon as a new kernel will be available.
> Adding this to release notes.
> 

Hi Sandro, kernel 3.10.0-862.14.4.el7 for centos (that should fix this
issue) is out since 9/28. Any news about respin of ovirt node?

Ciao,
gc
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/CBITR4GD6IELWZHDHI3PB7KKMBW56YFF/


[ovirt-users] IPoIB broken with ovirt 4.2.6

2018-09-03 Thread Giulio Casella
Hi,
latest ovirt node stable (4.2.6 today) introduced a bug in kernel: IP
over infiniband is not workingh anymore after an upgrade, due to kernel
3.10.0-862.11.6.el7.x86_64.

You can find some detail here:

https://bugs.centos.org/view.php?id=15193

dmesg is full of "failed to modify QP to RTR: -22", and the networking
stack (in my case used to connect to storage) is broken. The interface
can obtain an address via DHCP, but also a simple ICMP ping fails.

Does someone have news about a fix for this issue?

TIA,
Giulio
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/5ZJNK4ZENUJSBREZIW5OM55YLMI45B34/


Re: [ovirt-users] ovirt-guest-agent behaviour

2018-03-23 Thread Giulio Casella

Fixed!
It was a problem independent from ovirt/ovirt agent.
It was a problem in writing to /var/run/utmp, causing /usr/bin/users 
(used by ovirt-guest-agent) to show an emtpy list of connected users.


Cheers,
g


Il 23/03/2018 14:30, Giulio Casella ha scritto:

Hi,
I just installed a Fedora 27 guest, with ovirt-guest-agent.
This VM runs on oVirt (to say the truth is RedHat Virtualization version 
4.1.9.2-0.1.el7).
I noticed a strange behaviour: in the guest tab "Logged-in user" is 
always reported as None, but agent seems to be running correctly (other 
guest data as kernel version, OS, Console client IP, etc. is reported 
correctly). Nothing relevant is showing in agent log file.


Same behaviour for login via kdm and console login.

Version of installed agent is 
ovirt-guest-agent-common-1.0.14-1.fc27.noarch.


Other VMs on the same cluster are reporting correct logged-in user as 
expected (1500+ VM, Windows 7, Fedora 27, Fedora 24, CentOS, ...), so I 
think is a guest issue.


Any ideas?

TIA,
g

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] ovirt-guest-agent behaviour

2018-03-23 Thread Giulio Casella

Hi,
I just installed a Fedora 27 guest, with ovirt-guest-agent.
This VM runs on oVirt (to say the truth is RedHat Virtualization version 
4.1.9.2-0.1.el7).
I noticed a strange behaviour: in the guest tab "Logged-in user" is 
always reported as None, but agent seems to be running correctly (other 
guest data as kernel version, OS, Console client IP, etc. is reported 
correctly). Nothing relevant is showing in agent log file.


Same behaviour for login via kdm and console login.

Version of installed agent is ovirt-guest-agent-common-1.0.14-1.fc27.noarch.

Other VMs on the same cluster are reporting correct logged-in user as 
expected (1500+ VM, Windows 7, Fedora 27, Fedora 24, CentOS, ...), so I 
think is a guest issue.


Any ideas?

TIA,
g

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Shutdown all VM's command line

2018-01-16 Thread Giulio Casella

Il 16/01/2018 02:02, Wesley Stewart ha scritto:
I am using the default certificates.   Took me a second to find out 
where they are stored, but after pointing directly to it, everything is 
working like a champ.


If I remember correctly, if you use option "insecure=True", you can omit 
ca_file option:


connection = sdk.Connection(
  url=ovaddress,
  username=username,
  password=password,
  insecure=True
)


Cheers,
gc
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Python-SDK4: How to list VM user sessions?

2017-04-11 Thread Giulio Casella

On 10/04/2017 17:50, Juan Hernández wrote:

On 04/10/2017 05:38 PM, Giorgio Biacchi wrote:

...




OK, that makes sense. I think this is a bug in the server then. If the
users are not oVirt users we should just not report them, or maybe
report just the user name and domain, if available. But returning 404
and failing in that case isn't correct, in my opinion. I have opened the
following bug to track this issue:

  Don't fail with 404 if session user doesn't exist in the database
  https://bugzilla.redhat.com/1440861



Great, thank you Juan.
My preference is for reporting username and domain, instead of not 
reporting at all.


Thank you again.

Bye,
Giulio



On 04/10/2017 01:18 PM, Juan Hernández wrote:

On 04/10/2017 11:10 AM, Giulio Casella wrote:

On 07/04/2017 16:00, Juan Hernández wrote:

I have been trying to reproduce this and I wasn't able. In theory the
404 error that you get should only happen if the virtual machine
doesn't
exist, but that isn't the case.

Can you check the server.log file and share the complete stack traces
that should appear after the "HTTP 404 Not Found" message?



No problem, find attached a snippet of server.log.

Bye,
Giulio



Thanks, that helps. What the engine isn't finding is the user, not the
virtual machine. Can you provide more information about that user? I
mean, take the virtual machine and find via the GUI which user is using
it. Then go to https://.../ovirt-engine/api/users and find that user.
Share the definition of that user that you get there, if possible.


On 03/31/2017 10:25 AM, Giulio Casella wrote:

On 30/03/2017 20:05, Juan Hernández wrote:

On 03/30/2017 01:01 PM, Giulio Casella wrote:

Hi,
I'm trying to obtain a list of users connected to a VM, using
python SDK
v4.
Here's what I'm doing:

vm = vms_service.list(search="name=vmname")[0]
vm_service = vms_service.vm_service(vm.id)
sessions = vm_service.sessions_service().list()

But "sessions" is None.

Same result using:

s = connection.follow_link(vm.sessions)

"s" is None.

I tried also using curl, and if I connect to:

https://my.ovirt.host/ovirt-engine/api/v4/vms//sessions

I get a beautiful 404.

Also using v3 of python SDK I obtain the same behaviour.

So I suspect that retrieving user sessions via API is not
implemented,
is it? If not, what I'm doing wrong?

I'm using RHV 4.0.6.3-0.1.el7ev

Thanks in advance,
Giulio



Giulio, you should never get a 404 error from that URL, unless the
virtual doesn't exist or isn't visible for you. What user name are
you
to create the SDK connection? An administrator or a regular user?



I tried with a regular domain user (with superuser role assigned) and
admin@internal, with same result.


Also, please check the /var/log/ovirt-engine/server.log and
/var/log/ovirt-engine/engine.log when you send that request. Do
you see
there something relevant?


server.log reports:

2017-03-31 10:03:11,346 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n]
(default task-33) RESTEASY002010: Failed to execute:
javax.ws.rs.WebApplicationException: HTTP 404 Not Found

(no surprise here, same message obtained by curl).

engine.log is full of:

ERROR [org.ovirt.engine.core.aaa.filters.SsoRestApiAuthFilter]
(default
task-7) [] Cannot authenticate using authentication Headers:
invalid_grant: The provided authorization grant for the auth code has
expired

(indipendently of my request)

It's quite strange I can perform almost every other operation (e.g.
getting other VM parameters, running methods, etc.)




Finally, please run your script with the 'debug=True' option in the
connection, and with a log file, like here:


https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/list_vms.py#L20-L37




Then share that log file so that we can check what the server is
returning exactly. Make sure to remove your password from that log
file
before sharing it.


Find attached produced log (passwords purged).

BTW: VM is a Fedora 24, with guest agents correctly installed (I
can see
user sessions in admin portal and in postgresql DB).

Thanks,
Giulio



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users







___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users







___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Python-SDK4: How to list VM user sessions?

2017-04-10 Thread Giulio Casella

On 07/04/2017 16:00, Juan Hernández wrote:

I have been trying to reproduce this and I wasn't able. In theory the
404 error that you get should only happen if the virtual machine doesn't
exist, but that isn't the case.

Can you check the server.log file and share the complete stack traces
that should appear after the "HTTP 404 Not Found" message?



No problem, find attached a snippet of server.log.

Bye,
Giulio


On 03/31/2017 10:25 AM, Giulio Casella wrote:

On 30/03/2017 20:05, Juan Hernández wrote:

On 03/30/2017 01:01 PM, Giulio Casella wrote:

Hi,
I'm trying to obtain a list of users connected to a VM, using python SDK
v4.
Here's what I'm doing:

vm = vms_service.list(search="name=vmname")[0]
vm_service = vms_service.vm_service(vm.id)
sessions = vm_service.sessions_service().list()

But "sessions" is None.

Same result using:

s = connection.follow_link(vm.sessions)

"s" is None.

I tried also using curl, and if I connect to:

https://my.ovirt.host/ovirt-engine/api/v4/vms//sessions

I get a beautiful 404.

Also using v3 of python SDK I obtain the same behaviour.

So I suspect that retrieving user sessions via API is not implemented,
is it? If not, what I'm doing wrong?

I'm using RHV 4.0.6.3-0.1.el7ev

Thanks in advance,
Giulio



Giulio, you should never get a 404 error from that URL, unless the
virtual doesn't exist or isn't visible for you. What user name are you
to create the SDK connection? An administrator or a regular user?



I tried with a regular domain user (with superuser role assigned) and
admin@internal, with same result.


Also, please check the /var/log/ovirt-engine/server.log and
/var/log/ovirt-engine/engine.log when you send that request. Do you see
there something relevant?


server.log reports:

2017-03-31 10:03:11,346 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n]
(default task-33) RESTEASY002010: Failed to execute:
javax.ws.rs.WebApplicationException: HTTP 404 Not Found

(no surprise here, same message obtained by curl).

engine.log is full of:

ERROR [org.ovirt.engine.core.aaa.filters.SsoRestApiAuthFilter] (default
task-7) [] Cannot authenticate using authentication Headers:
invalid_grant: The provided authorization grant for the auth code has
expired

(indipendently of my request)

It's quite strange I can perform almost every other operation (e.g.
getting other VM parameters, running methods, etc.)




Finally, please run your script with the 'debug=True' option in the
connection, and with a log file, like here:


https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/list_vms.py#L20-L37


Then share that log file so that we can check what the server is
returning exactly. Make sure to remove your password from that log file
before sharing it.


Find attached produced log (passwords purged).

BTW: VM is a Fedora 24, with guest agents correctly installed (I can see
user sessions in admin portal and in postgresql DB).

Thanks,
Giulio



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users





2017-04-10 10:51:48,353 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default 
task-30) RESTEASY002010: Failed to execute: 
javax.ws.rs.WebApplicationException: HTTP 404 Not Found
at 
org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:226)
 [restapi-jaxrs.jar:]
at 
org.ovirt.engine.api.restapi.resource.BackendResource.getEntity(BackendResource.java:118)
 [restapi-jaxrs.jar:]
at 
org.ovirt.engine.api.restapi.resource.BackendResource.getEntity(BackendResource.java:98)
 [restapi-jaxrs.jar:]
at 
org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.performGet(AbstractBackendSubResource.java:34)
 [restapi-jaxrs.jar:]
at 
org.ovirt.engine.api.restapi.resource.aaa.BackendUserResource.getUserByNameAndDomain(BackendUserResource.java:77)
 [restapi-jaxrs.jar:]
at 
org.ovirt.engine.api.restapi.resource.BackendVmSessionsResource.setSessionUser(BackendVmSessionsResource.java:87)
 [restapi-jaxrs.jar:]
at 
org.ovirt.engine.api.restapi.resource.BackendVmSessionsResource.addLinksIncludingUser(BackendVmSessionsResource.java:59)
 [restapi-jaxrs.jar:]
at 
org.ovirt.engine.api.restapi.resource.BackendVmSessionsResource.list(BackendVmSessionsResource.java:42)
 [restapi-jaxrs.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.8.0_121]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
[rt.jar:1.8.0_121]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
at 
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) 
[resteasy-jaxrs.jar:3.0.19.Final-redhat-1]
at 
org.jboss.resteasy.core.ResourceMethodInvoker.invok

[ovirt-users] Desktop virtualization and thin clients

2017-04-04 Thread Giulio Casella

Hi,
I'm evaluating some thin client to connect to ovirt VMs, used as desktop 
workstations.
I really don't care about native client support, I distribute via PXE a 
custom linux OS launching remote viewer.

I'd like to have good multimedia performance, at a reasonable price.

Googling a little, I focused on a couple of vendor: https://www.igel.com 
and https://www.10zig.com/.


Anyone has already tested those vendor products? which model? which is 
the (approx.) price?

Obviously any hint on other vendors are welcome.

The scenario is composed of about 1500 VMs, running on ovirt (RHV to say 
the truth), distributed over 3 datacenters, currently accessed using old 
(5-7 years) PC, that I'm planning to renew.


TIA,
Giulio
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Python-SDK4: How to list VM user sessions?

2017-03-31 Thread Giulio Casella

On 30/03/2017 20:05, Juan Hernández wrote:

On 03/30/2017 01:01 PM, Giulio Casella wrote:

Hi,
I'm trying to obtain a list of users connected to a VM, using python SDK
v4.
Here's what I'm doing:

vm = vms_service.list(search="name=vmname")[0]
vm_service = vms_service.vm_service(vm.id)
sessions = vm_service.sessions_service().list()

But "sessions" is None.

Same result using:

s = connection.follow_link(vm.sessions)

"s" is None.

I tried also using curl, and if I connect to:

https://my.ovirt.host/ovirt-engine/api/v4/vms//sessions

I get a beautiful 404.

Also using v3 of python SDK I obtain the same behaviour.

So I suspect that retrieving user sessions via API is not implemented,
is it? If not, what I'm doing wrong?

I'm using RHV 4.0.6.3-0.1.el7ev

Thanks in advance,
Giulio



Giulio, you should never get a 404 error from that URL, unless the
virtual doesn't exist or isn't visible for you. What user name are you
to create the SDK connection? An administrator or a regular user?



I tried with a regular domain user (with superuser role assigned) and 
admin@internal, with same result.



Also, please check the /var/log/ovirt-engine/server.log and
/var/log/ovirt-engine/engine.log when you send that request. Do you see
there something relevant?


server.log reports:

2017-03-31 10:03:11,346 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] 
(default task-33) RESTEASY002010: Failed to execute: 
javax.ws.rs.WebApplicationException: HTTP 404 Not Found


(no surprise here, same message obtained by curl).

engine.log is full of:

ERROR [org.ovirt.engine.core.aaa.filters.SsoRestApiAuthFilter] (default 
task-7) [] Cannot authenticate using authentication Headers: 
invalid_grant: The provided authorization grant for the auth code has 
expired


(indipendently of my request)

It's quite strange I can perform almost every other operation (e.g. 
getting other VM parameters, running methods, etc.)





Finally, please run your script with the 'debug=True' option in the
connection, and with a log file, like here:


https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/list_vms.py#L20-L37

Then share that log file so that we can check what the server is
returning exactly. Make sure to remove your password from that log file
before sharing it.


Find attached produced log (passwords purged).

BTW: VM is a Fedora 24, with guest agents correctly installed (I can see 
user sessions in admin portal and in postgresql DB).


Thanks,
Giulio

DEBUG:root:About to connect() to rhev-manager.unicloudidattica.unimi.it port 
443 (#0)
DEBUG:root:Trying 172.21.250.100...
DEBUG:root:Connected to rhev-manager.unicloudidattica.unimi.it (172.21.250.100) 
port 443 (#0)
DEBUG:root:Initializing NSS with certpath: sql:/etc/pki/nssdb
DEBUG:root:skipping SSL peer certificate verification
DEBUG:root:SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
DEBUG:root:Server certificate:
DEBUG:root:subject: CN=rhev-manager.unicloudidattica.unimi.it,OU=Servizio 
UniCloud,O=Università degli Studi di Milano,L=MIlano,ST=Milano,C=IT
DEBUG:root:start date: Jan 03 00:00:00 2017 GMT
DEBUG:root:expire date: Jan 08 12:00:00 2020 GMT
DEBUG:root:common name: rhev-manager.unicloudidattica.unimi.it
DEBUG:root:issuer: CN=TERENA SSL CA 3,O=TERENA,L=Amsterdam,ST=Noord-Holland,C=NL
DEBUG:root:POST /ovirt-engine/sso/oauth/token HTTP/1.1
DEBUG:root:Host: rhev-manager.unicloudidattica.unimi.it
DEBUG:root:User-Agent: PythonSDK/4.0.4
DEBUG:root:Accept: application/json
DEBUG:root:Content-Length: 93
DEBUG:root:Content-Type: application/x-www-form-urlencoded
DEBUG:root:username=admin%40internal=ovirt-app-api=mypasswordhere_type=password
DEBUG:root:upload completely sent off: 93 out of 93 bytes
DEBUG:root:HTTP/1.1 200 OK
DEBUG:root:Date: Fri, 31 Mar 2017 08:14:26 GMT
DEBUG:root:Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips
DEBUG:root:Added cookie locale="en_US" for domain 
rhev-manager.unicloudidattica.unimi.it, path /, expire 3638431713
DEBUG:root:Set-Cookie: locale=en_US; path=/; HttpOnly; Max-Age=2147483647; 
Expires=Wed, 18-Apr-2085 11:28:33 GMT
DEBUG:root:X-XSS-PROTECTION: 1; MODE=BLOCK
DEBUG:root:X-CONTENT-TYPE-OPTIONS: NOSNIFF
DEBUG:root:X-FRAME-OPTIONS: SAMEORIGIN
DEBUG:root:Content-Type: application/json
DEBUG:root:Content-Length: 278
DEBUG:root:Vary: Accept-Encoding
DEBUG:root:
DEBUG:root:{"access_token":"lCVRqJmXd03jpEMvrFjCQ2X-pCeC_VH1j0MncOUdg__Ph-CYX6hkxlIVcj18kjIc9fSPenwoTUzisymf_Y584g","scope":"ovirt-app-api
 ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search 
ovirt-ext=token-info:validate","exp":"1491552866000","token_type":"bearer"}
DEBUG:root:Connection #0 to host rhev-manager.unicloudidattica.unimi.it left 
intact
DEBUG:root:Found bundle for host rhev-manager.unicloudidattica.unimi.it: 
0x208c2d0
DEBUG:root:Re-using existing connection! (#0) with host 
rhev-manager

Re: [ovirt-users] Python-SDK4: How to list VM user sessions?

2017-03-30 Thread Giulio Casella

On 30/03/2017 13:39, nico...@devels.es wrote:

Hi Giulio,

I tried to reproduce your same steps and it returns an non-empty list
for me.

In [1]: vms_serv = sys_serv.vms_service()

In [2]: vm = vms_serv.list(search='name=bleh')[0]

In [3]: vmsv = vms_serv.vm_service(vm.id)

In [4]: vmsess = vmsv.sessions_service()

In [5]: vmsess.list()
Out[5]:
[,
 ]

Are you sure a session is initiated on vmname in the moment you run the
vms_service.list(...)[0] statement?


Yes, if I print vm I obtain:



while if I print vm_service:

VmService:/vms/

and it is a real service (e.g. I can call method start, shutdown, ...)





El 2017-03-30 12:01, Giulio Casella escribió:

Hi,
I'm trying to obtain a list of users connected to a VM, using python
SDK v4.
Here's what I'm doing:

vm = vms_service.list(search="name=vmname")[0]
vm_service = vms_service.vm_service(vm.id)
sessions = vm_service.sessions_service().list()

But "sessions" is None.

Same result using:

s = connection.follow_link(vm.sessions)

"s" is None.

I tried also using curl, and if I connect to:

https://my.ovirt.host/ovirt-engine/api/v4/vms//sessions

I get a beautiful 404.

Also using v3 of python SDK I obtain the same behaviour.

So I suspect that retrieving user sessions via API is not implemented,
is it? If not, what I'm doing wrong?

I'm using RHV 4.0.6.3-0.1.el7ev

Thanks in advance,
Giulio

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


--
Giulio Casellagiulio at di.unimi.it
System and network manager
Computer Science Dept. - University of Milano
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Python-SDK4: How to list VM user sessions?

2017-03-30 Thread Giulio Casella

Hi,
I'm trying to obtain a list of users connected to a VM, using python SDK v4.
Here's what I'm doing:

vm = vms_service.list(search="name=vmname")[0]
vm_service = vms_service.vm_service(vm.id)
sessions = vm_service.sessions_service().list()

But "sessions" is None.

Same result using:

s = connection.follow_link(vm.sessions)

"s" is None.

I tried also using curl, and if I connect to:

https://my.ovirt.host/ovirt-engine/api/v4/vms//sessions

I get a beautiful 404.

Also using v3 of python SDK I obtain the same behaviour.

So I suspect that retrieving user sessions via API is not implemented, 
is it? If not, what I'm doing wrong?


I'm using RHV 4.0.6.3-0.1.el7ev

Thanks in advance,
Giulio

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] ovirt 4 reboot behaviour

2017-01-17 Thread Giulio Casella

Hi,
I noticed a different behaviour after upgrading my entire setup from 
rhev 3.6.9 to rhev 4.0.5.
A virtual machine reboot changes the host where the VM is running, also 
if the VM was started in "run once" mode with a payload specifying a 
placement policy. In version 3 the VM didn't change host across a 
reboot; and continued running in run once mode, keeping the same payload 
given at start time.
Is there a way to keep the VM running on the same host across a reboot, 
excluding the obvious (but time consuming) way of migration after reboot?


If not (but this is a request for enhancement), is it possible to 
introduce a payload for reboot (just like for "start") to specify the 
placement policy?


Thank you in advance,
gc
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Error deleting template

2016-05-02 Thread Giulio Casella

Thank you Idan,
those query solved my problem.
I really don't know when it happened, and with thousand VM running it's 
not so easy to dig into logs.


Thank you,
Giulio


Il 02/05/2016 15:39, Idan Shaby ha scritto:

Hi Giulio,

Indeed it seems that there's an inconsistency between the storage and
the database.
Somehow the template's disk was removed from the storage. Your logs
don't tell how and when.

This is what needs to be done in order to get rid of the stale entries -
run in the database:

Delete from vm_device where device_id =
'6949d47a-0d38-468e-ad4e-670372841174';
Delete from images where image_group_id =
'6949d47a-0d38-468e-ad4e-670372841174';
Delete from base_disks where disk_id =
'6949d47a-0d38-468e-ad4e-670372841174';
Delete from vm_static where vm_guid =
'6ec76d42-98a6-4094-a76c-af1b639c5b30';


If it happens again, please file a BZ with the full logs of engine and
vdsm, so we can investigate this issue.
Feel free to ask anything if you got further questions.

Regards
Idan

On Mon, May 2, 2016 at 2:36 PM, Giulio Casella <giu...@di.unimi.it
<mailto:giu...@di.unimi.it>> wrote:

Hi Idan,
you can find attached some snippet of my logs (vdsm.log from SPM
host and engine.log from manager).
Anyway I think logs are clear: there's no template on disk, only on
engine database.

My setup is composed of 3 datacenters (with clusters of 4, 4, and 6
hosts respectively). I have about a hundred templates, and about
1500 virtual machines.

The step to reproduce is quite simple: in admin portal right click
on the "damaged" template, remove. Other templates deletion work fine.

Thanks,
Giulio

Il 01/05/2016 08:37, Idan Shaby ha scritto:

Hi,

Can you please attach the engine and vdsm logs?
Also, can you describe your setup and the steps that reproduced
this error?


Thanks,
Idan

On Wed, Apr 27, 2016 at 1:47 PM, Giulio Casella
<giu...@di.unimi.it <mailto:giu...@di.unimi.it>
<mailto:giu...@di.unimi.it <mailto:giu...@di.unimi.it>>> wrote:

Hi all,
I have a problem deleting a template from admin portal.
In file /var/log/vdsm/vdsm.log (on SPM hypervisor) I got:

jsonrpc.Executor/4::ERROR::2016-04-27
10:19:57,122::hsm::1518::Storage.HSM::(deleteImage) Empty or not
found image  in SD  [...]

Looking in the (data) storage domain the disk with that UUID
doesn't
exists.
It seems I reached an inconsistent state between engine
database and
images on disk.

Is there a (safe) way to rebuild a consistent situation? Maybe
deleting entries from database?

My setup is based:
manager RHEV 3.5.8-0.1.el6ev
hypervisors: RHEV Hypervisor - 7.2 - 20160328.0.el7ev


Thanx in advance,
Giulio

___
Users mailing list
Users@ovirt.org <mailto:Users@ovirt.org>
<mailto:Users@ovirt.org <mailto:Users@ovirt.org>>
http://lists.ovirt.org/mailman/listinfo/users



--
Giulio Casellagiulio at
di.unimi.it <http://di.unimi.it>
System and network manager
Computer Science Dept. - University of Milano




___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Error deleting template

2016-04-27 Thread Giulio Casella

Hi all,
I have a problem deleting a template from admin portal.
In file /var/log/vdsm/vdsm.log (on SPM hypervisor) I got:

jsonrpc.Executor/4::ERROR::2016-04-27 
10:19:57,122::hsm::1518::Storage.HSM::(deleteImage) Empty or not found 
image  in SD  [...]


Looking in the (data) storage domain the disk with that UUID doesn't exists.
It seems I reached an inconsistent state between engine database and 
images on disk.


Is there a (safe) way to rebuild a consistent situation? Maybe deleting 
entries from database?


My setup is based:
manager RHEV 3.5.8-0.1.el6ev
hypervisors: RHEV Hypervisor - 7.2 - 20160328.0.el7ev


Thanx in advance,
Giulio

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] python floppy in RunOnce mode

2016-01-07 Thread Giulio Casella

Il 07/01/2016 11:25, Juan Hernández wrote:

[...]

The sysprep logic is only triggered once, the first time you start the
VM. So you will need to create it again, set the initialization data and
start it, basically repeat the steps that I suggested.


Yes, but the VMs belongs to a freshly created pool, never started before.


There were some bugs around this behaviour, some still not fixed in 3.5,
and it wasn't clear when the VM will use or not use sysprep, so we have
introduced a flag to explicitly force use of sysprep.

Please try to use this flag:

action = params.Action(use_sysprep=True)
vm.start(action)



Nice, use_sysprep=True did the trick!
I noticed also the flag use_cloud_init, I guess with same logic. I have 
to update my code accordingly.


Thank you again,
Giulio Casella


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Power Management with python SDK

2015-12-01 Thread Giulio Casella

Hi everybody,
I'm trying to enable power management on a host using python, but I'm stuck.

Previously (ovirt 3.5) I directly wrote power management parameters into 
PowerManagement structure (and everything was working fine), but 
starting from 3.6 this is not possible.


This is what I do now:

agent = params.Agent()
agent.set_options(params.Options())
agent.set_type("ilo3")
agent.set_username("admin")
agent.set_password("mysecret")
agent.set_address("172.20.20.1")

agents=params.Agents()
agents.add_agent(agent)

pm=params.PowerManagement()
pm.set_agents(agents)
pm.set_enabled(True)

myhost=api.hosts.get("myhost")
myhost.set_power_management(pm)
try:
myhost.update()
except Exception as e:
print "Error: %s" % e

and I get:

Error:
status: 400
reason: Bad Request
detail: Cannot edit Host. Power Management is enabled for Host but no 
Agent type selected.



If I dont't enable PM (pm.set_enabled line above) I get no error, but no 
agent is added.


My software is:
- ovirt-engine-3.6.0.3-1.el6
- ovirt-engine-sdk-python-3.6.0.3-1.el6
on a CentOS 6.6 distro.

Any ideas?

Thanks in advance,
Giulio
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Power Management with python SDK

2015-12-01 Thread Giulio Casella

Hi Juan,

Il 01/12/2015 16:48, Juan Hernández ha scritto:

On 12/01/2015 03:16 PM, Giulio Casella wrote:

Hi everybody,
I'm trying to enable power management on a host using python, but I'm stuck.

Previously (ovirt 3.5) I directly wrote power management parameters into
PowerManagement structure (and everything was working fine), but
starting from 3.6 this is not possible.

This is what I do now:

agent = params.Agent()
agent.set_options(params.Options())
agent.set_type("ilo3")
agent.set_username("admin")
agent.set_password("mysecret")
agent.set_address("172.20.20.1")

agents=params.Agents()
agents.add_agent(agent)

pm=params.PowerManagement()
pm.set_agents(agents)
pm.set_enabled(True)

myhost=api.hosts.get("myhost")
myhost.set_power_management(pm)
try:
myhost.update()
except Exception as e:
print "Error: %s" % e

and I get:

Error:
status: 400
reason: Bad Request
detail: Cannot edit Host. Power Management is enabled for Host but no
Agent type selected.


If I dont't enable PM (pm.set_enabled line above) I get no error, but no
agent is added.

My software is:
- ovirt-engine-3.6.0.3-1.el6
- ovirt-engine-sdk-python-3.6.0.3-1.el6
on a CentOS 6.6 distro.

Any ideas?

Thanks in advance,
Giulio


In 3.6 fencing agents have been converted into a sub-collection of the
host entity:

   https://.../ovirt-engine/api/hosts/{host:id}/fenceagents

This means that the recommended way to add/remove/update fencing agents
now in Python is now this:

---8<---
# Find the host:
host = api.hosts.get(name="myhost");

# Enable power management:
host.get_power_management().set_enabled(True)
host.update()

# Add the fencing agent:
agent = params.Agent()
agent.set_options(params.Options())
agent.set_type("ilo3")
agent.set_username("admin")
agent.set_password("mysecret")
agent.set_address("172.20.20.1")
agent.set_order(1);
host.fenceagents.add(agent)
--->8---


This piece of code is working, thanks! But only if host.update() is 
called after adding an agent (e.g moving host.update() at the bottom). I 
don't have any fence agent configured before, and setting enabled=True 
and calling update, lead to the 400 HTTP error.




You can use this as a workaround. However the mechanism used in 3.5
should continue working in 3.6. If it doesn't it is a bug. The script
that you shared is the one you used in 3.5?



In 3.5 I used:

myhost=api.hosts.get("myhost")
pm=params.PowerManagement(type_="ilo3",enabled=True,address="172.20.20.1",username="admin",password="mysecret")
myhost.set_power_management(pm)
myhost.update()

not working in 3.6 (according to bug 
https://bugzilla.redhat.com/show_bug.cgi?id=1118329, marked CLOSED 
WONTFIX, there is no backward compatibility).


Anyway I reached my goal, thank you!

Giulio
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] python floppy in RunOnce mode

2014-12-24 Thread Giulio Casella
I can see this behaviour in ovirt 3.5 environment 
(ovirt-engine-3.5.0.1-1.el6) and in rhev 3.4 environment 
(rhevm-3.4.3-1.2.el6ev).


I'm stuck, what I'm doing wrong? :-(




Il 23/12/2014 10:16, Giulio Casella ha scritto:

Yes, the VM is windows 7:

print myvm.get_os().get_type()

shows windows_7x64

Anyway I tried to force it, as you suggested, but with no luck...


Il 22/12/2014 17:52, Juan Hernández ha scritto:

On 12/22/2014 01:21 PM, Giulio Casella wrote:

Hi Juan,
I tried to use builtin sysprep files, with no luck.
Here is my code:

myvm = api.vms.get(name=vmname)
initialization = params.Initialization()
myvm.set_initialization(initialization)
myvm.update()
myvm.start(params.Action())

Virtual Machine starts, but there is no mounted floppy.
VM is a freshly installed Windows 7 x86_64, with ovirt guest agent and
no other software.

Any ideas?

Giulio



Is the operating system of the set to one of the Windows variants? If it
isn't set to a Windows variant then the Sysprep logic won't trigger. To
make sure you can update the OS from the script:

myvm = api.vms.get(name=vmname)
initialization = params.Initialization()
myvm.set_initialization(initialization)
myvm.set_os(
   params.OperatingSystem(
 type_=windows_7x64
   )
)
myvm.update()
myvm.start(params.Action())


Il 24/10/2014 16:08, Giulio Casella ha scritto:

Il 23/10/2014 20:59, Juan Hernandez ha scritto:

On 10/23/2014 09:40 AM, Giulio Casella wrote:

Hi,
I'm trying to boot a vm with non persistent floppy using python ovirt
sdk (the RunOnce way in administrator portal), but guest OS
can't see
floppy drive. The ultimate goal is to deploy floppy with sysprep
unattend.xml file for windows 7 pools of vm.

Here is a snippet of code I use:

-
myvm = api.vms.get(name=vmname)
content=This is file content!
f=params.File(name=foobar.txt,content=content)
fs=params.Files()
fs.add_file(f)
payload=params.Payload()
payload.set_type(floppy)
payload.set_files(fs)
payloads=params.Payloads()
payloads.add_payload(payload)
thevm=params.VM()
thevm.set_payloads(payloads)
action=params.Action(vm=thevm)

myvm.start(action=action)

xml = ParseHelper.toXml(action)
print xml
-

As you can see, for debugging purpose, I print my xml action, and
I get:

-
action
   vm
   payloads
   payload type=floppy
   files
   file
   namefoobar.txt/name
   contentThis is file content/content
   /file
   /files
   /payload
   /payloads
   /vm
/action
-

in the admin portal I can see my vm in RunOnce state, but no
floppy is
present...
In fact in the vm process command line
(ps -ef | grep qemu-kvm | grep vmname) I can't see -drive option
referring to floppy (I only see 2 -drive options, referring to vm
system disk and to a correctly mounted cdrom ISO)

What I'm doing wrong?

(The engine is RHEV-M version 3.4.1-0.31.el6ev)



The problem is that using non persistent payloads isn't currently
supported, so basically your payloads element is silently
ignored. You
have currently two alternatives:

1. Use persistent payloads:

vm = vms.get(name=myvm)
vm.set_payloads(paylaods)
vm.update()
vm.start(params.Action())

You may also want to remove the payloads once the machine is
configured,
but this isn't strictly required, as Windows will not try to locate
the
sysprep floppy in subsequent boots. The only minor inconvenient is
that
the users of the VMs will see the floopy and its content attached.



Yes, this is exactly the workaround I'm currently using, and I have to
hide floppy via AD group policy (sysprep.inf contains administrator
password).


2. Use the builtin sysprep files (they are in
/usr/share/ovirt-engine/conf/sysprep):

vm = vms.get(name=myvm)
initialization = params.Initialization()
vm.set_initialization(initialization)
vm.update()
vm.start(params.Action())

This has the advantage that the sysprep floppy will be attached to the
VM only the first time it is booted. In subsequent boots it won't be
attached.



Great hint, I'll take a look into those syspreps to see if they fit for
my setup.


In 3.5 you will also be able to use sysprep support with your custom
file:

   vm = vms.get(name=myvm)
   initialization = params.Initialization(
 custom_script=The text of your sysprep file
   )
   vm.set_initialization(initialization)
   vm.update()
   vm.start(params.Action())



Good new, eventually I'll wait for RHEV 3.5


Note that currently (in 3.4 and in 3.5) there is an issue with the
name
of the file generated by the built-in sysprep support: it will
always be
named sysprep.inf, regardless of the operating system assigned to
the
VM. If you want to use recent versions of Windows it has

Re: [ovirt-users] python floppy in RunOnce mode

2014-12-23 Thread Giulio Casella

Yes, the VM is windows 7:

print myvm.get_os().get_type()

shows windows_7x64

Anyway I tried to force it, as you suggested, but with no luck...


Il 22/12/2014 17:52, Juan Hernández ha scritto:

On 12/22/2014 01:21 PM, Giulio Casella wrote:

Hi Juan,
I tried to use builtin sysprep files, with no luck.
Here is my code:

myvm = api.vms.get(name=vmname)
initialization = params.Initialization()
myvm.set_initialization(initialization)
myvm.update()
myvm.start(params.Action())

Virtual Machine starts, but there is no mounted floppy.
VM is a freshly installed Windows 7 x86_64, with ovirt guest agent and
no other software.

Any ideas?

Giulio



Is the operating system of the set to one of the Windows variants? If it
isn't set to a Windows variant then the Sysprep logic won't trigger. To
make sure you can update the OS from the script:

myvm = api.vms.get(name=vmname)
initialization = params.Initialization()
myvm.set_initialization(initialization)
myvm.set_os(
   params.OperatingSystem(
 type_=windows_7x64
   )
)
myvm.update()
myvm.start(params.Action())


Il 24/10/2014 16:08, Giulio Casella ha scritto:

Il 23/10/2014 20:59, Juan Hernandez ha scritto:

On 10/23/2014 09:40 AM, Giulio Casella wrote:

Hi,
I'm trying to boot a vm with non persistent floppy using python ovirt
sdk (the RunOnce way in administrator portal), but guest OS can't see
floppy drive. The ultimate goal is to deploy floppy with sysprep
unattend.xml file for windows 7 pools of vm.

Here is a snippet of code I use:

-
myvm = api.vms.get(name=vmname)
content=This is file content!
f=params.File(name=foobar.txt,content=content)
fs=params.Files()
fs.add_file(f)
payload=params.Payload()
payload.set_type(floppy)
payload.set_files(fs)
payloads=params.Payloads()
payloads.add_payload(payload)
thevm=params.VM()
thevm.set_payloads(payloads)
action=params.Action(vm=thevm)

myvm.start(action=action)

xml = ParseHelper.toXml(action)
print xml
-

As you can see, for debugging purpose, I print my xml action, and I get:

-
action
   vm
   payloads
   payload type=floppy
   files
   file
   namefoobar.txt/name
   contentThis is file content/content
   /file
   /files
   /payload
   /payloads
   /vm
/action
-

in the admin portal I can see my vm in RunOnce state, but no floppy is
present...
In fact in the vm process command line
(ps -ef | grep qemu-kvm | grep vmname) I can't see -drive option
referring to floppy (I only see 2 -drive options, referring to vm
system disk and to a correctly mounted cdrom ISO)

What I'm doing wrong?

(The engine is RHEV-M version 3.4.1-0.31.el6ev)



The problem is that using non persistent payloads isn't currently
supported, so basically your payloads element is silently ignored. You
have currently two alternatives:

1. Use persistent payloads:

vm = vms.get(name=myvm)
vm.set_payloads(paylaods)
vm.update()
vm.start(params.Action())

You may also want to remove the payloads once the machine is configured,
but this isn't strictly required, as Windows will not try to locate the
sysprep floppy in subsequent boots. The only minor inconvenient is that
the users of the VMs will see the floopy and its content attached.



Yes, this is exactly the workaround I'm currently using, and I have to
hide floppy via AD group policy (sysprep.inf contains administrator
password).


2. Use the builtin sysprep files (they are in
/usr/share/ovirt-engine/conf/sysprep):

vm = vms.get(name=myvm)
initialization = params.Initialization()
vm.set_initialization(initialization)
vm.update()
vm.start(params.Action())

This has the advantage that the sysprep floppy will be attached to the
VM only the first time it is booted. In subsequent boots it won't be
attached.



Great hint, I'll take a look into those syspreps to see if they fit for
my setup.


In 3.5 you will also be able to use sysprep support with your custom
file:

   vm = vms.get(name=myvm)
   initialization = params.Initialization(
 custom_script=The text of your sysprep file
   )
   vm.set_initialization(initialization)
   vm.update()
   vm.start(params.Action())



Good new, eventually I'll wait for RHEV 3.5


Note that currently (in 3.4 and in 3.5) there is an issue with the name
of the file generated by the built-in sysprep support: it will always be
named sysprep.inf, regardless of the operating system assigned to the
VM. If you want to use recent versions of Windows it has to be named
Unattend.xml, so you will need to change the Windows template before
sealing it, adding the following registry entry:

HKEY-LOCAL-MACHINE - SYSTEM - Setup - UnattendFile = sysprep.inf

There is a bug open to avoid

Re: [ovirt-users] python floppy in RunOnce mode

2014-10-24 Thread Giulio Casella

Il 23/10/2014 20:59, Juan Hernandez ha scritto:

On 10/23/2014 09:40 AM, Giulio Casella wrote:

Hi,
I'm trying to boot a vm with non persistent floppy using python ovirt
sdk (the RunOnce way in administrator portal), but guest OS can't see
floppy drive. The ultimate goal is to deploy floppy with sysprep
unattend.xml file for windows 7 pools of vm.

Here is a snippet of code I use:

-
myvm = api.vms.get(name=vmname)
content=This is file content!
f=params.File(name=foobar.txt,content=content)
fs=params.Files()
fs.add_file(f)
payload=params.Payload()
payload.set_type(floppy)
payload.set_files(fs)
payloads=params.Payloads()
payloads.add_payload(payload)
thevm=params.VM()
thevm.set_payloads(payloads)
action=params.Action(vm=thevm)

myvm.start(action=action)

xml = ParseHelper.toXml(action)
print xml
-

As you can see, for debugging purpose, I print my xml action, and I get:

-
action
  vm
  payloads
  payload type=floppy
  files
  file
  namefoobar.txt/name
  contentThis is file content/content
  /file
  /files
  /payload
  /payloads
  /vm
/action
-

in the admin portal I can see my vm in RunOnce state, but no floppy is
present...
In fact in the vm process command line
(ps -ef | grep qemu-kvm | grep vmname) I can't see -drive option
referring to floppy (I only see 2 -drive options, referring to vm
system disk and to a correctly mounted cdrom ISO)

What I'm doing wrong?

(The engine is RHEV-M version 3.4.1-0.31.el6ev)



The problem is that using non persistent payloads isn't currently
supported, so basically your payloads element is silently ignored. You
have currently two alternatives:

1. Use persistent payloads:

   vm = vms.get(name=myvm)
   vm.set_payloads(paylaods)
   vm.update()
   vm.start(params.Action())

You may also want to remove the payloads once the machine is configured,
but this isn't strictly required, as Windows will not try to locate the
sysprep floppy in subsequent boots. The only minor inconvenient is that
the users of the VMs will see the floopy and its content attached.



Yes, this is exactly the workaround I'm currently using, and I have to 
hide floppy via AD group policy (sysprep.inf contains administrator 
password).



2. Use the builtin sysprep files (they are in
/usr/share/ovirt-engine/conf/sysprep):

   vm = vms.get(name=myvm)
   initialization = params.Initialization()
   vm.set_initialization(initialization)
   vm.update()
   vm.start(params.Action())

This has the advantage that the sysprep floppy will be attached to the
VM only the first time it is booted. In subsequent boots it won't be
attached.



Great hint, I'll take a look into those syspreps to see if they fit for 
my setup.



In 3.5 you will also be able to use sysprep support with your custom file:

  vm = vms.get(name=myvm)
  initialization = params.Initialization(
custom_script=The text of your sysprep file
  )
  vm.set_initialization(initialization)
  vm.update()
  vm.start(params.Action())



Good new, eventually I'll wait for RHEV 3.5


Note that currently (in 3.4 and in 3.5) there is an issue with the name
of the file generated by the built-in sysprep support: it will always be
named sysprep.inf, regardless of the operating system assigned to the
VM. If you want to use recent versions of Windows it has to be named
Unattend.xml, so you will need to change the Windows template before
sealing it, adding the following registry entry:

   HKEY-LOCAL-MACHINE - SYSTEM - Setup - UnattendFile = sysprep.inf

There is a bug open to avoid this:

   https://bugzilla.redhat.com/1145999

Note also that the builtin sysprep support will only trigger if the VM
has been assigned a Windows operating system.



Yes, I knew. Do you know if is there a plan to change this behaviour 
(e.g. generate filename according to guest O.S. standard)?


Many thanks,
Giulio

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] python floppy in RunOnce mode

2014-10-23 Thread Giulio Casella

Hi,
I'm trying to boot a vm with non persistent floppy using python ovirt 
sdk (the RunOnce way in administrator portal), but guest OS can't see 
floppy drive. The ultimate goal is to deploy floppy with sysprep 
unattend.xml file for windows 7 pools of vm.


Here is a snippet of code I use:

-
myvm = api.vms.get(name=vmname)
content=This is file content!
f=params.File(name=foobar.txt,content=content)
fs=params.Files()
fs.add_file(f)
payload=params.Payload()
payload.set_type(floppy)
payload.set_files(fs)
payloads=params.Payloads()
payloads.add_payload(payload)
thevm=params.VM()
thevm.set_payloads(payloads)
action=params.Action(vm=thevm)

myvm.start(action=action)

xml = ParseHelper.toXml(action)
print xml
-

As you can see, for debugging purpose, I print my xml action, and I get:

-
action
vm
payloads
payload type=floppy
files
file
namefoobar.txt/name
contentThis is file content/content
/file
/files
/payload
/payloads
/vm
/action
-

in the admin portal I can see my vm in RunOnce state, but no floppy is 
present...

In fact in the vm process command line
(ps -ef | grep qemu-kvm | grep vmname) I can't see -drive option 
referring to floppy (I only see 2 -drive options, referring to vm 
system disk and to a correctly mounted cdrom ISO)


What I'm doing wrong?

(The engine is RHEV-M version 3.4.1-0.31.el6ev)

Thanks in advance,
Giulio
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] async vm start (python)

2014-10-15 Thread Giulio Casella

Thanks Juan,
this clearify a lot of things. So starting a VM is always a synchronous 
task in the backend, isn't it?
But in some condition (heavy load of hypervisors) this task takes long 
time (up to 20/30 seconds), not really suitable for sync tasks.

Maybe I should submit a feature request...

Ciao,
gc


Il 14/10/2014 16:53, Juan Hernandez ha scritto:

On 10/14/2014 01:04 PM, Giulio Casella wrote:

Hi everybody,
I'm trying to start a VM (using python sdk) asynchronously, but I obtain
synchronous behaviour.
The engine is RHEV-M version 3.4.1-0.31.el6ev.
Here a snippet of code:

-
myvm = api.vms.get(name=VMNAME)
retval = myvm.start(params.Action(async=True))
print ParseHelper.toXml(retval)
-

and this is what I get (retval):

-
action
  asynctrue/async
  vm href=/api/vms/5aa66e96-5fdd-4562-9c7d-ae6f88e6805d
id=5aa66e96-5fdd-4562-9c7d-ae6f88e6805d
[...cut..]
  /vm
  job href=/api/jobs/5c2326c7-f25c-432f-8848-c94e80dd173b
id=5c2326c7-f25c-432f-8848-c94e80dd173b/
  status
  statecomplete/state
  /status
/action
-

status of task is always complete and the operation take some time,
few seconds to some tens of seconds (sync behaviour).

Any ideas?

Thanks in advance,
Giulio



The async parameter that you are passing to the REST API is only a
hint. It means that *if* the action performed by the backend has
associated async tasks then the REST API will not wait for them to
finish. In this particular case, the action performed by the backend
doesn't have async tasks, so the parameter is just ignored.



--
Giulio Casellagiulio at di.unimi.it
System and network manager
Computer Science Dept. - University of Milano
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] async vm start (python)

2014-10-14 Thread Giulio Casella

Hi everybody,
I'm trying to start a VM (using python sdk) asynchronously, but I obtain 
synchronous behaviour.

The engine is RHEV-M version 3.4.1-0.31.el6ev.
Here a snippet of code:

-
myvm = api.vms.get(name=VMNAME)
retval = myvm.start(params.Action(async=True))
print ParseHelper.toXml(retval)
-

and this is what I get (retval):

-
action
asynctrue/async
vm href=/api/vms/5aa66e96-5fdd-4562-9c7d-ae6f88e6805d 
id=5aa66e96-5fdd-4562-9c7d-ae6f88e6805d

[...cut..]
/vm
job href=/api/jobs/5c2326c7-f25c-432f-8848-c94e80dd173b 
id=5c2326c7-f25c-432f-8848-c94e80dd173b/

status
statecomplete/state
/status
/action
-

status of task is always complete and the operation take some time, 
few seconds to some tens of seconds (sync behaviour).


Any ideas?

Thanks in advance,
Giulio

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users