[ovirt-users] Failed to check for available updates on host *** failed with message...

2017-09-06 Thread Manuel Luis Aznar
Hello there,

I am getting this error in the ovirt hosted engine:

2017-09-06 16:45:56,160+01 ERROR
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
(pool-7-thread-1) [4ff48065] EVENT_ID: HOST_AVAILABLE_UPDATES_FAILED(839),
Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: *Failed
to check for available updates on host host1.bajada.es
<http://host1.bajada.es> with message 'SSH authentication to
'r...@host1.bajada.es <r...@host1.bajada.es>' failed. Please verify
provided credentials. Make sure key is authorized at host'.*

I am up and running: *oVirt Engine Version: 4.1.1.8-1.el7.centos*.

I suppose that this error is related to SSH public and private keys. Am I
right?¿

Thanks for all in advance
Any help would be appreciated
Manuel Luis Aznar
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-05-19 Thread Manuel Luis Aznar
Hello there,

Simone it seems that with these three command before running "hosted-engine
--deploy"

   vdsm-tool configure --force
   systemcl restart libvirtd
   systemcl restart vdsmd

It is working and there is no fail.

Thanks for all in advance,
Manuel Luis Aznar

2017-05-15 17:55 GMT+01:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com>:

> Hello there,
>
> Attached to this message you have the /etc/libvirt/qemu.conf file.
>
> I will retry the installation and before launching it, I will run those
> three comands.
>
> Thanks for all in advance
> If you find something or need something ask without any problem
>
> 2017-05-15 17:54 GMT+01:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com>
> :
>
>> Hello there,
>>
>> Attached to this message you have the /etc/libvirt/qemu.conf file.
>>
>> I will retry the installation and before launching it, I will run those
>> three comands.
>>
>> Thanks for all in advance
>> If you find something or need something ask without any problem
>> Manuel
>>
>> 2017-05-12 17:21 GMT+01:00 Simone Tiraboschi <stira...@redhat.com>:
>>
>>>
>>>
>>> On Fri, May 12, 2017 at 1:31 PM, Manuel Luis Aznar <
>>> manuel.luis.az...@gmail.com> wrote:
>>>
>>>> Hello there,
>>>>
>>>> Sorry for the late response, but I haven been busy doing job things...
>>>>
>>>> I was looking at the email of Yaniv and here are the results from my
>>>> broken installation:
>>>>
>>>>  Permission on /dev/kvm and /dev/random:
>>>>
>>>> [root@host1 audit]# ls -Z /dev/kvm
>>>>  crw-rw-rw-. root kvm system_u:object_r:kvm_device_t:s0
>>>> /dev/kvm
>>>> [root@host1 audit]# ls -Z /dev/random
>>>>  crw-rw-rw-. root root system_u:object_r:random_device_t:s0
>>>> /dev/random
>>>>
>>>>  Finally about SELinux settings:
>>>>
>>>> [root@host1 audit]# ls -la /var/log/audit/audit.log
>>>> -rw---. 1 root root 575333 may 12 12:18
>>>> /var/log/audit/audit.log
>>>>
>>>> [root@host1 audit]# ls -Z /var/log/audit/audit.log
>>>> -rw---. root root system_u:object_r:auditd_log_t:s0
>>>> /var/log/audit/audit.log
>>>>
>>>> I have attached to the mail the full log audit file
>>>> (/var/log/audit/audit.log)
>>>>
>>>> Again I am sorry about the delay.
>>>>
>>>> Any answer would be very appreciated,
>>>>
>>>
>>> OK, it fails here:
>>>
>>> type=VIRT_CONTROL msg=audit(1493635665.036:776): pid=21993 uid=0
>>> auid=4294967295 ses=4294967295 subj=system_u:system_r:virtd_t:s0-s0:c0.c1023
>>> msg='virt=kvm op=start reason=booted vm="HostedEngine"
>>> uuid=92faf919-b7b1-42dc-a70c-15c6eb32ba2f vm-pid=-1
>>> exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=failed'
>>>
>>> Can you please share your /etc/libvirt/qemu.conf ?
>>>
>>> Maybe you can also try running:
>>>vdsm-tool configure --force
>>>systemcl restart libvirtd
>>>systemcl restart vdsmd
>>> and try again
>>>
>>>
>>>
>>>> Manuel
>>>>
>>>> 2017-05-07 7:46 GMT+01:00 Yaniv Kaul <yk...@redhat.com>:
>>>>
>>>>>
>>>>>
>>>>> On Thu, May 4, 2017 at 8:45 PM, Manuel Luis Aznar <
>>>>> manuel.luis.az...@gmail.com> wrote:
>>>>>
>>>>>> Hello there,
>>>>>>
>>>>>> Sorry for the delay to answer the mail, but, I have been busy doing
>>>>>> things...
>>>>>>
>>>>>> The permission on /dev/random are the following:
>>>>>>
>>>>>> [root@host1 manuel]# ls -la /dev/random
>>>>>> crw-rw-rw-. 1 root root 1, 8 may  4 18:06 /dev/random
>>>>>>
>>>>>> Suppose that these permission should look something like:
>>>>>>
>>>>>> [root@host1 manuel]# ls -la /dev/random
>>>>>> crw-rw-rw-. 1 vdsm kvm 1, 8 may  4 18:06 /dev/random
>>>>>>
>>>>>> Finally I do not know what you meant with permission on SELinux audit
>>>>>> logs?¿? Sorry for my lack of understanding, so, please let me know much
>>>>>&g

Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-05-04 Thread Manuel Luis Aznar
Hello there,

Sorry for the delay to answer the mail, but, I have been busy doing
things...

The permission on /dev/random are the following:

[root@host1 manuel]# ls -la /dev/random
crw-rw-rw-. 1 root root 1, 8 may  4 18:06 /dev/random

Suppose that these permission should look something like:

[root@host1 manuel]# ls -la /dev/random
crw-rw-rw-. 1 vdsm kvm 1, 8 may  4 18:06 /dev/random

Finally I do not know what you meant with permission on SELinux audit
logs?¿? Sorry for my lack of understanding, so, please let me know much
more precisely and I will look for it


Thanks for all in advance
I will be waiting for you
Manuel Luis Aznar

2017-05-03 15:09 GMT+01:00 Simone Tiraboschi <stira...@redhat.com>:

>
>
> On Wed, May 3, 2017 at 11:30 AM, Manuel Luis Aznar <
> manuel.luis.az...@gmail.com> wrote:
>
>> Hello Simone and all others,
>>
>> I have attached to the mail the requested files. If you have any other
>> inquiry just say it, The failed installation drive would be keep safe until
>> solving this problem.
>>
>> Thanks for all in advance
>> Manuel
>>
>
> The issue is here:
> May  1 11:47:45 host1 journal: libvirt version: 2.0.0, package: 10.el7_3.5
> (CentOS BuildSystem <http://bugs.centos.org>, 2017-03-03-02:09:45,
> c1bm.rdu2.centos.org)
> May  1 11:47:45 host1 journal: hostname: host1.bajada.es
> May  1 11:47:45 host1 journal: Falló al conectar con el socket de monitor:
> No existe el proceso
> May  1 11:47:45 host1 journal: internal error: process exited while
> connecting to monitor: /dev/random -device 
> virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7
> -msg timestamp=on#012Could not access KVM kernel module: Permission
> denied#012failed to initialize KVM: Permission denied
> May  1 11:47:45 host1 journal: libvirt version: 2.0.0, package: 10.el7_3.5
> (CentOS BuildSystem <http://bugs.centos.org>, 2017-03-03-02:09:45,
> c1bm.rdu2.centos.org)
> May  1 11:47:45 host1 journal: hostname: host1.bajada.es
> May  1 11:47:45 host1 journal: Fin de archivo al leer datos: Error de
> entrada/salida
> May  1 11:47:45 host1 journal: Fin de archivo al leer datos: Error de
> entrada/salida
>
> could you please also check the permission on /dev/random and SELinux
> audit logs?
>
>
>
>>
>> 2017-05-02 10:55 GMT+01:00 Simone Tiraboschi <stira...@redhat.com>:
>>
>>> Sure, but first we need to understand what it's happening: in our CI
>>> process everything is fine so I think it's something specific to your env.
>>> Could you please share your:
>>> /var/log/libvirt/qemu/HostedEngine.log
>>> /var/log/messages
>>>
>>> thanks,
>>> Simone
>>>
>>>
>>> On Tue, May 2, 2017 at 11:38 AM, Manuel Luis Aznar <
>>> manuel.luis.az...@gmail.com> wrote:
>>>
>>>> Ok thankyou.
>>>>
>>>> Suppose that this problem probably would be solve in a future release.
>>>>
>>>> Thanks,
>>>> Manuel
>>>>
>>>> 2017-05-02 10:35 GMT+01:00 Simone Tiraboschi <stira...@redhat.com>:
>>>>
>>>>>
>>>>>
>>>>> On Tue, May 2, 2017 at 11:30 AM, Manuel Luis Aznar <
>>>>> manuel.luis.az...@gmail.com> wrote:
>>>>>
>>>>>> Hello there again,
>>>>>>
>>>>>> Yes as I say, I have done several clean installations and the VM
>>>>>> engine sometimes starts without any problem. So Simone any recommendation
>>>>>> to make the engine VM starts properly?¿
>>>>>>
>>>>>> While is installing the HA agent and HA broker are down, would I get
>>>>>> good result by starting the services myself?¿
>>>>>>
>>>>>> Any help from Simone or somebody would be appreciated
>>>>>> Thanks for all in advance
>>>>>> Manuel Luis Aznar
>>>>>>
>>>>>
>>>>> I suggest to check libvirt logs.
>>>>>
>>>>>
>>>>>>
>>>>>> 2017-05-02 7:54 GMT+01:00 Simone Tiraboschi <stira...@redhat.com>:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, May 1, 2017 at 3:14 PM, Manuel Luis Aznar <
>>>>>>> manuel.luis.az...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello there,
>>>>>>>>
>>>>>>>> I have been looking in the internet using google why my
>>>>>>>> installation o

Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-05-02 Thread Manuel Luis Aznar
Hello there again,

Yes as I say, I have done several clean installations and the VM engine
sometimes starts without any problem. So Simone any recommendation to make
the engine VM starts properly?¿

While is installing the HA agent and HA broker are down, would I get good
result by starting the services myself?¿

Any help from Simone or somebody would be appreciated
Thanks for all in advance
Manuel Luis Aznar

2017-05-02 7:54 GMT+01:00 Simone Tiraboschi <stira...@redhat.com>:

>
>
> On Mon, May 1, 2017 at 3:14 PM, Manuel Luis Aznar <
> manuel.luis.az...@gmail.com> wrote:
>
>> Hello there,
>>
>> I have been looking in the internet using google why my installation of
>> ovirt-hosted-engine is failing.
>>
>> I have found this link:
>>
>>  https://www.mail-archive.com/users@ovirt.org/msg40864.html (Hosted
>> engine install failed; vdsm upset about broker)
>>
>> It seems to be the same error...
>>
>> So to knarra and Jamie Lawrence my question is:
>>
>> Did you manage to discover the problem?? In my instalation I am using
>> nfs and not gluster...
>>
>> I have read the error and is the same error "BrokerConnectionError: ...".
>> The ovirt-ha-agent and ovirt-ha-broker did not start when the installation
>> is creating the engine VM...
>>
>
> This is just a false positive: the HA agent and the HA broker are still
> down so vdsm is complaining but at that point it's absolutely fine by
> itself since the engine VM still doesn't exists.
> We already have an open bug to reduce the impact of that message.
>
> The real issue is that for some reason the engine VM could not start on
> your system.
>
>
>>
>> As I have said before any help would be very appreciated...no matter whom
>> will give it
>> Thanks for all in advance
>> Manuel Luis Aznar
>>
>>
>>
>> 2017-05-01 12:21 GMT+01:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com
>> >:
>>
>>> Hello Simone and all the comunity,
>>>
>>> I have been doing the instalation of ovirt hosted engine again and it
>>> fails, libvirtd and vdsmd services are failing. They are failing with the
>>> following errors:
>>>
>>>
>>> libvirt daemon
>>>
>>>   libvirtd.service - Virtualization daemon
>>>Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled;
>>> vendor preset: enabled)
>>>   Drop-In: /etc/systemd/system/libvirtd.service.d
>>>ââunlimited-core.conf
>>>Active: active (running) since lun 2017-05-01 11:43:49 WEST; 14min ago
>>>  Docs: man:libvirtd(8)
>>>http://libvirt.org
>>>  Main PID: 21993 (libvirtd)
>>>CGroup: /system.slice/libvirtd.service
>>>ââ21993 /usr/sbin/libvirtd --listen
>>>
>>> may 01 11:43:49 host1.bajada.es systemd[1]: Starting Virtualization
>>> daemon...
>>> may 01 11:43:49 host1.bajada.es systemd[1]: Started Virtualization
>>> daemon.
>>> may 01 11:47:45 host1.bajada.es libvirtd[21993]: libvirt version:
>>> 2.0.0, package: 10.el7_3.5 (CentOS BuildSystem <http://bugs.centos.org>,
>>> 2017-03-03-02:09:45, c1bm.rdu2.centos.org)
>>> may 01 11:47:45 host1.bajada.es libvirtd[21993]: hostname:
>>> host1.bajada.es
>>> may 01 11:47:45 host1.bajada.es libvirtd[21993]: Falló al conectar con
>>> el socket de monitor: No existe el proceso
>>> may 01 11:47:45 host1.bajada.es libvirtd[21993]: internal error:
>>> process exited while connecting to monitor: /dev/random -device
>>> virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7 -msg timestamp=on
>>>  Could not access KVM
>>> kernel module: Permission denied
>>>  failed to initialize
>>> KVM: Permission denied
>>>
>>> vdsm daemon
>>>
>>>   vdsmd.service - Virtual Desktop Server Manager
>>>Loaded: loaded (/usr/lib/systemd/system/vdsmd.service; enabled;
>>> vendor preset: enabled)
>>>Active: active (running) since lun 2017-05-01 11:43:51 WEST; 15min ago
>>>  Main PID: 22119 (vdsm)
>>>CGroup: /system.slice/vdsmd.service
>>>ââ22119 /usr/bin/python2 /usr/share/vdsm/vdsm
>>>ââ22612 /usr/libexec/ioprocess --read-pipe-fd 68
>>> --write-pipe-fd 67 --max-threads 10 --max-queued-requests 10
>>>ââ22630 /usr/libexec/ioprocess --read-pipe-fd 76
>>> --write-pipe-fd 75 --max-threads 10 

Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-05-01 Thread Manuel Luis Aznar
Hello there Sahina Bose

First of all thanks for your answer...

Yeah it seems there is a problem creating the Hosted Engine VM (I mean the
VM that will have the ovirt-engine). I have done the installation before
and sometimes fails and others not...

To the question: Which version on qemu-kvm are you using?

[root@host1 manuel]# yum list | grep qemu-kvm
qemu-kvm-common-ev.x86_64  10:2.6.0-28.el7_3.9.1
@ovirt-4.1-snapshot
qemu-kvm-ev.x86_64 10:2.6.0-28.el7_3.9.1
@ovirt-4.1-snapshot
qemu-kvm-ev-debuginfo.x86_64   10:2.6.0-28.el7_3.9.1
@ovirt-4.1-snapshot
qemu-kvm-tools-ev.x86_64   10:2.6.0-28.el7_3.9.1
@ovirt-4.1-snapshot
qemu-kvm.x86_6410:1.5.3-126.el7_3.6
 updates
qemu-kvm-common.x86_64 10:1.5.3-126.el7_3.6
 updates
qemu-kvm-tools.x86_64  10:1.5.3-126.el7_3.6
 updates

It seems I am using version 2.6.0. Do you know which version is fine?¿?

Thanks for all in advance
I will be waiting for an answer
Manuel Luis Aznar


2017-05-01 16:07 GMT+01:00 Sahina Bose <sab...@redhat.com>:

> There's an error creating the HE VM. Which version on qemu-kvm are you
> using?
>
> 2017-05-01 11:47:45,038+0100 ERROR (vm/92faf919) [virt.vm]
> (vmId='92faf919-b7b1-42dc-a70c-15c6eb32ba2f') The vm start process failed
> (vm:632)
> Traceback (most recent call last):
>   File "/usr/share/vdsm/virt/vm.py", line 563, in _startUnderlyingVm
> self._run()
>   File "/usr/share/vdsm/virt/vm.py", line 2021, in _run
> self._connection.createXML(domxml, flags),
>   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line
> 123, in wrapper
> ret = f(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 941, in
> wrapper
> return func(inst, *args, **kwargs)
>   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3782, in
> createXML
> if ret is None:raise libvirtError('virDomainCreateXML() failed',
> conn=self)
> libvirtError: internal error: process exited while connecting to monitor:
> /dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7
> -msg timestamp=on
> Could not access KVM kernel module: Permission denied
> failed to initialize KVM: Permission denied
>
>
> On Mon, May 1, 2017 at 6:44 PM, Manuel Luis Aznar <
> manuel.luis.az...@gmail.com> wrote:
>
>> Hello there,
>>
>> I have been looking in the internet using google why my installation of
>> ovirt-hosted-engine is failing.
>>
>> I have found this link:
>>
>>  https://www.mail-archive.com/users@ovirt.org/msg40864.html (Hosted
>> engine install failed; vdsm upset about broker)
>>
>> It seems to be the same error...
>>
>> So to knarra and Jamie Lawrence my question is:
>>
>> Did you manage to discover the problem?? In my instalation I am using
>> nfs and not gluster...
>>
>> I have read the error and is the same error "BrokerConnectionError: ...".
>> The ovirt-ha-agent and ovirt-ha-broker did not start when the installation
>> is creating the engine VM...
>>
>> As I have said before any help would be very appreciated...no matter whom
>> will give it
>> Thanks for all in advance
>> Manuel Luis Aznar
>>
>>
>>
>> 2017-05-01 12:21 GMT+01:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com
>> >:
>>
>> > Hello Simone and all the comunity,
>> >
>> > I have been doing the instalation of ovirt hosted engine again and it
>> > fails, libvirtd and vdsmd services are failing. They are failing with
>> the
>> > following errors:
>> >
>> >
>> > libvirt daemon
>> >
>> >   libvirtd.service - Virtualization daemon
>> >Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled;
>> > vendor preset: enabled)
>> >   Drop-In: /etc/systemd/system/libvirtd.service.d
>> >ââunlimited-core.conf
>> >Active: active (running) since lun 2017-05-01 11:43:49 WEST; 14min
>> ago
>> >  Docs: man:libvirtd(8)
>> >http://libvirt.org
>> >  Main PID: 21993 (libvirtd)
>> >CGroup: /system.slice/libvirtd.service
>> >ââ21993 /usr/sbin/libvirtd --listen
>> >
>> > may 01 11:43:49 host1.bajada.es systemd[1]: Starting Virtualization
>> > daemon...
>> > may 01 11:43:49 host1.bajada.es systemd[1]: Started Virtualization
>> daemon
>>
>
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-05-01 Thread Manuel Luis Aznar
Hello there,

I have been looking in the internet using google why my installation of
ovirt-hosted-engine is failing.

I have found this link:

 https://www.mail-archive.com/users@ovirt.org/msg40864.html (Hosted
engine install failed; vdsm upset about broker)

It seems to be the same error...

So to knarra and Jamie Lawrence my question is:

Did you manage to discover the problem?? In my instalation I am using
nfs and not gluster...

I have read the error and is the same error "BrokerConnectionError: ...".
The ovirt-ha-agent and ovirt-ha-broker did not start when the installation
is creating the engine VM...

As I have said before any help would be very appreciated...no matter whom
will give it
Thanks for all in advance
Manuel Luis Aznar



2017-05-01 12:21 GMT+01:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com>:

> Hello Simone and all the comunity,
>
> I have been doing the instalation of ovirt hosted engine again and it
> fails, libvirtd and vdsmd services are failing. They are failing with the
> following errors:
>
>
> libvirt daemon
>
>   libvirtd.service - Virtualization daemon
>Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled;
> vendor preset: enabled)
>   Drop-In: /etc/systemd/system/libvirtd.service.d
>ââunlimited-core.conf
>Active: active (running) since lun 2017-05-01 11:43:49 WEST; 14min ago
>  Docs: man:libvirtd(8)
>http://libvirt.org
>  Main PID: 21993 (libvirtd)
>CGroup: /system.slice/libvirtd.service
>ââ21993 /usr/sbin/libvirtd --listen
>
> may 01 11:43:49 host1.bajada.es systemd[1]: Starting Virtualization
> daemon...
> may 01 11:43:49 host1.bajada.es systemd[1]: Started Virtualization daemon.
> may 01 11:47:45 host1.bajada.es libvirtd[21993]: libvirt version: 2.0.0,
> package: 10.el7_3.5 (CentOS BuildSystem <http://bugs.centos.org>,
> 2017-03-03-02:09:45, c1bm.rdu2.centos.org)
> may 01 11:47:45 host1.bajada.es libvirtd[21993]: hostname: host1.bajada.es
> may 01 11:47:45 host1.bajada.es libvirtd[21993]: Falló al conectar con
> el socket de monitor: No existe el proceso
> may 01 11:47:45 host1.bajada.es libvirtd[21993]: internal error: process
> exited while connecting to monitor: /dev/random -device
> virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7 -msg timestamp=on
>  Could not access KVM
> kernel module: Permission denied
>  failed to initialize KVM:
> Permission denied
>
> vdsm daemon
>
>   vdsmd.service - Virtual Desktop Server Manager
>Loaded: loaded (/usr/lib/systemd/system/vdsmd.service; enabled; vendor
> preset: enabled)
>Active: active (running) since lun 2017-05-01 11:43:51 WEST; 15min ago
>  Main PID: 22119 (vdsm)
>CGroup: /system.slice/vdsmd.service
>ââ22119 /usr/bin/python2 /usr/share/vdsm/vdsm
>ââ22612 /usr/libexec/ioprocess --read-pipe-fd 68
> --write-pipe-fd 67 --max-threads 10 --max-queued-requests 10
>ââ22630 /usr/libexec/ioprocess --read-pipe-fd 76
> --write-pipe-fd 75 --max-threads 10 --max-queued-requests 10
>ââ22887 /usr/libexec/ioprocess --read-pipe-fd 44
> --write-pipe-fd 43 --max-threads 10 --max-queued-requests 10
>ââ22893 /usr/libexec/ioprocess --read-pipe-fd 52
> --write-pipe-fd 50 --max-threads 10 --max-queued-requests 10
>
> may 01 11:58:37 host1.bajada.es vdsm[22119]: vdsm
> ovirt_hosted_engine_ha.lib.brokerlink.BrokerLink ERROR Failed to connect
> to broker, the number of errors has exceeded the limit (1)
> may 01 11:58:37 host1.bajada.es vdsm[22119]: vdsm root ERROR failed to
> retrieve Hosted Engine HA info
>  Traceback (most recent call
> last):
>File
> "/usr/lib/python2.7/site-packages/vdsm/host/api.py", line 231, in
> _getHaInfo
>  stats =
> instance.get_all_stats()
>File
> "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/client/client.py",
> line 102, in get_all_stats
>  with
> broker.connection(self._retries, self._wait):
>File 
> "/usr/lib64/python2.7/contextlib.py",
> line 17, in __enter__
>  return self.gen.next()
>File
> "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py",
> line 99, in connection
>  self.connect(retries,
> wait)
>   

[ovirt-users] Default Quota could not be updated nor removed in ovirt hosted engine 4.1

2017-03-30 Thread Manuel Luis Aznar
Hello there,

It seams that there is a bug with the Default Quota, as I reported in the
subject of the email I am using oVirt Hosted Engine 4.1

When I tried to edit the Default Quota the system replies the following
with Data Center in Audit Mode:

Operation Canceled: Error while executing action: Cannot edit Quota. Quota
is not valid.

If I try to remove the Default Quota of the system, it replied:

Operation Canceled: Error while executing action: Cannot remove Quota.
Default quota cannot be changed.

In the other hand if I do the same with the Data Center in Disabled Mode
for Quota it says:

Trying to edit Default Quota I got:

Operation canceled: Error while executing action: Cannot edit Quota. Quota
is not valid.

Trying to remove Quota I got:

Operation canceled: Error while executing action: Cannot remove Quota.
Default quota cannot be changed.


Of course I can create other Quotas, edit them and remove them. The problem
is only with the Default Quota.


Any help would be appreciated, either in unblocking the system to
edit/remove Default quota...

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


Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-03-15 Thread Manuel Luis Aznar
Hello there again,

Yes that is correct. I interrupted the setup with Ctrl+C. That was because
while I was answering, at the same time, I was looking at this file, and I
saw this:

FAILED: conflicting vdsm and libvirt-qemu tls configuration.
vdsm.conf with ssl=True requires the following changes:
libvirtd.conf: listen_tcp=0, auth_tcp="sasl", listen_tls=1
qemu.conf: spice_tls=1.

So I decided to interrupt the installation, because of the error, edit the
files (vdsm.conf and qemu.conf) and then I executed the installation again
and it was successful. It seams that the change of the values in that
files, in my case, produced a successful instalation.

Sorry if my english is hard to understand, now you understand what I did.

Any question, remark just go ahead

Thanks,
Manuel



2017-03-15 11:22 GMT+00:00 Simone Tiraboschi <stira...@redhat.com>:

>
>
> On Wed, Mar 15, 2017 at 12:17 PM, Manuel Luis Aznar <
> manuel.luis.az...@gmail.com> wrote:
>
>> Hello Simone,
>>
>> The quoted lines on your last message are on lines 1238-1245 on the
>> attached log ovirt-hosted-engine-setup file.
>>
>> That file is the first hosted-engine setup. But this log file is not the
>> result of a host-engine-setup file. I start with the installation and while
>> I was answering the question I was looking to this log file for errors and
>> when I found this errors I stopped and done this:
>>
>> FAILED: conflicting vdsm and libvirt-qemu tls configuration.
>> vdsm.conf with ssl=True requires the following changes:
>> libvirtd.conf: listen_tcp=0, auth_tcp="sasl", listen_tls=1
>> qemu.conf: spice_tls=1.
>>
>> Previously to this installation I have done several installations without
>> revising this log file and always getting failed installations.
>>
>> Please its important to note that:
>>
>>  The currently setup which we are talking about was using repo 
>> "ovirt-release41-pre.rpm".
>> After correcting that two files I do the installation and in the end it was
>> completed successfully.
>>
>> When I have some time I will try to install again using the realease repo
>> "ovirt-release41.rpm"
>>
>> If you have any explanation, question or remark, please go ahead...
>>
>
> From the attached logs it seams that you voluntary interrupted the setup
> from keyboard here:
> 2017-03-07 11:23:17 DEBUG otopi.plugins.otopi.dialog.human
> dialog.__logString:204 DIALOG:SEND iptables was detected on
> your computer, do you wish setup to configure it? (Yes, No)[Yes]:
> 2017-03-07 12:06:15 DEBUG otopi.context context._executeMethod:142 method
> exception
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in
> _executeMethod
> method['method']()
>   File "/usr/share/ovirt-hosted-engine-setup/scripts/../
> plugins/gr-he-setup/network/firewall_manager.py", line 157, in
> _customization
> default=_('Yes'),
>   File "/usr/share/otopi/plugins/otopi/dialog/human.py", line 177, in
> queryString
> value = self._readline(hidden=hidden)
>   File "/usr/lib/python2.7/site-packages/otopi/dialog.py", line 246, in
> _readline
> value = self.__input.readline()
>   File "/usr/lib/python2.7/site-packages/otopi/main.py", line 53, in
> _signal
> raise RuntimeError("SIG%s" % signum)
> RuntimeError: SIG2
>
>
>
>>
>> I will report back.
>> Thanks for all in advance
>> Manuel
>>
>> 2017-03-13 17:29 GMT+00:00 Simone Tiraboschi <stira...@redhat.com>:
>>
>>>
>>>
>>> On Mon, Mar 13, 2017 at 4:08 PM, Manuel Luis Aznar <
>>> manuel.luis.az...@gmail.com> wrote:
>>>
>>>> Hello to all there again,
>>>>
>>>> I was having some troubles while installing ovirt Hosted Engine, I took
>>>> some look at the hosted engine setup logs while I was running the
>>>> hosted-engine --deploy and I found the following in the ovirt hosted engine
>>>> setup logs:
>>>>
>>>> lvm requires configuration
>>>> libvirt is not configured for vdsm yet
>>>> FAILED: conflicting vdsm and libvirt-qemu tls configuration.
>>>> vdsm.conf with ssl=True requires the following changes:
>>>> libvirtd.conf: listen_tcp=0, auth_tcp="sasl", listen_tls=1
>>>> qemu.conf: spice_tls=1.
>>>>
>>>>
>>> hosted-engine setup is already running vdsm-tool configure --force so it
>>> should configure libvirt and qemu for you, not sure why it failed.
>>

Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-03-13 Thread Manuel Luis Aznar
Hello to all there again,

I was having some troubles while installing ovirt Hosted Engine, I took
some look at the hosted engine setup logs while I was running the
hosted-engine --deploy and I found the following in the ovirt hosted engine
setup logs:

lvm requires configuration
libvirt is not configured for vdsm yet
FAILED: conflicting vdsm and libvirt-qemu tls configuration.
vdsm.conf with ssl=True requires the following changes:
libvirtd.conf: listen_tcp=0, auth_tcp="sasl", listen_tls=1
qemu.conf: spice_tls=1.

When I saw this I stopped the setup and edited this two files (vdsm.conf
and qemu.conf) set the stated configurations and run the deploy again. All
was fine and I dont have any trouble the installation finished
successfully. This was using ovirt-release41-pre.rpm repo.

I will be trying the same installation with ovirt-release41.rpm (when I
have time) and I will report what happened.

Thanks for all
Manuel Luis Aznar



2017-03-06 1:31 GMT+00:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com>:

> Hey there,
>
> I have been loking around, of course as of now the following I am going to
> say I suppose is not anything new to you:
>
> This is the status of libvirtd:
>
> â libvirtd.service - Virtualization daemon
>Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled;
> vendor preset: enabled)
>   Drop-In: /etc/systemd/system/libvirtd.service.d
>ââunlimited-core.conf
>Active: active (running) since lun 2017-03-06 01:25:05 WET; 1min 37s ago
>  Docs: man:libvirtd(8)
>http://libvirt.org
>  Main PID: 24350 (libvirtd)
>CGroup: /system.slice/libvirtd.service
>ââ24350 /usr/sbin/libvirtd --listen
>
> mar 06 01:25:05 host1.bajada.es systemd[1]: Starting Virtualization
> daemon...
> mar 06 01:25:05 host1.bajada.es systemd[1]: Started Virtualization daemon.
>
>
> After looking at the state I fire up the VM engine with the command
> "hosted-engine --vm-start" and I got the following:
>
>
> VM exists and is down, destroying it
> Machine destroyed
>
> ed786811-0321-431e-be4b-2d03764c1b02
> Status = WaitForLaunch
> nicModel = rtl8139,pv
> statusTime = 4374100040 <(437)%20410-0040>
> emulatedMachine = pc
> pid = 0
> vmName = HostedEngine
> devices = [{'index': '2', 'iface': 'ide', 'specParams': {},
> 'readonly': 'true', 'deviceId': '506df4eb-e783-4451-a8a6-993fa4dbb381',
> 'address': {'bus': '1', 'controller': '0', 'type': 'drive', 'target': '0',
> 'unit': '0'}, 'device': 'cdrom', 'shared': 'false', 'path': '', 'type':
> 'disk'}, {'index': '0', 'iface': 'virtio', 'format': 'raw', 'bootOrder':
> '1', 'poolID': '----', 'volumeID':
> '2bc39472-1a4b-4c7d-8ef9-1212182ad802', 'imageID':
> '08288fcf-6b12-4bd1-84d3-259992e7aa6d', 'specParams': {}, 'readonly':
> 'false', 'domainID': 'f44afe8d-56f9-4e1e-beee-4daa548dbad8', 'optional':
> 'false', 'deviceId': '08288fcf-6b12-4bd1-84d3-259992e7aa6d', 'address':
> {'slot': '0x06', 'bus': '0x00', 'domain': '0x', 'type': 'pci',
> 'function': '0x0'}, 'device': 'disk', 'shared': 'exclusive',
> 'propagateErrors': 'off', 'type': 'disk'}, {'device': 'scsi', 'model':
> 'virtio-scsi', 'type': 'controller'}, {'nicModel': 'pv', 'macAddr':
> '00:16:3e:65:a6:4e', 'linkActive': 'true', 'network': 'ovirtmgmt',
> 'specParams': {}, 'deviceId': '84b82c6c-bcca-4983-82d5-8d1e3ab3811a',
> 'address': {'slot': '0x03', 'bus': '0x00', 'domain': '0x', 'type':
> 'pci', 'function': '0x0'}, 'device': 'bridge', 'type': 'interface'},
> {'device': 'console', 'specParams': {}, 'type': 'console', 'deviceId':
> '6236af73-8dab-4d14-b950-fb4ad01d4420', 'alias': 'console0'}, {'device':
> 'vga', 'alias': 'video0', 'type': 'video'}, {'device': 'virtio',
> 'specParams': {'source': 'random'}, 'model': 'virtio', 'type': 'rng'}]
> guestDiskMapping = {}
> vmType = kvm
> clientIp =
> displaySecurePort = -1
> memSize = 4096
> displayPort = -1
> cpuType = Broadwell
> spiceSecureChannels = smain,sdisplay,sinputs,
> scursor,splayback,srecord,ssmartcard,susbredir
> smp = 2
> displayIp = 0
> display = vnc
> maxVCpus = 6
>
>
> After that if I look again at the status of libvirtd I obtain:
>
>
> â libvirtd.service - Virtualization daemon
>Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled;
> vendor preset: enabled)
>   Drop-In: /etc/systemd/system/libvirtd.service.d
>ââunlimited-core.conf
>Active: active (running) since lun 2017-03-06 01:25:05 WET; 5min ago
>  Docs: man:libvirtd(8)
>http://libvirt.org
>  Main PID: 24350 (libvirtd)
>C

Re: [ovirt-users] Removing all the Users Permission on Data Center

2017-03-13 Thread Manuel Luis Aznar
Hello there again,

I was fighting with the permissions yesterday night and in the end I find
out all was fine. There was an Everyone permission that confused me...

The main thing here is that we have an application that use the ovirt sdk
version 3 and we want to migrate it to the ovirt sdk version 4.

This is the function in the ovirt sdk 3 literally is (userid and dc is
string type):

def ovirt_remove_dc_permissions(userid, dc):
kvm = ovirt_connect()

u = kvm.users.get(id=userid)
for perm in u.permissions.list():
udc = perm.get_data_center()
if udc:
globaldc = kvm.datacenters.get(id=udc.get_id())
if globaldc.get_name() == dc:
perm.delete()

kvm.disconnect()

The function on the ovirt sdk 4 is:

def ovirt_remove_dc_permissions(self, userid, dc):
connection = self.ovirt_connect()

system_service = connection.system_service()
permissions_service = system_service.permissions_service()
users_service = system_service.users_service()
data_centers_service = system_service.data_centers_service()

data_center=None
for data_center_aux in data_centers_service.list():
if data_center_aux.name == dc:
data_center = data_center_aux
break

user_service = users_service.user_service(id=userid)
user_permission_service = user_service.permissions_service()

for permission in user_permission_service.list():
udc = permission.data_center
if udc:
if udc.id == data_center.id:
permission_service =
permissions_service.permission_service(id=permission.id)
permission_service.remove()

connection.close()

In the end I manage to translate from ovirt SDK v3 to ovirt SDK 4

Thanks again and sorry for this late response once more time.
Manuel


2017-02-22 16:23 GMT+00:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com>:

> Hello there,
>
> Thanks for yours answer.
>
> I will try your note.
>
> We have an oVirt test installation (very litle users and few permissions,
> so you can count permissions) and if I try to get the permissions with the
> users entry point, I got a wrong number of them.
>
> user_service = users_service.user_service(id=user.id)
>
> user_permissions_service = user_service.permissions_service()
>
> list = user_permissions_service.list()
>
> The list "list" have wrong number of permissions...Do not know if this is
> a bug or what, I will double check later on. In case I am wrong I will be
> writing to you again.
>
> Thanks again
> Manuel
>
>
>
> 2017-02-22 12:01 GMT+00:00 Ondra Machacek <omach...@redhat.com>:
>
>> On Wed, Feb 22, 2017 at 10:16 AM, Manuel Luis Aznar
>> <manuel.luis.az...@gmail.com> wrote:
>> > Hello there,
>> >
>> > I need to remove the specific Users Permission a user have in a
>> DataCenter.
>> >
>> > I manage to do it in this way:
>> >
>> > username = "..."
>> > dc = "..."
>> >
>> > system_service = connection.system_service()
>> > users_service = system_service.users_service()
>> > data_centers_service = system_service.data_centers_service()
>> >
>> > # Getting the User object
>> > for user in users_service.list():
>> > if username in user.user_name:
>> > break
>> >
>> > # Getting the DataCenter object
>> > for data_center in data_centers_service.list():
>> > if dc in data_center.name:
>> > break
>>
>> Just a note that you can use:
>>
>>data_center = data_centers_service.list(search='name=dc')[0]
>>
>>
>> >
>> > # Getting DataCenter service and its Permission Service
>> > data_center_service =
>> > data_centers_service.data_center_service(id=data_center.id)
>> > data_center_permissions_service = data_center_service.permission
>> s_service()
>> >
>> > # Getting the Permission for the User in the DataCenter
>> > for data_center_permission in data_center_permissions_service.list():
>> > data_center_permission_user = data_center_permission.user
>> > if data_center_permission_user:
>> > if data_center_permission_user.id == user.id:
>> > data_center_permission_user.remove()
>> >
>> > As you can see I can do it, but, I am using the permissions of the
>> > DataCenter and this list could be very long.
>> >
>> > In the old ovirtsdk (version 3) this was done by the following:
>> >
>> > u = kvm.users.get(id=userid)

Re: [ovirt-users] oVirt Hosted Engine Setup fails

2017-03-04 Thread Manuel Luis Aznar
Hello there again,

The error on the first email was using the repo ovirt-release41.rpm (
http://resources.ovirt.org/pub/yum-repo/ovirt-release41.rpm), so as I were
getting the same error again and again I am currently trying with
ovirt-release41-snapshot.rpm (
http://resources.ovirt.org/pub/yum-repo/ovirt-release41-snapshot.rpm) and
the result is nearly the same.

After creating the VM on the installation I got the same error with the
command "systemctl status vdsmd":

mar 04 14:10:19 host1.bajada.es vdsm[20443]: vdsm root ERROR failed to
retrieve Hosted Engine HA info

Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/vdsm/host/api.py", line
231, in _getHaInfo
  stats = instance.get_all_stats()
   File
"/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/client/client.py",
line 102, in get_all_stats
  with broker.connection(self._retries, self._wait):
   File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
  return self.gen.next()
   File
"/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py",
line 99, in connection
  self.connect(retries, wait)
   File
"/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py",
line 78, in connect
  raise BrokerConnectionError(error_msg)
 BrokerConnectionError: Failed to connect to broker, the number of
errors has exceeded the limit (1)

mar 04 14:10:34 host1.bajada.es vdsm[20443]: vdsm
ovirt_hosted_engine_ha.lib.brokerlink.BrokerLink ERROR Failed to connect to
broker, the number of errors has exceeded the limit (1)

I have noticed that the ovirt-ha-agent and ovirt-ha-broker services was not
running. I guess if this have something to do with the error in vsmd
service log.

But in this case the ovirt-hosted-engine-installation prints the vnc
connection and I can connect to the engine VM.

Thanks for all in advance
Any help would be appreciated
Manuel Luis Aznar

2017-03-03 21:48 GMT+00:00 Manuel Luis Aznar <manuel.luis.az...@gmail.com>:

> Hello there,
>
> I am having some trouble when deploying an oVirt 4.1 hosted engine
> installation.
>
> When I m just to end the installation and the hosted engine setup script
> is about to start the Vm engine (appliance) it fails saying "The VM is not
> powring up".
>
> If I double check the service vdsmd i get this error all the time:
>
> vdsm root ERROR failed to retrieve Hosted Engine HA info
>  Traceback (most recent call last):
>  File "/usr/lib/python2.7/site-packages/vdsm/host/api.py", line 231,
> in _getHaInfo
>  stats = instance.get_all_stats()
>  File 
> "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/client/client.py",
> line 102, in get_all_stats
>  with broker.connection(self._retries, self._wait):
>  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
>  return self.gen.next()
>  File 
> "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py",
> line 99, in connection
>  self.connect(retries, wait)
>  File 
> "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py",
> line 78, in connect
>  raise BrokerConnectionError(error_msg)
> BrokerConnectionError: Failed to connect to broker, the number of errors
> has exceeded the limit (1)
>
> Did anyone have experimented the same problem?¿? Any hint on How to solved
> it?¿? I have tried several times with clean installations and always
> getting the same...
>
> The host where I am trying to do the installation have CentOS 7...
>
>
> Thanks for all in advance
> Will be waiting for any hint to see what I am doing wrong...
> Manuel Luis Aznar
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] oVirt Hosted Engine Setup fails

2017-03-03 Thread Manuel Luis Aznar
Hello there,

I am having some trouble when deploying an oVirt 4.1 hosted engine
installation.

When I m just to end the installation and the hosted engine setup script is
about to start the Vm engine (appliance) it fails saying "The VM is not
powring up".

If I double check the service vdsmd i get this error all the time:

vdsm root ERROR failed to retrieve Hosted Engine HA info
 Traceback (most recent call last):
 File "/usr/lib/python2.7/site-packages/vdsm/host/api.py", line 231, in
_getHaInfo
 stats = instance.get_all_stats()
 File
"/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/client/client.py",
line 102, in get_all_stats
 with broker.connection(self._retries, self._wait):
 File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
 return self.gen.next()
 File
"/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py",
line 99, in connection
 self.connect(retries, wait)
 File
"/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py",
line 78, in connect
 raise BrokerConnectionError(error_msg)
BrokerConnectionError: Failed to connect to broker, the number of errors
has exceeded the limit (1)

Did anyone have experimented the same problem?¿? Any hint on How to solved
it?¿? I have tried several times with clean installations and always
getting the same...

The host where I am trying to do the installation have CentOS 7...


Thanks for all in advance
Will be waiting for any hint to see what I am doing wrong...
Manuel Luis Aznar
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] oVirt 4.1 Release Stops at Installing host on enrrolling serial console certificate

2017-02-26 Thread Manuel Luis Aznar
Hello there,

I am doing a very litle installation at home, just with one machine (Asus
X99-E WS and Intel Core i7 6850K), all is fine until I reached the
installation of the host (adding host).

The web admin interface get stopped and the last event is Enrrolling Serial
Console Certificate and in few litle seconds the web admin interface stops
responding. To make the web admin interface back again I need to do
engine-cleanup and engine-setup...

Hope somebody can help me,
Thanks
Manuel
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Removing all the Users Permission on Data Center

2017-02-22 Thread Manuel Luis Aznar
Hello there,

Thanks for yours answer.

I will try your note.

We have an oVirt test installation (very litle users and few permissions,
so you can count permissions) and if I try to get the permissions with the
users entry point, I got a wrong number of them.

user_service = users_service.user_service(id=user.id)

user_permissions_service = user_service.permissions_service()

list = user_permissions_service.list()

The list "list" have wrong number of permissions...Do not know if this is a
bug or what, I will double check later on. In case I am wrong I will be
writing to you again.

Thanks again
Manuel



2017-02-22 12:01 GMT+00:00 Ondra Machacek <omach...@redhat.com>:

> On Wed, Feb 22, 2017 at 10:16 AM, Manuel Luis Aznar
> <manuel.luis.az...@gmail.com> wrote:
> > Hello there,
> >
> > I need to remove the specific Users Permission a user have in a
> DataCenter.
> >
> > I manage to do it in this way:
> >
> > username = "..."
> > dc = "..."
> >
> > system_service = connection.system_service()
> > users_service = system_service.users_service()
> > data_centers_service = system_service.data_centers_service()
> >
> > # Getting the User object
> > for user in users_service.list():
> > if username in user.user_name:
> > break
> >
> > # Getting the DataCenter object
> > for data_center in data_centers_service.list():
> > if dc in data_center.name:
> > break
>
> Just a note that you can use:
>
>data_center = data_centers_service.list(search='name=dc')[0]
>
>
> >
> > # Getting DataCenter service and its Permission Service
> > data_center_service =
> > data_centers_service.data_center_service(id=data_center.id)
> > data_center_permissions_service = data_center_service.
> permissions_service()
> >
> > # Getting the Permission for the User in the DataCenter
> > for data_center_permission in data_center_permissions_service.list():
> > data_center_permission_user = data_center_permission.user
> > if data_center_permission_user:
> > if data_center_permission_user.id == user.id:
> > data_center_permission_user.remove()
> >
> > As you can see I can do it, but, I am using the permissions of the
> > DataCenter and this list could be very long.
> >
> > In the old ovirtsdk (version 3) this was done by the following:
> >
> > u = kvm.users.get(id=userid)
> > for perm in u.permissions.list():
> >udc = perm.get_data_center()
> >   if udc:
> >  globaldc = kvm.datacenters.get(id=udc.get_id())
> >  if globaldc.get_name() == dc:
> > perm.delete()
> >
> > that last piece of code iterate by the user permission list and delete
> the
> > specific Data Center permission. I have been trying this doing the
> > following:
> >
> > user_service = users_service.user_service(id=user.id)
> >
> > user_permissions_service = user_service.permissions_service()
> >
> > list = user_permissions_service.list()
> >
> > Is that last variable, list: the permissions list for the specified
> user, I
> > ask that because if I print the size of the list for an specific user,
> the
> > number I get is not correct...
>
> It should work, what do you expect to see and what do you actually see?
>
> >
> > Thanks for all in advance to all
> > Manuel
> >
> > ___
> > 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] Removing all the Users Permission on Data Center

2017-02-22 Thread Manuel Luis Aznar
Hello,

Sorry but there is a errata in this piece:

u = kvm.users.get(id=userid)
for perm in u.permissions.list():
   udc = perm.get_data_center()
  if udc:
 globaldc = kvm.datacenters.get(id=udc.get_id())
 if globaldc.get_name() == dc:
perm.delete()

The perm.delete() call is not correct and you need to put the following two
lines:

   permission_service = permissions_service.permission_service(id=
data_center_permission.id)
   permission_service.remove()

Of course you need:

 permissions_service = system_service.permissions_service()

Thanks and sorry for the errata
Manuel
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Removing all the Users Permission on Data Center

2017-02-22 Thread Manuel Luis Aznar
Hello there,

I need to remove the specific Users Permission a user have in a DataCenter.

I manage to do it in this way:

username = "..."
dc = "..."

system_service = connection.system_service()
users_service = system_service.users_service()
data_centers_service = system_service.data_centers_service()

# Getting the User object
for user in users_service.list():
if username in user.user_name:
break

# Getting the DataCenter object
for data_center in data_centers_service.list():
if dc in data_center.name:
break

# Getting DataCenter service and its Permission Service
data_center_service = data_centers_service.data_center_service(id=
data_center.id)
data_center_permissions_service = data_center_service.permissions_service()

# Getting the Permission for the User in the DataCenter
for data_center_permission in data_center_permissions_service.list():
data_center_permission_user = data_center_permission.user
if data_center_permission_user:
if data_center_permission_user.id == user.id:
data_center_permission_user.remove()

As you can see I can do it, but, I am using the permissions of the
DataCenter and this list could be very long.

In the old ovirtsdk (version 3) this was done by the following:

u = kvm.users.get(id=userid)
for perm in u.permissions.list():
   udc = perm.get_data_center()
  if udc:
 globaldc = kvm.datacenters.get(id=udc.get_id())
 if globaldc.get_name() == dc:
perm.delete()

that last piece of code iterate by the user permission list and delete the
specific Data Center permission. I have been trying this doing the
following:

user_service = users_service.user_service(id=user.id)

user_permissions_service = user_service.permissions_service()

list = user_permissions_service.list()

Is that last variable, list: the permissions list for the specified user, I
ask that because if I print the size of the list for an specific user, the
number I get is not correct...

Thanks for all in advance to all
Manuel
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] How to manage to update the Quota limits parameters (cpu, memory and disk)

2017-02-17 Thread Manuel Luis Aznar
Hello there,

I want to update the quota limit parameters for vcpu, memory and disk, but
I dont find the way.

I manage to get the actual values but I am unable to manage how to update
this values.

I am doing the following (I ommit the imports and conection stuff):

  system_service = connection.system_service()

  data_centers_service = system_service.data_centers_service()

  data_center = data_centers_service.list(search='name=Prueba2')[0]

  data_center_service = data_centers_service.data_center_service(id=
data_center.id)

  quotas_service = data_center_service.quotas_service()

  quota = quotas_service.list()[0]

  quota_service = quotas_service.quota_service(id=quota.id)

  quota_cluster_limits_service =
quota_service.quota_cluster_limits_service()

  quotaclusterlimit = quota_cluster_limits_service.list()[0]

  quota_storage_limits_service =
quota_service.quota_storage_limits_service()

quotastoragelimit = quota_storage_limits_service.list()[0]

if after that I print the following:
  quotaclusterlimit.memory_limit
  quotaclusterlimit.vcpu_limit
  quotastoragelimit.limit

i see the actual values of the limits, but, I m not able to update that
values (I have been testing on how to do it). It seems that the only method
that let you update anything on a quota is using:

   quota_service.add(quota=...)

I start creating a new quota object with these new limits by doing the
following:

  new_quotastoragelimit = ovirtsdk4.types.QuotaStorageLimit(limit=100)
  new_quotaclusterlimit =
ovirtsdk4.types.QuotaClusterLimit(memory_limit=100,vcpu_limit=10)

  new_quota =
ovirtsdk4.types.Quota(quota_cluster_limits=new_quotaclusterlimit,
quota_storage_limits=new_quotastoragelimit)

  quota_service.update(quota=new_quota)

I have directly tried to edit the printed values directly and then doing
the update but I got nothing (got event in the engine but the limit did not
change)

  quotaclusterlimit.memory_limit =100
  quotaclusterlimit.vcpu_limit = 10
  quotastoragelimit.limit = 100
  quota_service.update(quota=quota) # updating quota with itself

I suppose that there would be a way on how to this, so if you can help, i
will really appreciate you.

Thanks for all in advance to all
Manuel
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Getting error while trying to add VmPool using ovirtsdk4 version of the python api

2017-02-10 Thread Manuel Luis Aznar
Hello there,

I am trying to add a VmPool to oVirt using the python ovirtSDK4 with
following lines:

I am omitting the import packages lines and connection lines.



system_service = connection.system_service()

vm_pools_service = system_service.vm_pools_service()

templates_service = system_service.templates_service()

clusters_service = system_service.clusters_service()

tplist = templates_service.list(search='name=prueba')

tpl=None
biggest=-1
for t in tplist:
 ver = t.version
 if ver.version_number > biggest:
 biggest = ver.version_number
 tid = t.id
 tpl = t

c = None
for cluster in clusters_service.list():
if cluster.name == 'Pruebacluster':
c = cluster

pool = ovirtsdk4.types.VmPool(name='PRUEBA',size=1,type
=ovirtsdk4.types.VmPoolType('manual'),template=tpl,cluster=c)
vm_pools_service.add(pool=pool)



I am getting the following error:

   Fault reason is "Request syntactically incorrect.". Fault detail is "For
correct usage, see:
https://ovirt.example.com/ovirt-engine/api/v4/model#services/vm-pools/methods/add;.
HTTP  response code is 400.

I am a newbie in using this version of the API, suppose this is quite easy
problem.

Thanks for all the answers to come,
Manuel
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users