Skip to content
Snippets Groups Projects
  1. Nov 30, 2011
  2. Nov 24, 2011
    • Michael Hanselmann's avatar
      ConfigWriter: Fix epydoc error · 1730d4a1
      Michael Hanselmann authored
      
      The parameter is called “mods”, not “modes”.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarAndrea Spadaccini <spadaccio@google.com>
      1730d4a1
    • Michael Hanselmann's avatar
      LUGroupAssignNodes: Fix node membership corruption · 218f4c3d
      Michael Hanselmann authored
      
      Note: This bug only manifests itself in Ganeti 2.5, but since the
      problematic code also exists in 2.4, I decided to fix it there.
      
      If a node was assigned to a new group using “gnt-group assign-nodes” the
      node object's group would be changed, but not the duplicate member list
      in the group object. The latter is an optimization to require fewer
      locks for other operations. The per-group member list is only kept in
      memory and not written to disk.
      
      Ganeti 2.5 starts to make use of the data kept in the per-group member
      list and consequently fails when it is out of date. The following
      commands can be used to reproduce the issue in 2.5 (in 2.4 the issue was
      confirmed using additional logging):
      
        $ gnt-group add foo
        $ gnt-group assign-nodes foo $(gnt-node list --no-header -o name)
        $ gnt-cluster verify  # Fails with KeyError
      
      This patch moves the code modifying node and group objects into
      “config.ConfigWriter” to do the complete operation under the config
      lock, and also to avoid making use of side-effects of modifying objects
      without calling “ConfigWriter.Update”. A unittest is included.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      218f4c3d
  3. Nov 14, 2011
  4. Oct 27, 2011
  5. Oct 20, 2011
  6. Oct 18, 2011
  7. Oct 12, 2011
    • Michael Hanselmann's avatar
      rpc: Disable HTTP client pool and reduce memory consumption · 05927995
      Michael Hanselmann authored
      
      We noticed that “ganeti-masterd” can use large amounts of memory,
      especially on large clusters. Measurements showed a single PycURL client
      using about 500 kB of heap memory (the actual usage depends on versions,
      build options and settings).
      
      The RPC client uses a per-thread HTTP client pool with one client per
      node. At this time there are 41 non-main threads (25 for the job queue
      and 16 for client requests). This means the HTTP client pools use a lot
      of memory (ca. 200 MB for 10 nodes, ca. 1 GB for 50 nodes).
      
      This patch disables the per-thread HTTP client pool. No cleanup of
      unused code is done. That will be done in the master branch only.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      05927995
  8. Sep 06, 2011
  9. Aug 26, 2011
  10. Aug 23, 2011
  11. Aug 19, 2011
  12. Aug 05, 2011
  13. Aug 04, 2011
  14. Aug 03, 2011
  15. Jul 28, 2011
  16. Jul 26, 2011
  17. Jul 25, 2011
  18. Jul 22, 2011
  19. Jul 11, 2011
    • Michael Hanselmann's avatar
      ht: Add new check for numbers · 697f49d5
      Michael Hanselmann authored
      
      Places which receive floats can usually also deal with integers, e.g.
      OpTestDelay. Tests are added and the new check function is used for the
      aforementioned opcode and verifying query results.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      697f49d5
    • Michael Hanselmann's avatar
      Fix off-by-one bug in job serial generation · 3c88bf36
      Michael Hanselmann authored
      
      Commit 009e73d0 (September 2009) changed the job queue to generate
      multiple job serials at once. Ever since it would return one more than
      requested.
      
      The “serial” file in the job queue directory is defined to contain the
      “last job ID used” (design-2.0). With the change above, the serial file
      would always contain the next serial number. The first value returned by
      the generating function was the one contained in the file, so during the
      switch in 2009 one job may have been overwritten.
      
      This patch changes the code to always return the exact number of
      serials, to keep the last used serial on disk and adds an assertion.
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      3c88bf36
  20. Jul 01, 2011
  21. Jun 28, 2011
    • Iustin Pop's avatar
      Fix bug in recreate-disks for DRBD instances · b768099e
      Iustin Pop authored
      
      The new functionality in 2.4.2 for recreate-disks to change nodes is
      broken for DRBD instances: it simply changes the nodes without caring
      for the DRBD minors mapping, which will lead to conflicts in non-empty
      clusters.
      
      This patch changes Exec() method of this LU significantly, to both fix
      the DRBD minor usage and make sure that we don't have partial
      modification to the instance objects:
      
      - the first half of the method makes all the checks and computes the
        needed configuration changes
      - the second half then performs the configuration changes and
        recreates the disks
      
      This way, instances will either be fully modified or not at all;
      whether the disks are successfully recreate is another point, but at
      least we'll have the configuration sane.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      b768099e
    • Iustin Pop's avatar
      Fix a lint warning · 78ff9e8f
      Iustin Pop authored
      
      Patch db8e5f1c removed the use of feedback_fn, hence pylint warn
      now.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      78ff9e8f
  22. Jun 27, 2011
    • Apollon Oikonomopoulos's avatar
      KVM: configure bridged NICs at migration start · cc8a8ed7
      Apollon Oikonomopoulos authored
      
      Commit 5d9bfd87 moved tap interface handling from KVM to Ganeti, partly
      to also solve the problem of routed interfaces getting configured too
      early during live migrations, causing network anomalies. In that
      direction, configuration of NICs of incoming instances was deferred to
      FinalizeMigration time.
      
      However, this causes minor issues with bridged interfaces; KVM sends out
      an ARP-like packet upon migration finish, which is lost because the tap
      interface is not yet configured. As a consequence, intermediate network
      equipment (i.e. switches) does not get notified about the topology
      change, until the instance transmits another packet after the bridge has
      been configured, or the switch's ARP cache expires.
      
      The proper solution to that is to support different phases in network
      configuration (pre/post migration), which also requires separate ifup
      scripts. Until then we fall back to configuring bridged interfaces on
      incoming instances at migration start, instead of finish.
      
      Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      cc8a8ed7
    • Iustin Pop's avatar
      96747bda
    • Iustin Pop's avatar
      Fix bug in drbd8 replace disks on current nodes · db8e5f1c
      Iustin Pop authored
      
      Currently the drbd8 replace-disks on the same node (i.e. -p or -s) has
      a bug in that it does modify the instance disk temporarily before
      changing it back to the same value. However, we don't need to, and
      shouldn't do that: what this operation do is simply change the LVM
      configuration on the node, but otherwise the instance disks keep the
      same configuration as before.
      
      In the current code, this change back-and-forth is fine *unless* we
      fail during attaching the new LVs to DRBD; in which case, we're left
      with a half-modified disk, which is entirely wrong.
      
      So we change the code in two ways:
      
      - use temporary copies of the disk children in the old_lvs var
      - stop updating disk.children
      
      Which means that the instance should not be modified anymore (except
      maybe for SetDiskID, which is a legacy and unfortunate decision that
      will have to cleaned up sometime).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      db8e5f1c
Loading