[ovirt-users] ovirt-ha-agent cpu usage

Gianluca Cecchi gianluca.cecchi at gmail.com
Mon Apr 24 21:59:37 UTC 2017


On Fri, Oct 7, 2016 at 3:35 PM, Simone Tiraboschi <stirabos at redhat.com>
wrote:

>
>
>
> If I can apply the patch also to 4.0.3 I'm going to see if there is then a
> different behavior.
> Let me know,
>
>
> I'm trying it right now.
> Any other tests will be really appreciated.
>
> The patch is pretty simply, you can apply that on the fly.
> You have to shutdown ovirt-ha-broker and ovirt-ha-agent; then you could
> directly edit
> /usr/lib/python2.7/site-packages/api/vdsmapi.py
> around line 97 changing from
> loaded_schema = yaml.load(f)
> to
> loaded_schema = yaml.load(f, Loader=yaml.CLoader)
> Please pay attention to keep exactly the same amount of initial spaces.
>
> Then you can simply restart the HA agent and check.
>
>

Hello,
I'm again registering high spikes of ovirt-ha-agent with only 2-3 VMs up
and with almost no activity
The package of the involved file
/usr/lib/python2.7/site-packages/api/vdsmapi.py
is now at veriosn vdsm-api-4.19.4-1.el7.centos.noarch and I see that the
file contains this kind of lines

    129         try:
    130             for path in paths:
    131                 with open(path) as f:
    132                     if hasattr(yaml, 'CLoader'):
    133                         loader = yaml.CLoader
    134                     else:
    135                         loader = yaml.Loader
    136                     loaded_schema = yaml.load(f, Loader=loader)
    137
    138                 types = loaded_schema.pop('types')
    139                 self._types.update(types)
    140                 self._methods.update(loaded_schema)
    141         except EnvironmentError:
    142             raise SchemaNotFound("Unable to find API schema file")

So there is a conditional statement...
How can I be sure that "loader" is set to "yaml.CLoader" that was what in
4.0 was able to lower the cpu usage of ovirt-ha-agent?
Thanks,
Gianluca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170424/38bb7aae/attachment.html>


More information about the Users mailing list