1. 26 9月, 2012 2 次提交
  2. 21 9月, 2012 1 次提交
  3. 30 8月, 2012 1 次提交
    • L
      network: get vlan info for Open vSwitch interfaces from proper source · b3bd5d6c
      Laine Stump 提交于
      This bug was revealed by the crash described in
      
        https://bugzilla.redhat.com/show_bug.cgi?id=852383
      
      The vlan info pointer sent to virNetDevOpenvswitchAddPort should never
      be non-NULL unless there is at least one tag. The factthat such a vlan
      info pointer was receveid pointed out that a caller was passing the
      wrong pointer. Instead of sending &net->vlan, the result of
      virDomainNetGetActualVlan(net) should be sent - that function will
      look for vlan info in net->data.network.actual->vlan, and in cany case
      return NULL instead of a pointer if the vlan info it finds has no
      tags.
      
      Aside from causing the crash, sending a hardcoded &net->vlan has the
      effect of ignoring vlan info from a <network> or <portgroup> config.
      b3bd5d6c
  4. 21 8月, 2012 1 次提交
  5. 17 8月, 2012 1 次提交
  6. 07 8月, 2012 1 次提交
  7. 30 7月, 2012 9 次提交
    • D
      Improve error message in LXC startup with network is not active · ac97c2ba
      Daniel P. Berrange 提交于
      If an LXC container is using a virtual network and that network
      is not active, currently the user gets a rather unhelpful
      error message about tap device setup failure. Add an explicit
      check for whether the network is active, in exactly the same
      way as the QEMU driver
      ac97c2ba
    • D
      Add handling for reboots of LXC containers · cb612ee4
      Daniel P. Berrange 提交于
      The reboot() syscall is allowed by new kernels for LXC containers.
      The LXC controller can detect whether a reboot was requested
      (instead of a normal shutdown) by looking at the "init" process
      exit status. If a reboot was triggered, the exit status will
      record SIGHUP as the kill reason.
      
      The LXC controller has cleared all its capabilities, and the
      veth network devices will no longer exist at this time. Thus
      it cannot restart the container init process itself. Instead
      it emits an event which is picked up by the LXC driver in
      libvirtd. This will then re-create the container, using the
      same configuration as it was previously running with (ie it
      will not activate 'newDef').
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cb612ee4
    • D
      Run an RPC protocol over the LXC controller monitor · 9117fcb2
      Daniel P. Berrange 提交于
      This defines a new RPC protocol to be used between the LXC
      controller and the libvirtd LXC driver. There is only a
      single RPC message defined thus far, an asynchronous "EXIT"
      event that is emitted just before the LXC controller process
      exits. This provides the LXC driver with details about how
      the container shutdown - normally, or abnormally (crashed),
      thus allowing the driver to emit better libvirt events.
      
      Emitting the event in the LXC controller requires a few
      little tricks with the RPC service. Simply calling the
      virNetServiceClientSendMessage does not work, since this
      merely queues the message for asynchronous processing.
      In addition the main event loop is no longer running at
      the point the event is emitted, so no I/O is processed.
      
      Thus after invoking virNetServiceClientSendMessage it is
      necessary to mark the client as being in "delayed close"
      mode. Then the event loop is run again, until the client
      completes its close - this happens only after the queued
      message has been fully transmitted. The final complexity
      is that it is not safe to run virNetServerQuit() from the
      client close callback, since that is invoked from a
      context where the server is locked. Thus a zero-second
      timer is used to trigger shutdown of the event loop,
      causing the controller to finally exit.
      
      * src/Makefile.am: Add rules for generating RPC protocol
        files and dispatch methods
      * src/lxc/lxc_controller.c: Emit an RPC event immediately
        before exiting
      * src/lxc/lxc_domain.h: Record the shutdown reason
        given by the controller
      * src/lxc/lxc_monitor.c, src/lxc/lxc_monitor.h: Register
        RPC program and event handler. Add callback to let
        driver receive EXIT event.
      * src/lxc/lxc_process.c: Use monitor exit event to decide
        what kind of domain event to emit
      * src/lxc/lxc_protocol.x: Define wire protocol for LXC
        controller monitor.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9117fcb2
    • D
      Move LXC monitor code out into separate file · de4b32e4
      Daniel P. Berrange 提交于
      Move the code that handles the LXC monitor out of the
      lxc_process.c file and into lxc_monitor.{c,h}
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      de4b32e4
    • D
      Convert the LXC driver to use virNetClient · 357866c3
      Daniel P. Berrange 提交于
      Update the LXC driver to use the virNetClient APIs for
      connecting to the libvirt_lxc monitor, instead of the
      low-level socket APIs. This is a step towards running
      a full RPC protocol with libvirt_lxc
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      357866c3
    • D
      Replace use of lxcError with virReportError · 4343fee0
      Daniel P. Berrange 提交于
      Update all LXC code to use virReportError instead of the custom
      lxcError macro
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      4343fee0
    • D
      Rename lxc_driver_t to virLXCDriver · 19354715
      Daniel P. Berrange 提交于
      Rename the lxc_driver_t struct typedef to virLXCDriver to more
      closely follow normal libvirt naming conventions
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      19354715
    • D
      Rename all APIs in lxc_domain.c to have a virLXCDomain prefix · ced272ef
      Daniel P. Berrange 提交于
      For consistency all the APIs in the lxc_domain.c file should
      have a virLXCDomain prefix in their name
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ced272ef
    • D
      Rename all APIs in lxc_process.c to have a virLXCProcess prefix · eaf10b84
      Daniel P. Berrange 提交于
      For consistency all the APIs in the lxc_process.c file should
      have a virLXCProcess prefix in their name
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      eaf10b84
  8. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  9. 19 7月, 2012 1 次提交