1. 14 Oct, 2008 21 commits
    • Iustin Pop's avatar
      Remove old instance attributes · bf766476
      Iustin Pop authored
      Reviewed-by: ultrotter
      bf766476
    • Iustin Pop's avatar
      Change over to beparams · 338e51e8
      Iustin Pop authored
      This big patch changes the master code to use the beparams. Errors might
      have crept in, but it passes a small burnin.
      
      Reviewed-by: ultrotter
      338e51e8
    • Iustin Pop's avatar
      Change the backend to use the beparams · 51de46bf
      Iustin Pop authored
      The backend.FinalizeExport function is changed to use the beparams
      instead of the instance attributes. Future enhancements should be done
      in order to export and import/reuse the whole be/hv params.
      
      Reviewed-by: ultrotter
      51de46bf
    • Iustin Pop's avatar
      Change hypervisors to use the beparams · 8b3fd458
      Iustin Pop authored
      This patch changes the hypervisor functions to use the beparams dict
      instead of the instance attributes.
      
      Reviewed-by: ultrotter
      8b3fd458
    • Iustin Pop's avatar
      Correctly fill the beparams too over RPC · 5b442704
      Iustin Pop authored
      As for the hvparams, we need to replace the sent instance beparams.
      
      Reviewed-by: ultrotter
      5b442704
    • Iustin Pop's avatar
      Add cli function for beparams validation · a604f165
      Iustin Pop authored
      This is used to validate the parameters in both “gnt-instance add” and
      “gnt-backup import”.
      
      Reviewed-by: ultrotter
      a604f165
    • Iustin Pop's avatar
      Modify the beparams constants · cd3ab26e
      Iustin Pop authored
      Memory is renamed for easier use.
      
      Reviewed-by: ultrotter
      cd3ab26e
    • Iustin Pop's avatar
      Fix a bug with instance creation and hvparameters · 8705eb96
      Iustin Pop authored
      When creating an instance, we need to check not the opcode hvparams, but
      the final, filled hvparams against validity. While we do this for the
      remote node calls (i.e. ValidateParams), we didn't do this for
      CheckParameterSyntax.
      
      Reviewed-by: imsnah
      8705eb96
    • Iustin Pop's avatar
      Allow instance info to only query the config file · 57821cac
      Iustin Pop authored
      This patch adds a new '-s' parameter to ‘gnt-instance info’ that makes
      it return only 'static' information. This is much faster, especially for
      drbd instances.
      
      This is a forward-port of rev 1570 on the ganeti-1.2 branch, resending
      due to some conflicts.
      
      Reviewed-by: imsnah
      57821cac
    • Iustin Pop's avatar
      Convert gnt-instance info to the hvparams model · 24838135
      Iustin Pop authored
      Some informations are not printed nicely (e.g. “virtual CDROM: False”),
      but this is the first step.
      
      Reviewed-by: imsnah
      24838135
    • Iustin Pop's avatar
      Change gnt-instance modify to the hvparams model · 74409b12
      Iustin Pop authored
      Reviewed-by: imsnah
      74409b12
    • Iustin Pop's avatar
      Change gnt-instance list to the hvparams model · 5018a335
      Iustin Pop authored
      This is just a change of the various hvm_ and pvm parameters to the hv
      model. Parameters are queried via hv/$name or via the whole dict as
      returned by hvparams.
      
      Reviewed-by: ultrotter,imsnah
      5018a335
    • Iustin Pop's avatar
      Switch instance hypervisor parameters to hvparams · 6785674e
      Iustin Pop authored
      This big patch changes instance create to the new hvparams structure.
      Old parameters are removed, so old jobs or old instances file will break
      current clusters.
      
      Reviewed-by: ultrotter
      6785674e
    • Iustin Pop's avatar
      Temporary fix for dual hvm/pvm instances · f23b5ae8
      Iustin Pop authored
      We have a problem with the current model of combining instance lists
      from multiple hypervisors: we don't allow duplicates, but "xm list"
      gives the same output for both pvm and hvm. This is a lack in the actual
      xen hypervisor implementation/split between pvm and hvm, but for now we
      implement a weak workaround: identical instance params will be allowed,
      and merged. This breaks because there is a delta in listing, and should
      be treated as temporary workaround only.
      
      Note that there are two cases for duplicate instance: the above one (xen
      is the same, whether pvm or hvm), and the other case, the real error,
      when we have two different hypervisors reporting the same instance name.
      The latter case needs to be handled better (not by refusing to list the
      instances in the backend).
      
      Reviewed-by: ultrotter
      f23b5ae8
    • Iustin Pop's avatar
      Implement FillHV for instance-related rpc calls · 26ba2bd8
      Iustin Pop authored
      We fill the instance hvparams with cluster defaults, and send a modified
      dict over the wire to the node methods - they don't know anything about
      cluster defaults versus instance parameters.
      
      Reviewed-by: ultrotter
      26ba2bd8
    • Iustin Pop's avatar
      Export the hypervisor.ValidateParameters over RPC · 6217e295
      Iustin Pop authored
      The newly-added node-specific ValidateParams hypervisor method is
      exported over RPC, using the semi-standard (success, message) return
      value. Multi-node call, so that we call on both primary and secondary at
      once.
      
      Reviewed-by: ultrotter
      6217e295
    • Iustin Pop's avatar
      Implement the new hypervisor API in base/xen · f48148c3
      Iustin Pop authored
      This patch adds the new methods CheckParameterSyntax and the
      ValidateParameters in the base and xen hypervisors. It also changes the
      xen hypervisor to use the new hvparams field on instance.
      
      Reviewed-by: imsnah
      f48148c3
    • Michael Hanselmann's avatar
      Get rid of httperror module · 937e4814
      Michael Hanselmann authored
      This was a leftover from the early days of the remote API in Ganeti 1.2.
      
      Reviewed-by: ultrotter
      937e4814
    • Iustin Pop's avatar
      Implement parameter removal in SplitKeyVal · fcd62d84
      Iustin Pop authored
      This patch adds paramter removal in SplitKeyVal, by prefixing a
      value-less key with "-"; this is needed in resetting parameters back to
      cluster defaults, but care must be applied now that None can come from
      the parser.
      
      Reviewed-by: imsnah
      fcd62d84
    • Iustin Pop's avatar
      Add the hv/be params object attributes · 5bf7b5cf
      Iustin Pop authored
      This patch adds the instance and cluster be/hvparams attributes, and the
      Fill* methods on the cluster object. Nothing else is changes, except
      that these attributes exist now on the objects.
      
      Reviewed-by: ultrotter
      5bf7b5cf
    • Iustin Pop's avatar
      Add constants for the HV/BE parameter names · e64b8beb
      Iustin Pop authored
      Since we don't want the string values of the parameters (e.g.
      “kernel_path”) spread over the code, we introduce constants for these.
      
      Reviewed-by: ultrotter,schreiberal
      e64b8beb
  2. 13 Oct, 2008 4 commits
    • Iustin Pop's avatar
      Fix a few rpc-related errors · 16ad1a83
      Iustin Pop authored
      This fixes:
        - whitespace change, double lines between methods
        - duplication of call_upload_file, introduced by mistake in rev 1795
          and which went undetected because of the many changes in that ref
          (only diff -b shows it clearly)
        - call_instance_info didn't pass the hypervisor name parameter, but
          the backend requires it
      
      Reviewed-by: ultrotter
      16ad1a83
    • Iustin Pop's avatar
      Add two new options types for CLI usage · a8469393
      Iustin Pop authored
      For the new 2.0-style command line options, we need to parse strings of
      the type:
        ident:key=val[,...]
      and
        key=val[,...]
      
      This patch adds two new option builders for these two, which return
      (ident, {key=val,}) and {key=val,} for the above two formats. It also
      handles specially constructs of type “key” (val is set to True) and
      “no_key” (val is set to False, and the ‘no_’ prefix is stripped).
      
      Reviewed-by: imsnah
      a8469393
    • Iustin Pop's avatar
      Some small typos on design docs · 2d8ed1fe
      Iustin Pop authored
      Reviewed-by: imsnah
      2d8ed1fe
    • Iustin Pop's avatar
      Update the cluster parameters design doc · ca8ac26a
      Iustin Pop authored
      As discussed, we update the design doc with the three classes of
      parameters and other changes.
      
      Reviewed-by: imsnah
      ca8ac26a
  3. 12 Oct, 2008 1 commit
    • Iustin Pop's avatar
      Abstract checking own address into a function · caad16e2
      Iustin Pop authored
      Currently, we check if we have a given ip address (i.e. it's alive on
      one of our interfaces) but manually calling TcpPing(source=localhost).
      This works, but having it spread all over the code makes it hard to
      change the implementation.
      
      The patch abstracts this into a separate utils.OwnIpAddress(addr)
      function. We add a rpc call for it, which we use instead of the
      (single-use of) call_node_tcp_ping. We leave node_tcp_ping in, as seems
      useful and eventually it should be removed in a separate patch.
      
      Reviewed-by: imsnah
      caad16e2
  4. 10 Oct, 2008 11 commits
    • Michael Hanselmann's avatar
      Mark call_node_leave_cluster as a static method · 15396f60
      Michael Hanselmann authored
      Reviewed-by: iustinp
      15396f60
    • Guido Trotter's avatar
      OS API: support for multiple versions in an OS · 082a7f91
      Guido Trotter authored
      Allow multiple api versions in an OS. This is according to the OS API
      changes design doc, by which an OS can support multiple versions of the
      Ganeti API and if one is supported by Ganeti it will work. Since up to
      version 5 of the API mandates an OS could support only one version, this
      change is retrocompatible with it and requires no version bump up.
      
      Reviewed-by: iustinp
      082a7f91
    • Guido Trotter's avatar
      LUVerifyCluster: fix error from rpc call · 2eb78bc8
      Guido Trotter authored
      When calling node_verify leads to an error _VerifyNodes tries to iterate
      over a non-sequence. Catch the error before and avoid this from
      happening.
      
      Reviewed-by: iustinp
      2eb78bc8
    • Michael Hanselmann's avatar
      Convert ganeti-noded to new HTTP server class · cc28af80
      Michael Hanselmann authored
      Reviewed-by: iustinp
      cc28af80
    • Michael Hanselmann's avatar
      Add new HTTP server implementation · 42242313
      Michael Hanselmann authored
      This patch adds another implementation of an HTTP server. It's
      based on code of Python's BaseHTTPServer, from both version
      2.4 and 3k. In the future we can write code to decide whether
      we should fork for a request or not. Keep-alive is not supported.
      
      Reviewed-by: iustinp
      42242313
    • Michael Hanselmann's avatar
      Add daemon library with mainloop · 821d9e43
      Michael Hanselmann authored
      This mainloop can be used in daemons like ganeti-noded.
      
      Reviewed-by: iustinp
      821d9e43
    • Iustin Pop's avatar
      Some updates on the job queue design doc · e9f242e4
      Iustin Pop authored
      This clarifies the job storage and the reason for choosing it.
      
      Reviewed-by: imsnah
      e9f242e4
    • René Nussbaumer's avatar
      Update design-2.0-job-queue to reflect changes · 93c4f7f1
      René Nussbaumer authored
      With change 1773 a new status WAITLOCK was introduced if a job/opcode is
      waiting for a lock. This change updates the document about the job-queue
      accordingly.
      
      Reviewed-by: iustinp
      93c4f7f1
    • 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,
      etc.).
      
      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
      72737a7f
    • Iustin Pop's avatar
      Cleanup in cmdlib for standalone function calls · b9bddb6b
      Iustin Pop authored
      This patch is a cleanup of the standalone functions in cmdlib. Many of
      them too as argument a ConfigWriter instance, but some also took other
      parameters from the lu (e.g. proc), and in the future, if we want to
      also pass the RpcRunner, we would have to add yet another parameter.
      
      One option is to make all these methods of top-level LogicalUnit class.
      I took another approach, and made (almost) all these functions take as
      first parameter the lu instance. It's like methods, just not declared
      under LogicalUnit.
      
      Reviewed-by: imsnah
      b9bddb6b
    • Iustin Pop's avatar
      Small random fixes · 7b3a8fb5
      Iustin Pop authored
      Indentation in bootstrap was wrong and some names in cmdlib.py were not
      right.
      
      Reviewed-by: imsnah
      7b3a8fb5
  5. 09 Oct, 2008 1 commit
  6. 08 Oct, 2008 2 commits