]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: deprecate image format 1 7841/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 29 Feb 2016 02:27:50 +0000 (21:27 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 29 Feb 2016 18:22:32 +0000 (13:22 -0500)
The rbd cli will warn about the deprecation when attempting to create
image format 1 images.  librbd will log an error message when opening
a format 1 RBD image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
PendingReleaseNotes
doc/man/8/rbd.rst
src/librbd/image/OpenRequest.cc
src/test/cli/rbd/help.t
src/tools/rbd/ArgumentTypes.cc
src/tools/rbd/Utils.cc

index c4140307b7030592cdfae60d79b1c16bcfb14e84..127aa44bc8a50c92caceac79bdbf3f31abcb74ce 100644 (file)
@@ -12,6 +12,10 @@ v10.0.0
   limit max waiting time of monitor election process, which was previously
   restricted by 'mon_lease'.
 
+* The rbd legacy image format (version 1) is deprecated with the Jewel release.
+  Attempting to create a new version 1 RBD image will result in a warning.
+  Future releases of Ceph will remove support for version 1 RBD images.
+
 v9.3.0
 ======
 * Some symbols wrongly exposed by librados in v9.1.0 and v9.2.0 were removed.
index 633d89a4651c1de32419d5aee8f42bbcfcf03bf5..a3594c0b9ea5c040e6200c6270b3dc22ac021643 100644 (file)
@@ -56,9 +56,9 @@ Parameters
 
    Specifies which object layout to use. The default is 1.
 
-   * format 1 - Use the original format for a new rbd image. This format is
-     understood by all versions of librbd and the kernel rbd module, but
-     does not support newer features like cloning.
+   * format 1 - (deprecated) Use the original format for a new rbd image. This
+     format is understood by all versions of librbd and the kernel rbd module,
+     but does not support newer features like cloning.
 
    * format 2 - Use the second rbd format, which is supported by
      librbd and kernel since version 3.11 (except for striping). This adds
index 68abbba620abb23b264498d3505b745bd3651b97..47001c4c27047bd93b90845c623e3b3eb772c511 100644 (file)
@@ -78,6 +78,9 @@ Context *OpenRequest<I>::handle_v1_detect_header(int *result) {
     }
     send_close_image(*result);
   } else {
+    lderr(cct) << "RBD image format 1 is deprecated. "
+               << "Please copy this image to image format 2." << dendl;
+
     m_image_ctx->old_format = true;
     m_image_ctx->header_oid = util::old_header_name(m_image_ctx->name);
     send_register_watch();
index 800fc45a5f5c25005bf74496a4c2f95db0cf36c6..bc759f4a3148ea6c8b173d67b14946149c1df528 100644 (file)
   Optional arguments
     -p [ --pool ] arg         pool name
     --image arg               image name
-    --image-format arg        image format [1 or 2]
+    --image-format arg        image format [1 (deprecated) or 2]
     --new-format              use image format 2
                               (deprecated)
     --order arg               object order [12 <= order <= 25]
     --path arg                import file (or '-' for stdin)
     --dest-pool arg           destination pool name
     --dest arg                destination image name
-    --image-format arg        image format [1 or 2]
+    --image-format arg        image format [1 (deprecated) or 2]
     --new-format              use image format 2
                               (deprecated)
     --order arg               object order [12 <= order <= 25]
index 698a643a7fc243074f9fa55bbaf5824879b6c7f8..6439173211a35b14a879e536a6858dedc7382a27 100644 (file)
@@ -209,7 +209,8 @@ void add_create_image_options(po::options_description *opt,
   // TODO get default image format from conf
   if (include_format) {
     opt->add_options()
-      (IMAGE_FORMAT.c_str(), po::value<ImageFormat>(), "image format [1 or 2]")
+      (IMAGE_FORMAT.c_str(), po::value<ImageFormat>(),
+       "image format [1 (deprecated) or 2]")
       (IMAGE_NEW_FORMAT.c_str(),
        po::value<ImageNewFormat>()->zero_tokens(),
        "use image format 2\n(deprecated)");
index c4fbee457f56429c40901a72c175d4d3b7d9557e..49571f446e805d5681192996be36cf7b39e0da2f 100644 (file)
@@ -390,6 +390,9 @@ int get_image_options(const boost::program_options::variables_map &vm,
     } else {
       format = g_conf->rbd_default_format;
     }
+    if (format == 1) {
+      std::cerr << "rbd: image format 1 is deprecated" << std::endl;
+    }
 
     if (features_specified && features != 0) {
       if (format_specified && format == 1) {