Meghal .B. Gosalia has uploaded a new change for review. Change subject: Provide configuration options for socket name and socket extension ......................................................................
Provide configuration options for socket name and socket extension For GuestQemuAgent Collector, it provides the flexibility to configure socket name and socket extension in addition to socket path. Change-Id: Idf7d915f7bb3e5544625aa16205765e4099c6f57 Signed-off-by: Meghal Gosalia <meg...@yahoo-inc.com> --- M doc/mom-balloon+ksm.conf M doc/mom-balloon.conf M mom/Collectors/GuestQemuAgent.py 3 files changed, 39 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/mom refs/changes/08/28608/1 diff --git a/doc/mom-balloon+ksm.conf b/doc/mom-balloon+ksm.conf index e7b50d4..167742d 100644 --- a/doc/mom-balloon+ksm.conf +++ b/doc/mom-balloon+ksm.conf @@ -86,9 +86,21 @@ [Collector: GuestQemuAgent] # Set the base path where the host-side sockets for guest communication can be # found. The GuestQemuAgent Collector will try to open the socket: -# <socket_path>/<guest-name>.agent +# <socket_path>/<socket_name>.<guest-name>.<socket_extension> socket_path: /var/lib/libvirt/qemu +# Set the socket name +# Default is org.qemu.guest_agent.0 +# The GuestQemuAgent Collector will try to open the socket: +# <socket_path>/<socket_name>.<guest-name>.<socket_extension> +socket_name: org.qemu.guest_agent.0 + +# Set the socket extension +# Default is sock +# The GuestQemuAgent Collector will try to open the socket: +# <socket_path>/<socket_name>.<guest-name>.<socket_extension> +socket_extension: sock + [Collector: GuestNetworkDaemon] # Helper program to convert guest names to IP addresses. This is only used by # the GuestNetworkDaemon Collector. See doc/name-to-ip for an example. diff --git a/doc/mom-balloon.conf b/doc/mom-balloon.conf index 9ba3217..9044a65 100644 --- a/doc/mom-balloon.conf +++ b/doc/mom-balloon.conf @@ -86,9 +86,21 @@ [Collector: GuestQemuAgent] # Set the base path where the host-side sockets for guest communication can be # found. The GuestQemuAgent Collector will try to open the socket: -# <socket_path>/<guest-name>.agent +# <socket_path>/<socket_name>.<guest-name>.<socket_extension> socket_path: /var/lib/libvirt/qemu +# Set the socket name +# Default is org.qemu.guest_agent.0 +# The GuestQemuAgent Collector will try to open the socket: +# <socket_path>/<socket_name>.<guest-name>.<socket_extension> +socket_name: org.qemu.guest_agent.0 + +# Set the socket extension +# Default is sock +# The GuestQemuAgent Collector will try to open the socket: +# <socket_path>/<socket_name>.<guest-name>.<socket_extension> +socket_extension: sock + [Collector: GuestNetworkDaemon] # Helper program to convert guest names to IP addresses. This is only used by # the GuestNetworkDaemon Collector. See doc/name-to-ip for an example. diff --git a/mom/Collectors/GuestQemuAgent.py b/mom/Collectors/GuestQemuAgent.py index d2ed8b5..393ef7a 100644 --- a/mom/Collectors/GuestQemuAgent.py +++ b/mom/Collectors/GuestQemuAgent.py @@ -43,6 +43,19 @@ socket_path = properties['config']['socket_path'] except KeyError: socket_path = '/var/lib/libvirt/qemu' + + try: + socket_name = properties['config']['socket_name'] + except KeyError: + socket_name = 'org.qemu.guest_agent.0.' + + try: + socket_extension = properties['config']['socket_extension'] + except KeyError: + socket_extension = 'sock' + + self.sockets = [ None, "%s/%s.%s.%s" % (socket_path, socket_name, self.name, socket_extension) ] + self.sockets = [ None, "%s/%s.agent" % (socket_path, self.name) ] self.agent = None self.logger = logging.getLogger('mom.Collectors.GuestQemuAgent') -- To view, visit http://gerrit.ovirt.org/28608 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf7d915f7bb3e5544625aa16205765e4099c6f57 Gerrit-PatchSet: 1 Gerrit-Project: mom Gerrit-Branch: master Gerrit-Owner: Meghal .B. Gosalia <meghalgosa...@gmail.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches