[ovirt-devel] rounding microseconds in vm conf update

Valentina Makarova makarovavs07 at gmail.com
Wed Jun 21 20:35:21 UTC 2017


Hello!

Ovirt sdk process updating of vm template with rounding of microseconds in
creation_time.
And vm is marked as vm which has a newer configuration because of this, but
there is not a new configuration, all difference between current
configuration and next_run configuration is creation_time. It is not
correct.
  For example, diff between curl get-request for this state of vm  and
next_run state is:
[ovirt-system-tests]$ diff current_state.txt next_state.txt
55c55
<     <creation_time>2017-06-14T06:18:03*.987*-04:00</creation_time>
---
>     <creation_time>2017-06-14T06:18:03*.000*-04:00</creation_time>
76a77

And example how to request update for reach rounding is a test in
ovirt_system_test:

@ovirtlago.testlib.with_ovirt_api
def update_round(api):
    vm = api.vms.get('vm0') #there vm.creation_time.isoformat() is a real
datetime with microseconds
    vm.update() #after this  vm.creation_time.isoformat() contains a real
datetime with microseconds,
    #but vm becames vm with newer configuration and
    # next_run creation time becomes rounded to seconds

Does anyone have idea how to fix this?

Sincerely, Valentina Makarova
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20170621/66416f15/attachment.html>


More information about the Devel mailing list