[node-patches] Change in ovirt-node[master]: Update reboot task to run async from installer and install m...
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Mon May 6 07:55:00 UTC 2013
Fabian Deutsch has posted comments on this change.
Change subject: Update reboot task to run async from installer and install module
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(3 inline comments)
Hey,
as said in a comment - there is a daemon module in python27+ which can be used (http://www.python.org/dev/peps/pep-3143/).
For 2.6 I'd look if the daemon module is ported or add this fallback.
....................................................
File src/ovirt/node/utils/system.py
Line 61: """Determin if a HostVG is present on this system (indicates an existing
Line 62: installation)
Line 63: """
Line 64: return os.path.exists("/dev/HostVG")
Line 65:
there should be 2 lines between functions
Line 66: def which(file):
Line 67: ret = None
Line 68: if os.path.abspath(file) and os.path.exists(file):
Line 69: ret = file
Line 75: break
Line 76: if ret is None:
Line 77: raise RuntimeError("Cannot find command '%s'" % file)
Line 78: return ret
Line 79:
as above: 2 lines between functions
Line 80: class SystemRelease(base.Base):
Line 81: """Informations about the OS based on /etc/system-release-cpe
Line 82:
Line 83: Use openscap_api.cpe.name_new(str) from openscap-python for an official
Line 260: #ovirtfunctions.is_upgrade()
Line 261: return self._model.retrieve()["upgrade"] is True
Line 262:
Line 263:
Line 264: class TimedReboot(base.Base):
For python2.7+ there is a "standard daemon process library" http://www.python.org/dev/peps/pep-3143/ which I'd rather liek to use.
I'm happy to use this code in any branch which is run on python2.6
Line 265: def simpleDaemon(self, main, args=(), kwargs={}):
Line 266: # Default maximum for the number of available file descriptors.
Line 267: MAXFD = 1024
Line 268:
--
To view, visit http://gerrit.ovirt.org/14491
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1b4e048ff56b8c9ebd49a82b3d5546c7c326df8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list