Skip to content
Snippets Groups Projects
  1. Aug 22, 2012
    • Dimitris Aragiorgis's avatar
      Modify instance client to support networks · 24a6bd31
      Dimitris Aragiorgis authored
      
      Add --no-conflicts-check option.
      Modify instance query methods to return nic's network info.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      24a6bd31
    • Dimitris Aragiorgis's avatar
      Peripheral changes for networks · d45473fb
      Dimitris Aragiorgis authored
      
      Specifically:
       * export a new environment variable for the gnt-os-interface
       * export a new environment variable for KVM specific scripts
       * ovf support for networks
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      d45473fb
    • Dimitris Aragiorgis's avatar
      Modify LUInstanceSetParams() to support networks · 100c6d1a
      Dimitris Aragiorgis authored
      
      Keep backwards compatibility just like LUInstanceCreate() and
      support network parameter for NIC object.
      
      Add ec_id argument in Update() to be able to commit temporary
      IPs that were previously reserved.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      100c6d1a
    • Dimitris Aragiorgis's avatar
      Modify RemoveInstance() to support networks · a11b8875
      Dimitris Aragiorgis authored
      
      Release any IPs held the instance before actually removing.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      a11b8875
    • Dimitris Aragiorgis's avatar
      Modify LUInstanceCreate to support networks · f70bcabc
      Dimitris Aragiorgis authored
      
      Implement backend support, to export the IP pool management
      functionality to the clients. When the new NIC parameter 'network'
      is given, the ippool management system is triggered.
      If a NIC belongs to a network, it inherits the netparams
      (mode, link) as its nicparams. If a network is requested, then
      no 'mode' or 'link' should be specified. Backwards compatibility
      is preserved, if 'network' parameter is omitted.
      
      Examples for IP pool management system:
      
      --net 0:network=net1
        for an IPless NIC in a network
      
      --net 0:ip=pool,network=net1
        for automatically generated IP inside the network
      
      --net 0:ip=1.2.3.4,network=net1
        for specific IP inside the network
      
      --net 0:network=none
        for IPless NIC with default nicparams
      
      Examples for traditional assignment:
      
      --net 0:ip=1.2.3.4,link=br100,mode=bridged
      --net 0:ip=none,link=rt2,mode=routed
      --net 0
      
      Check for conflicting IPs to ensure IP uniqueness inside nodegroups.
      
      IAllocator should be extended to become network aware. If an instance
      has a NIC inside a network, then IAllocator must pick a node that its
      nodegroup is already connected with that network.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      f70bcabc
    • Dimitris Aragiorgis's avatar
      Config methods for reserving/releasing IPs · 0ca10882
      Dimitris Aragiorgis authored
      
      Use TemporaryReservationManager for IP handling to ensure
      config data consistency.
      
      Implement:
       - methods for reserving/releasing IPs
       - _UnlockedCommitTemporaryIps()
       - CheckIPInNodeGroup() used for conflicting IPs
       - GetGroupNetParams() used for inheriting netparams.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      0ca10882
    • Dimitris Aragiorgis's avatar
      Implement network/nodegroup mappings · 9870dce9
      Dimitris Aragiorgis authored
      
      LUNetworkConnect() connects a network to a nodegroup and defines
      its netparams (mode and link). Specifically:
       * Check if network already exists
       * Check if netparams are valid
       * Check if already connected to the same nodegroup
       * Produce errors if any conflicting IPs found
       * Update the 'networks' slot in NodeGroup config object
         with the network UUID and netparams requested. E.g.
         nodegroup_uuid {
           networks {
             network_uuid: {mode: 'bridged', link: 'br100'}
           }
         }
      
      LUNetworkDisconnect() unmaps a network from a nodegroup:
       * Produce errors if an instance has a NIC with IP inside the network
       * Remove corresponding entry in 'networks' slot of NodeGroup object
      
      Check for conflicting ips can be avoided with corresponding option.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      9870dce9
    • Dimitris Aragiorgis's avatar
      Implement LUNetworkSetParams · d0af39c0
      Dimitris Aragiorgis authored
      
      Support modifying all network parameters except for network (ip range)
      Cannot modify gateway and reserved ips at the same time.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      d0af39c0
    • Dimitris Aragiorgis's avatar
      Implement LUNetworkQuery · 7eb01378
      Dimitris Aragiorgis authored
      
      Summarily list all existing networks
      Supply detailed info for every existing network
       - List used/free IPs
       - List instances with NICs assigned to the corresponding network
       - List NIC index and IP for the above instances
      
      Implement complementary config methods for retrieving networks.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      7eb01378
    • Dimitris Aragiorgis's avatar
      Basic IP pool management logic · f2837050
      Dimitris Aragiorgis authored
      
      Implement LUs for corresponding opcodes:
       * LUNetworkAdd:
         - Check for IP validity
         - Reserves all necessary IPs
         - Create new Network config object
       * LUNetworkRemove:
         - Checks if connected to any nodegroup
         - Remove a Network config object
      
      Implement basic config methods:
       * LookupNetwork()
         - Given the network name return the network UUID
       * AddNetwork()
         - Add a new network to the config
       * RemoveNetwork()
         - Remove a network from the config
      
      Add new locking level: LEVEL_NETWORK
      
      Add various useful config methods for retrieving network info.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      f2837050
    • Dimitris Aragiorgis's avatar
      Introduce new module for IP pool management · 8e5f43b1
      Dimitris Aragiorgis authored
      
      Add new library module lib/network.py.
      Introduce new class: AddressPool.
      
      AddressPool implements all operations needed for managing IPs
      inside the IP pool.
      
      Given a Network config object (nobj), the class:
      
       * initializes the corresponding IP pool object via
         network.AddressPool.InitializeNetwork(nobj)
       * obtains the corresponding IP pool object via
         network.AddressPool(nobj)
       * manipulates IPs inside the pool
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      8e5f43b1
    • Dimitris Aragiorgis's avatar
      IP pool related objects, opcodes and constants · f4f36cf3
      Dimitris Aragiorgis authored
      
      Config objects:
       * Introduce L{Network} with
        - IPv4 network field (mandatory)
        - IPv4 gateway, IPv6 (network/gateway), mac prefix, type (optional)
       * Modify existing config objects to support networks:
        - Add new slot 'network' to L{NIC} config object
        - Add new slot 'networks' to L{NodeGroup} config object
      
      Opcodes:
       * Introduce new opcodes for networks
        - add/remove/modify/query/connect/disconnect.
       * In InstanceCreate/InstanceSetParams add conflicts_check option
      
      Constants:
       * INIC_PARAM 'INIC_NETWORK'
       * NIC_IP_POOL for automaticaly obtain an IP from a pool
       * NETWORK_TYPE_PUBLIC/PRIVATE for network types
      
      Checking of network_type handled by the opcode parameter validation.
      Introduce _CheckCIDR*Notation() functions for network parameters validation.
      
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      f4f36cf3
    • Constantinos Venetsanopoulos's avatar
      Fix computation of disk sizes in _ComputeDiskSize · 6a3166cb
      Constantinos Venetsanopoulos authored
      
      Currently, hail fails with FailDisk when trying to add an instance
      of type: 'file', 'sharedfile' and 'rbd'.
      
      This is due to a "0" or None value in the corresponding dict inside
      _ComputeDiskSize, which results in a "O" or non Int value of the
      exported 'disk_space_total' parameter. This in turn makes hail fail,
      when trying to process the value:
      
       - with "Unable to read Int" if value is None (file)
       - with FailDisk if value is 0 (sharedfile, rbd)
      
      The latter happens because the 0 value doesn't match the instance's
      IPolicy, since it is lower than the minimum disk size.
      
      The second problem still exists when using adoption with 'plain'
      and 'blockdev' template and will be addressed in another commit.
      
      Signed-off-by: default avatarConstantinos Venetsanopoulos <cven@grnet.gr>
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      6a3166cb
  2. Aug 15, 2012
    • Iustin Pop's avatar
      Add verification of RPC results in _WipeDisks · f08e5132
      Iustin Pop authored
      
      Due to an oversight, the pause/resume sync RPC calls in _WipeDisks
      lack the verification of the overall RPC status, and directly iterate
      over the payload. The code actually doing the wipe does verify
      correctly the results. This can result in jobs failing with a hard to
      diagnose:
      
      OpExecError ['NoneType' object is not iterable]
      
      instead of proper "RPC failed" message.
      
      This patch adds a hard check on the pause call, but for the resume
      call it just logs a warning if the RPC failed; the rationale being
      that if we can't contact the node for pausing the sync, it's likely
      wiping will fail too, but after the wipe has been done, we can
      continue.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      f08e5132
  3. Aug 10, 2012
  4. Aug 09, 2012
  5. Aug 08, 2012
  6. Jul 27, 2012
  7. Jul 26, 2012
  8. Jul 25, 2012
  9. Jul 24, 2012
  10. Jul 23, 2012
    • Iustin Pop's avatar
      Ensure a stable content of the bash completion file · f5ce7613
      Iustin Pop authored
      
      Currently, the order of commands in the bash completion file is
      random, because the sub-commands are not sorted. This makes it harder
      to investigate the differences in packaged Ganeti or in installed
      Ganeti, since chunks in this file will have a random order.
      
      To fix this, we sort the subcommands based on the first subcommand in
      a given group ('first' also in sorted order); this results in a stable
      contents of file, as tested by building it many times and checking for
      differences.
      
      The patch also does a few other minor changes to the file
      (e.g. updating copyright years, etc.).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      f5ce7613
  11. Jul 19, 2012
Loading