File tree Expand file tree Collapse file tree 2 files changed +20
-14
lines changed
preflight_checks/action_plugins Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,26 @@ def check_no_duplicate_addresses(task_vars):
6868 seen_addresses .add (address )
6969
7070
71+ def check_no_old_storage_configuration (task_vars ):
72+ '''
73+ Check that the storage configuration of MetalK8s < 0.2.0 is not present
74+ anymore
75+ '''
76+
77+ for host in task_vars ['hostvars' ].keys ():
78+ assert 'metal_k8s_lvm' not in task_vars ['hostvars' ][host ], (
79+ "You are still having the old storage configuration for {host}. "
80+ "A breaking change was introduced in MetalK8s 0.2.0 "
81+ "and the default LVM Volume Group has been changed "
82+ "from 'kubevg' to '{metalk8s_lvm_default_vg}'. "
83+ "Please follow the 'Upgrading from MetalK8s < 0.2.0' "
84+ "chapter of the documentation" ).format (
85+ host = host ,
86+ metalk8s_lvm_default_vg = task_vars ['hostvars' ][host ].get (
87+ 'metalk8s_lvm_default_vg' , 'vg_metalk8s' )
88+ )
89+
90+
7191class ActionModule (ActionBase ):
7292 def run (self , tmp = None , task_vars = None ):
7393 if task_vars is None :
Original file line number Diff line number Diff line change 1- # TODO: link to documentation in fail message
2- - name : " LVM Setup: Detect old configuration style < 0.2.0"
3- tags :
4- - assertion
5- fail :
6- msg : >
7- You're still having the old storage configuration.
8- A breaking change was introduced in MetalK8s 0.2.0 and the default
9- LVM Volume Group has been changed from "kubevg" to
10- {{ metalk8s_lvm_default_vg }}.
11- Please follow the "Upgrading from MetalK8s < 0.2.0" chapter of the
12- documentation
13- when : metal_k8s_lvm is defined
14-
151- name : " LVM Setup: Check LVM packages"
162 package :
173 name : ' {{ item }}'
You can’t perform that action at this time.
0 commit comments