LGTM, thanks

On Mon, Feb 10, 2014 at 5:17 PM, Klaus Aehlig <[email protected]> wrote:

>
>
> commit 771a4593485a62227fac6d23b6140dc422af9b28
> Merge: 7711f32 673425b
> Author: Klaus Aehlig <[email protected]>
> Date:   Mon Feb 10 15:59:01 2014 +0100
>
>     Merge branch 'stable-2.10' into stable-2.11
>
>     * stable-2.10
>       Fix 'JobIdListOnly' type from 'List' to 'Map'
>       Remove NEWS entry for 2.9.4
>       Workaround for monitor bug related to greeting msg
>       hotplug: Verify if a command succeeded or not
>       hotplug: Call each qemu commmand with an own socat
>       upgrade: start daemons after ensure-dirs
>       upgrade design: ensure-dirs before starting daemons
>       Fix network management section in admin.rst
>       Adapt release date for 2.10.0-rc2
>       Revision bump for 2.10.0-rc2
>       Update NEWS file in preparation of 2.10.0rc2
>       Add Network Management section in admin.rst
>
>     * stable-2.9
>       Revision bump for 2.9.4
>       Set release date for 2.9.4
>       Note UUID identification change in NEWS file
>       Allow classic queries to use either names or UUIDs
>       Document the change of noded's group in NEWS
>       Make the LUInstanceCreate return node names, not UUIDs
>       Document new handling of degraded instances in NEWS
>       Gracefully handle degraded instances in verification
>       Be aware of the degraded case when cleaning up an instance
>       Document changes to file-based disks in NEW
>       Preserve disk basename on instance rename
>       Update NEWS file
>       Modify test to reflect RAPI operation changes
>       Add QA tests for RAPI multi-instance allocatio
>       Fix multi-allocation RAPI method
>       Assign unique filenames to filebased disks
>
>     * stable-2.8
>       Fix execution group of NodeD
>
>     Conflicts:
>         NEWS: take both additions
>         configure.ac: ignore suffix bump
>         lib/cmdlib/instance_utils.py: manually apply
>             845b7ed1 to stable-2.10 hunk
>         src/Ganeti/Query/Query.hs: take all exports
>         test/py/cmdlib/instance_unittest.py: take assertions
>             from both branches for the respective storage
>             types
>
>     Signed-off-by: Klaus Aehlig <[email protected]>
>
> diff --cc NEWS
> index 46e2c8d,ad618e8..1dd3b97
> --- a/NEWS
> +++ b/NEWS
> @@@ -2,69 -2,10 +2,69 @@@ New
>   ====
>
>
>  +Version 2.11.0 alpha1
>  +---------------------
>  +
>  +*(unreleased)*
>  +
>  +Incompatible/important changes
>  +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  +
>  +- ``gnt-node list`` no longer shows disk space information for shared
> file
>  +  disk templates because it is not a node attribute. (For example, if
> you have
>  +  both the file and shared file disk templates enabled, ``gnt-node
> list`` now
>  +  only shows information about the file disk template.)
>  +- The shared file disk template is now in the new 'sharedfile' storage
> type.
>  +  As a result, ``gnt-node list-storage -t file`` now only shows
> information
>  +  about the file disk template and you may use ``gnt-node list-storage -t
>  +  sharedfile`` to query storage information for the shared file disk
> template.
>  +- Over luxi, syntactially incorrect queries are now rejected as a whole;
>  +  before, a 'SumbmitManyJobs' request was partially executed, if the
> outer
>  +  structure of the request was syntactically correct. As the luxi
> protocol
>  +  is internal (external applications are expected to use RAPI), the
> impact
>  +  of this incompatible change should be limited.
>  +- Queries for nodes, instances, groups, backups and networks are now
>  +  exclusively done via the luxi daemon. Legacy python code was removed,
>  +  as well as the --enable-split-queries configuration option.
>  +- Orphan volumes errors are demoted to warnings and no longer affect the
> exit
>  +  code of ``gnt-cluster verify``.
>  +- RPC security got enhanced by using different client SSL certificates
>  +  for each node. In this context 'gnt-cluster renew-crypto' got a new
>  +  option '--renew-node-certificates', which renews the client
>  +  certificates of all nodes. After a cluster upgrade from pre-2.11, run
>  +  this to create client certificates and activate this feature.
>  +
>  +New features
>  +~~~~~~~~~~~~
>  +
>  +- Instance moves, backups and imports can now use compression to
> transfer the
>  +  instance data.
>  +- Node groups can be configured to use an SSH port different than the
>  +  default 22.
>  +- Added experimental support for Gluster distributed file storage as the
>  +  ``gluster`` disk template under the new ``sharedfile`` storage type
> through
>  +  automatic management of per-node FUSE mount points. You can configure
> the
>  +  mount point location at ``gnt-cluster init`` time by using the new
>  +  ``--gluster-storage-dir`` switch.
>  +- Job scheduling is now handled by luxid, and the maximal number of jobs
> running
>  +  in parallel is a run-time parameter of the cluster.
>  +
>  +New dependencies
>  +~~~~~~~~~~~~~~~~
>  +The following new dependencies have been added:
>  +
>  +For Haskell:
>  +
>  +- ``zlib`` library (http://hackage.haskell.org/package/base64-bytestring
> )
>  +
>  +- ``base64-bytestring`` library (http://hackage.haskell.org/package/zlib
> ),
>  +  at least version 1.0.0.0
>  +
>  +
> - Version 2.10.0 rc1
> + Version 2.10.0 rc2
>   ------------------
>
> - *(Released Tue, 17 Dec 2013)*
> + *(Released Fri, 31 Jan 2014)*
>
>   Incompatible/important changes
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> diff --cc lib/cmdlib/instance_storage.py
> index eb07df5,94e2d6d..cd512e0
> --- a/lib/cmdlib/instance_storage.py
> +++ b/lib/cmdlib/instance_storage.py
> @@@ -460,16 -461,11 +462,16 @@@ def GenerateDiskTemplate
>           vg = disk.get(constants.IDISK_VG, vgname)
>           return (vg, names[idx])
>
>  -    elif template_name in (constants.DT_FILE, constants.DT_SHARED_FILE):
>  +    elif template_name == constants.DT_GLUSTER:
>  +      logical_id_fn = lambda _1, disk_index, _2: \
>  +        (file_driver, "ganeti/%s.%d" % (instance_uuid,
>  +                                        disk_index))
>  +
>  +    elif template_name in constants.DTS_FILEBASED: # Gluster handled
> above
>         logical_id_fn = \
>           lambda _, disk_index, disk: (file_driver,
> -                                      "%s/disk%d" % (file_storage_dir,
> -                                                     disk_index))
> +                                      "%s/%s" % (file_storage_dir,
> +                                                 names[idx]))
>       elif template_name == constants.DT_BLOCK:
>         logical_id_fn = \
>           lambda idx, disk_index, disk: (constants.BLOCKDEV_DRIVER_MANUAL,
> diff --cc lib/cmdlib/instance_utils.py
> index 9e10fd1,c9f50c5..69f7e12
> --- a/lib/cmdlib/instance_utils.py
> +++ b/lib/cmdlib/instance_utils.py
> @@@ -292,8 -292,16 +292,16 @@@ def RemoveDisks(lu, instance, target_no
>
>     CheckDiskTemplateEnabled(lu.cfg.GetClusterInfo(),
> instance.disk_template)
>
>  -  if instance.disk_template in constants.DTS_FILEBASED:
>  +  if instance.disk_template in [constants.DT_FILE,
> constants.DT_SHARED_FILE]:
> -     file_storage_dir = os.path.dirname(instance.disks[0].logical_id[1])
> +     if len(instance.disks) > 0:
> +       file_storage_dir = os.path.dirname(instance.disks[0].logical_id[1])
> +     else:
> +       if instance.disk_template == constants.DT_SHARED_FILE:
> +         file_storage_dir =
> utils.PathJoin(lu.cfg.GetSharedFileStorageDir(),
> +                                           instance.name)
> +       else:
> +         file_storage_dir = utils.PathJoin(lu.cfg.GetFileStorageDir(),
> +                                           instance.name)
>       if target_node_uuid:
>         tgt = target_node_uuid
>       else:
> diff --cc src/Ganeti/Query/Query.hs
> index 86f73a1,f3c7ce5..326e2ee
> --- a/src/Ganeti/Query/Query.hs
> +++ b/src/Ganeti/Query/Query.hs
> @@@ -52,7 -50,7 +52,8 @@@ module Ganeti.Query.Quer
>       , queryCompat
>       , getRequestedNames
>       , nameField
>  +    , NoDataRuntime
> +     , uuidField
>       ) where
>
>   import Control.DeepSeq
> diff --cc test/py/cmdlib/instance_unittest.py
> index 23605d3,325f1da..1e74b3f
> --- a/test/py/cmdlib/instance_unittest.py
> +++ b/test/py/cmdlib/instance_unittest.py
> @@@ -1106,19 -1107,12 +1107,21 @@@ class TestGenerateDiskTemplate(CmdlibTe
>           disk_template, disk_info, 2, disk_template,
>           file_storage_dir="/tmp", file_driver=constants.FD_BLKTAP)
>
>  -      for (idx, disk) in enumerate(result):
>  -        (file_driver, file_storage_dir) = disk.logical_id
>  -        dir_fmt = r"^/tmp/.*\.%s\.disk%d$" % (disk_template, idx + 2)
>  -        self.assertEqual(file_driver, constants.FD_BLKTAP)
>  -        # FIXME: use assertIsNotNone when py 2.7 is minimum supported
> version
>  -        self.assertNotEqual(re.match(dir_fmt, file_storage_dir), None)
>  +      if disk_template == constants.DT_GLUSTER:
>  +        # Here "inst21662.example.com" is actually the instance UUID,
> not its
>  +        # name, so while this result looks wrong, it is actually correct.
>  +        expected = [(constants.FD_BLKTAP,
>  +                     'ganeti/inst21662.example.com.%d' % x)
>  +                    for x in (2,3,4)]
> ++        self.assertEqual(map(operator.attrgetter("logical_id"), result),
> ++                         expected)
>  +      else:
> -         expected = [(constants.FD_BLKTAP,
> -                      '/tmp/disk%d' % x)
> -                     for x in (2,3,4)]
> -
> -       self.assertEqual(map(operator.attrgetter("logical_id"), result),
> -                        expected)
> ++        for (idx, disk) in enumerate(result):
> ++          (file_driver, file_storage_dir) = disk.logical_id
> ++          dir_fmt = r"^/tmp/.*\.%s\.disk%d$" % (disk_template, idx + 2)
> ++          self.assertEqual(file_driver, constants.FD_BLKTAP)
> ++          # FIXME: use assertIsNotNone when py 2.7 is minimum supported
> version
> ++          self.assertNotEqual(re.match(dir_fmt, file_storage_dir), None)
>
>     def testBlock(self):
>       disk_info = [{
>
> --
> Klaus Aehlig
> Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores
>



-- 
-- 
Helga Velroyen | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to