Alon Bar-Lev has posted comments on this change.

Change subject: utils: add ovirt-node persistence functions
......................................................................


Patch Set 2:

(3 comments)

....................................................
File lib/vdsm/utils.py
Line 890: def ovirtNodePersist(files):
Line 891:     if isOvirtNode():
Line 892:         from ovirtnode import ovirtfunctions
Line 893:         for f in files:
Line 894:             if not ovirtfunctions.is_persisted(f):
well, this is what I initially did... but:

1. it produces warning into the ovirt log.

2. we cannot know which file had error.

3. as much as I can read the function[1], it is so bad that I cannot understand 
when it returns true or false...

so I decided to revert into the safest path possible.

[1] 
http://gerrit.ovirt.org/gitweb?p=ovirt-node.git;a=blob;f=scripts/ovirtfunctions.py;h=b7bfc3782c7a9c268649b3dc14917ac594fadc84;hb=refs/heads/node-2.4.0#l609
Line 895:                 if not ovirtfunctions.ovirt_store_config([f]):
Line 896:                     raise RuntimeError("Cannot persist '%s'" % f)
Line 897: 
Line 898: 


Line 892:         from ovirtnode import ovirtfunctions
Line 893:         for f in files:
Line 894:             if not ovirtfunctions.is_persisted(f):
Line 895:                 if not ovirtfunctions.ovirt_store_config([f]):
Line 896:                     raise RuntimeError("Cannot persist '%s'" % f)
it is soooooooooooo bad.
Line 897: 
Line 898: 
Line 899: def ovirtNodeUnpersist(files):
Line 900:     if isOvirtNode():


Line 900:     if isOvirtNode():
Line 901:         from ovirtnode import ovirtfunctions
Line 902:         for f in files:
Line 903:             if ovirtfunctions.is_persisted(f):
Line 904:                 ovirtfunctions.remove_config([f])
I thought of ignoring this one... the warning is available at ovirt log... and 
there is no consistent return code[1]

what do you suggest?

[1] 
http://gerrit.ovirt.org/gitweb?p=ovirt-node.git;a=blob;f=scripts/ovirtfunctions.py;h=b7bfc3782c7a9c268649b3dc14917ac594fadc84;hb=refs/heads/node-2.4.0#l714


-- 
To view, visit http://gerrit.ovirt.org/20811
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib93af61a44a52c37faf92d6f6081babefa3a09aa
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to