From a31017064a8eedc2ad2ad840d17e441d3563e73d Mon Sep 17 00:00:00 2001
From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de>
Date: Tue, 14 Dec 2021 21:07:31 +0100
Subject: [PATCH] Use VOL_NAME instead of CNAME
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The latter is “pretty” and not necessarily unique.
---
 ext_scripts/ext_rbd.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ext_scripts/ext_rbd.py b/ext_scripts/ext_rbd.py
index b9ddea7..7873084 100755
--- a/ext_scripts/ext_rbd.py
+++ b/ext_scripts/ext_rbd.py
@@ -23,7 +23,7 @@ RBD storage provider wrapper-script for ganeti extstorage disk template
 The script takes it's input from environment variables. Specifically the
 following variables should be present:
 
- - VOL_CNAME: The name of the new Image file
+ - VOL_NAME: The name of the new Image file
  - VOL_SIZE: The size of the new Image (in megabytes)
 
 The following variables are optional:
@@ -199,9 +199,9 @@ class RBD(object):
 
 def read_env():
     """Read the enviromental variables"""
-    name = os.getenv("VOL_CNAME")
+    name = os.getenv("VOL_NAME")
     if name is None:
-        sys.stderr.write('The environment variable VOL_CNAME is missing.\n')
+        sys.stderr.write('The environment variable VOL_NAME is missing.\n')
         return None
 
     extp_params = {}
@@ -236,7 +236,7 @@ def read_env():
             userspace_params[p[len(PREFIX_USP):]] = v
             extp_params.pop(p)
 
-    env = {"name": os.getenv("VOL_CNAME"),
+    env = {"name": os.getenv("VOL_NAME"),
            "size": os.getenv("VOL_SIZE"),
            "snapshot_name": os.getenv("VOL_SNAPSHOT_NAME"),
            "cephx": cephx,
-- 
GitLab