Gal Hammer has posted comments on this change.
Change subject: agent: Added APT package list support (BZ#838632)
......................................................................
Patch Set 2: (3 inline comments)
....................................................
File ovirt-guest-agent/GuestAgentLinux2.py
Line 47: for _, _, pkg in pkg.provides_list:
Line 48: if pkg.parent_pkg.current_state ==
INSTALLED_STATE:
Line 49: detail = (app,
pkg.parent_pkg.current_ver.ver_str)
Line 50: apps.append("%s-%s" % (detail))
Line 51: logging.debug("apt_list_packages returns: %s" % (str(apps)))
Better to put the logging in the common LinuxDataRetriver.getApplications
method. That way both rpm and apt will benefit from it.
Line 52: return apps
Line 53:
Line 54: def __init__(self):
Line 55: try:
Line 56: # RHEL and Fedora should have the rpm package available
Line 57: import rpm
Line 58: self.rpm = rpm
Line 59: self.list_pkgs = self.rpm_list_packages
Line 60: except:
Please don't catch all exceptions. It will mask other errors. Write the
exception your expect and handle it (import error in this case).
I prefer to use the /etc/redhat-release as it is possible that a Debian system
will have the rpm module installed.
Line 61: try:
Line 62: # Debian should have apt
Line 63: from apt import apt_pkg
Line 64: apt_pkg.init()
....................................................
File ovirt-guest-agent/ovirt-guest-agent.conf
Line 7: heart_beat_rate = 5
Line 8: report_user_rate = 10
Line 9: report_application_rate = 120
Line 10: report_disk_usage = 300
Line 11: applications_list = kernel ovirt-guest-agent xorg-x11-drv-qxl
linux-image xserver-xorg-video-qxl
Maybe it should be should solved in the autogen/configure level, but for now I
agree with Michal.
Line 12: ignored_fs = rootfs tmpfs autofs cgroup selinuxfs udev mqueue nfsd
proc sysfs devtmpfs hugetlbfs rpc_pipefs devpts securityfs debugfs binfmt_misc
Line 13:
Line 14: [virtio]
Line 15:
--
To view, visit http://gerrit.ovirt.org/8642
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I42d9d599b1effdd1b8c205ac9523e9b31922cd73
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-guest-agent
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Gal Hammer <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches