From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13264 invoked by alias); 30 Aug 2013 20:37:53 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 13230 invoked by uid 48); 30 Aug 2013 20:37:51 -0000 From: "jlebon at redhat dot com" To: systemtap@sourceware.org Subject: [Bug runtime/13078] investigate qemu virtio-serial channel for talking to stap-sh Date: Fri, 30 Aug 2013 20:37:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jlebon at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00209.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=13078 --- Comment #11 from Jonathan Lebon --- I created a udev rules file as well as a systemd template service file which placed together in the VM spawns a stapsh instance for each detected port of the type org.systemtap.[0-9]* (naming not formalized yet). Pretty sweet! So all we would need to do is to make these files part of systemtap-runtime for users to install in their VM (no added dependencies!) and on the host side have stap-vm add the ports to the VM's definition to get the whole thing working. For systems that do not have systemd, we can have a simple bash script which looks for any of the org.systemtap.* ports and starts up one stapsh for each of them (or exits if no ports are found). It would be helpful to make this script long-lived, respawning any of the stapsh instances as they exit. A minor issue is SELinux. It blocks qemu from creating sockets anywhere other than in a directory with the qemu_var_run_t context. One good location satisfying this is /var/lib/libvirt/qemu (recommended by dberrange in BZ598533#c6). The last major hurdle left is permissions. We have no issues on the guest side since systemd/init spawns stapsh. However, on the host side, the UNIX socket is created with qemu:qemu 755. There are no options to change this. These permissions come from a umask(022) call in libvirtd, which qemu then inherits. I'll have to contact the libvirt guys to see if they have any ideas. -- You are receiving this mail because: You are the assignee for the bug.