1. 25 Nov, 2008 1 commit
  2. 24 Nov, 2008 1 commit
  3. 23 Nov, 2008 1 commit
  4. 21 Nov, 2008 1 commit
  5. 23 Oct, 2008 1 commit
  6. 20 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Convert rpc.call_upload_file to use addresses · 6b294c53
      Iustin Pop authored
      This patch allows rpc.call_upload_file to use addresses (if passed), and
      also converts the ConfigWriter._DistributeConfig to pass them, since
      this is an often-done operation.
      Reviewed-by: imsnah
  7. 10 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Convert rpc module to RpcRunner · 72737a7f
      Iustin Pop authored
      This big patch changes the call model used in internode-rpc from
      standalong function calls in the rpc module to via a RpcRunner class,
      that holds all the methods. This can be used in the future to enable
      smarter processing in the RPC layer itself (some quick examples are not
      setting the DiskID from cmdlib code, but only once in each rpc call,
      There are a few RPC calls that are made outside of the LU code, and
      these calls are left as staticmethods, so they can be used without a
      class instance (which requires a ConfigWriter instance).
      Reviewed-by: imsnah
  8. 06 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Disable re-reading of config file · 3d3a04bc
      Iustin Pop authored
      Since the objects read from the config file are passed to the various
      threads, it's unsafe to re-read the config file (and throw away
      ConfigWriter._config_data). As such, we disable the re-reading of the
      file (since now the master is the owner the file, it makes not sense to
      re-read it), and any modifications to the file must be done offline,
      otherwise they will be overwritten.
      Reviewed-by: imsnah
  9. 01 Oct, 2008 5 commits
    • Michael Hanselmann's avatar
      Convert config.py · 5b263ed7
      Michael Hanselmann authored
      The configuration version is now again in the configuration file.
      Reviewed-by: iustinp
    • Michael Hanselmann's avatar
      Add new query to get cluster config values · ae5849b5
      Michael Hanselmann authored
      This can be used to retrieve certain cluster config values from
      within clients.
      OpDumpClusterConfig was not used anywhere, hence I'm just reusing
      it. The way ConfigWriter.DumpConfig returned the configuration
      was not thread-safe, anyway (no deepcopy).
      Reviewed-by: iustinp
    • Michael Hanselmann's avatar
      Move functions from ssconf.py elsewhere · 4a8b186a
      Michael Hanselmann authored
      These functions will be used to access config values instead of using
      Reviewed-by: iustinp
    • Michael Hanselmann's avatar
      Add cluster options from ssconf to configuration · f6bd6e98
      Michael Hanselmann authored
      ssconf will become write-only from ganeti-masterd's point of view,
      therefore all settings in there need to go into the main configuration
      Reviewed-by: iustinp
    • Michael Hanselmann's avatar
      Move instantiation of config into bootstrap.py · b9eeeb02
      Michael Hanselmann authored
      Future patches will add even more variables to the cluster config.
      Adding more parameters wouldn't make the function easier to use and
      it doesn't make sense to pass them to another function, as it's
      only done once in bootstrap.py on cluster initialization.
      Reviewed-by: iustinp
  10. 29 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Extend DRBD disks with shared secret attribute · f9518d38
      Iustin Pop authored
      This patch, which is similar to r1679 (Extend DRBD disks with minors
      attribute), extends the logical and physical id of the DRBD disks with a
      shared secret attribute. This is generated at disk creation time and
      saved in the config file.
      The generation of the secret is done so that we don't have duplicates in
      the configuration (otherwise the goal of preventing cross-connection
      will not be reached), so we add to config.py more than just a simple
      call to utils.GenerateSecret().
      The patch does not yet enable the use of the secrets.
      Reviewed-by: imsnah
  11. 28 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Fix a bug related to static minors · d48663e4
      Iustin Pop authored
      When the node does not yet have any minors allocated, the first minor
      (0) will not be entered in the ConfigWriter._temporary_drbds structure.
      This does not happen for our current usage, since we always ask for two
      minors (so the next call will not match this case), but it will be
      triggered if we only ask for one minor, and then ask again before adding
      the instance to the config file.
      Reviewed-by: ultrotter
  12. 27 Sep, 2008 4 commits
    • Iustin Pop's avatar
      Add checks for tcp/udp port collisions · 48ce9fd9
      Iustin Pop authored
      In case the config file is manually modified, or in case of bugs, the
      tcp/udp ports could be reused, which will create various problems
      (instances not able to start, or drbd disks not able to communicate).
      This patch extends the ConfigWriter.VerifyConfig() method (which is used
      in cluster verify) to check for duplicates between:
        - the ports used for DRBD disks
        - the ports used for network console
        - the ports marked as free in the config file
      Also, if the cluster parameter ‘highest_used_port’ is actually lower
      than the computed highest used port, this is also flagged as an error.
      The output from gnt-cluster verify will show (output manually wrapped):
      node1 # gnt-cluster verify
      * Verifying global settings
        - ERROR: tcp/udp port 11006 has duplicates: instance3.example.com/network port,
      instance2.example.com/drbd disk sda
        - ERROR: tcp/udp port 11017 has duplicates: instance3.example.com/drbd disk sda,
      instance3.example.com/drbd disk sdb, cluster/port marked as free
        - ERROR: Highest used port mismatch, saved 11010, computed 11017
      * Gathering data (2 nodes)
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Update the cluster serial_no on certain operations · b9f72b4e
      Iustin Pop authored
      This patch adds update of the cluster serial number for:
        - add/remove node (as the cluster's node list is changed)
        - add/remove/rename instance (as the cluster's instance list is changed)
        - change the volume group name
      The rule for updating this attribute is when cluster-wide properties are
      changed, but not individual node/instance ones.
      There are other remaining cases to handle, pending on the ssconf
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Initialize and update the serial_no on objects · b989e85d
      Iustin Pop authored
      This patch add initialization of the serial_no on instance and nodes,
      and update of the field whenever an object is updated in the generic
      case, via ConfigWriter.Update(obj) and in the specific case of
      instances' state being modified manually.
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Switch the global serial_no to the top object · 9d38c6e1
      Iustin Pop authored
      Currently the serial_no that is incremented every time the configuration
      file is written is located on the 'cluster' object in the configuration
      structure. However, this is wrong as the cluster serial_no should be
      incremented only when the cluster state is changed (for whatever
      definition of “changed” we will use), not simply because the
      configuration file is written.
      This patch changes so that the ConfigWriter._BumpSerialNo affects the
      top-level ConfigData object.
      Reviewed-by: ultrotter
  13. 24 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Switch config.py to logging · 74a48621
      Iustin Pop authored
      A couple of more modules are using the obsolete logger functions, config
      being one of them.
      Reviewed-by: imsnah
  14. 23 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Implement config support for drbd static minors · a81c53c9
      Iustin Pop authored
      This patch adds support for allocating static minors.
      Like for the LVM uuids, we add a new cache for the temporarily allocated
      requests, and the users of the new methods must manually clear the
      cache. If this doesn't happen, at worst we lose some minors.
      Todos remaining:
        - implement duplicate check at configuration load, and at instance
          add/instance update
        - investigate automatically cleaning the cache on instance add/update
          if the minors/instance/node pairs match
      Reviewed-by: imsnah
  15. 22 Sep, 2008 1 commit
    • Iustin Pop's avatar
      Extend DRBD disks with minors attribute · ffa1c0dc
      Iustin Pop authored
      This patch converts the DRBD disks to contain also a minor (per each
      node) attribute. This minor is not yet used and is always initialized
      with None, so the patch does not have any real-world impact - except for
      automatically upgrading config files (it adds the minors as None, None).
      Reviewed-by: imsnah
  16. 11 Sep, 2008 1 commit
  17. 10 Sep, 2008 3 commits
  18. 06 Aug, 2008 1 commit
    • Michael Hanselmann's avatar
      Implement {Add,Readd,Remove}Node in GanetiContext · d8470559
      Michael Hanselmann authored
      By doing this we've a central place which coordinates what needs to be
      done when adding or removing nodes. Another patch will add calls into
      the job queue.
      Two log messages move to config.py.
      When removing a node, node_leave_cluster is now called after it has
      been removed from the configuration and job manager. That way we're
      sure not to access the node again after files have been removed.
      Reviewed-by: iustinp
  19. 30 Jul, 2008 1 commit
    • Iustin Pop's avatar
      Fix pylint-detected issues · 38206f3c
      Iustin Pop authored
      This is mostly:
        - whitespace fix (space at EOL in some files, not all, broken
          indentation, etc)
        - variable names overriding others (one is a real bug in there)
        - too-long-lines
        - cleanup of most unused imports (not all)
      Reviewed-by: ultrotter
  20. 08 Jul, 2008 2 commits
    • Guido Trotter's avatar
      ConfigWriter: synchronize access · f78ede4e
      Guido Trotter authored
      Since we share the ConfigWriter we need somehow to make sure that
      accessing it is properly synchronized. We'll do it using the
      locking.ssynchronized decorator and a module-private shared lock.
      This patch also renames a few functions, which were called inside the
      ConfigWriter, to a private version _UnlockedFunctionName, and exports
      the synchronized public ones. The internal callers, which are already
      synchronized, are then changed to use the _Unlocked version, to prevent
      double locking.
      Reviewed-by: iustinp
    • Guido Trotter's avatar
      ConfigWriter: remove _ReleaseLock · 5b4cd1b0
      Guido Trotter authored
      Remove empty function _ReleaseLock and all its calls. Since we only
      have one configwriter per cluster the locking needs to cover all the
      data in the object, and not just the file contents. Locking in
      ConfigWriter will be handled using the ganeti locking library.
      Reviewed-by: iustinp
  21. 07 May, 2008 1 commit
  22. 05 May, 2008 2 commits
    • Guido Trotter's avatar
      Wrap exception in _DistributeConfig code · 9ff994da
      Guido Trotter authored
      nodelist.remove(X) could potentially raise a ValueError (even if the chance
      that the current node is not in the list are pretty scarce, and its absence
      should raise a red flag anyway). If this happens let things go on, as that's
      what the code which previously distributed the config did.
      Reviewed-by: iustinp
    • Guido Trotter's avatar
      Simplify target generation in DistributeConfig · 41362e70
      Guido Trotter authored
      Currently we get the list of nodes, and for each one extract all its info, and
      just to exclude it if the name matches ours. Since the list of nodes is a list
      of names just use .remove() to exclude ourself from it, and use that list
      Reviewed-by: iustinp
  23. 21 Apr, 2008 3 commits
    • Iustin Pop's avatar
      Only change instance status if not already so · 455a3445
      Iustin Pop authored
      This patch makes the _SetInstanceStatus only change the status of the
      instance (in the config file) if it's not already in the desired state.
      This skips the increase of the config serial no without actual data
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Reuse common code between MarkInstance{Up,Down} · 6a408fb2
      Iustin Pop authored
      This patch creates a new method ConfigWriter._SetInstanceStatus that
      consists of the common code between MarkInstanceUp and MarkInstanceDown.
      These two methods become wrappers over the _SetInstanceStatus.
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Abstract the json functions into a separate module · 8d14b30d
      Iustin Pop authored
      This simple patch adds a new module that holds the simplejson functions
      for serialization/deserialization. This reduces the amount of redundant
      The patch also adds some normalizations to the json output:
        - the output text will always have an EOL as last char
        - extra spaces before EOL are removed
      Reviewed-by: ultrotter
  24. 08 Apr, 2008 1 commit
    • Manuel Franceschini's avatar
      Modify LURenameInstance to support file backend · b23c4333
      Manuel Franceschini authored
      This patch does two things:
      - Modify LURenameInstance.Exec to rename directory
        when a file-based instance is renamed
      - Modify config.RenameInstance() to replace the directory name in
        config.data for file devices
      Reviewed-by: iustinp
  25. 04 Apr, 2008 1 commit
  26. 31 Mar, 2008 1 commit
  27. 27 Dec, 2007 1 commit