From 446f0ede07484bfefa35b9a5a668b4870a684a5b Mon Sep 17 00:00:00 2001 From: Tamas Laczko Date: Tue, 11 Jun 2019 16:07:14 +0200 Subject: [PATCH] remove bare_lvm mount_dir & mount_opt-s from UC Change-Id: I051e1f2c38cb9e28b26c05dd932dfc9a5e14e561 --- .../src/cmdatahandlers/storage_profiles/config.py | 8 ++++++-- userconfigtemplate/user_config.yaml | 13 +------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/cmdatahandlers/src/cmdatahandlers/storage_profiles/config.py b/cmdatahandlers/src/cmdatahandlers/storage_profiles/config.py index 881a773..3b9196a 100644 --- a/cmdatahandlers/src/cmdatahandlers/storage_profiles/config.py +++ b/cmdatahandlers/src/cmdatahandlers/storage_profiles/config.py @@ -17,6 +17,10 @@ from cmdatahandlers.api import config from cmdatahandlers.api import utils +BARE_LVM_MOUNT_DIR = "/var/lib/docker" +BARE_LVM_MOUNT_OPT = "noatime,nodiratime,logbufs=8,pquota" + + class Config(config.Config): def __init__(self, confman): super(Config, self).__init__(confman) @@ -257,7 +261,7 @@ class Config(config.Config): ConfigError in-case of an error """ - return self._get_optional_attribute(profile, 'mount_options') + return BARE_LVM_MOUNT_OPT def get_profile_bare_lvm_mount_dir(self, profile): """ get the mount_dir @@ -274,7 +278,7 @@ class Config(config.Config): ConfigError in-case of an error """ - return self._get_attribute(profile, 'mount_dir') + return BARE_LVM_MOUNT_DIR def get_profile_bare_lvm_lv_name(self, profile): """ get the lv_name diff --git a/userconfigtemplate/user_config.yaml b/userconfigtemplate/user_config.yaml index 1e1e257..1ad5259 100644 --- a/userconfigtemplate/user_config.yaml +++ b/userconfigtemplate/user_config.yaml @@ -29,7 +29,7 @@ ### - Minor changes in template (e.g. new optional attributes or ### changes in possible values, value ranges or default values) ### - Backwards compatible -version: 2.0.0 +version: 2.0.1 ### Cloud name can consist of lower case letters, digits and dash (-). ### Name must start and end with a letter or a digit. @@ -472,17 +472,6 @@ storage_profiles: ### This parameter contains the name for the created LVM volume. #lv_name: - ### Mandatory - ### This parameter contains the directory where to mount - ### the backend of this profile. - #mount_dir: - - ### Optional - ### This parameter contains the mount options used to mount - ### the backend. The format must be a valid fstab format. - ### By default it is empty. - #mount_options: - host_os: ### The value of this parameter is used to protect the entire GRUB 2 menu structure of all the infrastructure nodes. ### The configured value should be a properly salted PBKDF2 (Password-Based Key Derivation Function 2) hash. -- 2.16.6