[pve-devel] [PATCH installer v3 3/4] install: config: rename option lvm_auto_rename -> existing_storage_auto_rename

Christoph Heiss c.heiss at proxmox.com
Thu Jul 11 13:57:55 CEST 2024


As this is an internal option for the low-level installer anyway, no
real functional changes here.

Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
Changes v2 -> v3:
  * new patch

 Proxmox/Install.pm                                          | 2 +-
 Proxmox/Install/Config.pm                                   | 6 +++---
 proxmox-auto-installer/src/utils.rs                         | 2 +-
 .../tests/resources/parse_answer/disk_match.json            | 2 +-
 .../tests/resources/parse_answer/disk_match_all.json        | 2 +-
 .../tests/resources/parse_answer/disk_match_any.json        | 2 +-
 .../tests/resources/parse_answer/minimal.json               | 2 +-
 .../tests/resources/parse_answer/nic_matching.json          | 2 +-
 .../tests/resources/parse_answer/specific_nic.json          | 2 +-
 .../tests/resources/parse_answer/zfs.json                   | 2 +-
 proxmox-installer-common/src/setup.rs                       | 2 +-
 proxmox-tui-installer/src/setup.rs                          | 2 +-
 12 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index c0f8955..7342e4b 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -384,7 +384,7 @@ sub ask_existing_vg_rename_or_abort {
 	$vg->{new_vgname} = "$vgname-OLD-$short_uid";
     }
 
-    my $response_ok = Proxmox::Install::Config::get_lvm_auto_rename();
+    my $response_ok = Proxmox::Install::Config::get_existing_storage_auto_rename();
     if (!$response_ok) {
 	my $message = "Detected existing '$vgname' Volume Group(s)! Do you want to:\n";
 
diff --git a/Proxmox/Install/Config.pm b/Proxmox/Install/Config.pm
index ecd8a74..e449039 100644
--- a/Proxmox/Install/Config.pm
+++ b/Proxmox/Install/Config.pm
@@ -82,7 +82,7 @@ my sub init_cfg {
 	# TODO: single disk selection config
 	target_hd => undef,
 	disk_selection => {},
-	lvm_auto_rename => 0,
+	existing_storage_auto_rename => 0,
 
 	# locale
 	country => $country,
@@ -244,7 +244,7 @@ sub get_dns { return get('dns'); }
 sub set_target_cmdline { set_key('target_cmdline', $_[0]); }
 sub get_target_cmdline { return get('target_cmdline'); }
 
-sub set_lvm_auto_rename { set_key('lvm_auto_rename', $_[0]); }
-sub get_lvm_auto_rename { return get('lvm_auto_rename'); }
+sub set_existing_storage_auto_rename { set_key('existing_storage_auto_rename', $_[0]); }
+sub get_existing_storage_auto_rename { return get('existing_storage_auto_rename'); }
 
 1;
diff --git a/proxmox-auto-installer/src/utils.rs b/proxmox-auto-installer/src/utils.rs
index 202ad41..cc47f5f 100644
--- a/proxmox-auto-installer/src/utils.rs
+++ b/proxmox-auto-installer/src/utils.rs
@@ -328,7 +328,7 @@ pub fn parse_answer(
         zfs_opts: None,
         target_hd: None,
         disk_selection: BTreeMap::new(),
-        lvm_auto_rename: 1,
+        existing_storage_auto_rename: 1,
 
         country: answer.global.country.clone(),
         timezone: answer.global.timezone.clone(),
diff --git a/proxmox-auto-installer/tests/resources/parse_answer/disk_match.json b/proxmox-auto-installer/tests/resources/parse_answer/disk_match.json
index 3a117b6..2618fd4 100644
--- a/proxmox-auto-installer/tests/resources/parse_answer/disk_match.json
+++ b/proxmox-auto-installer/tests/resources/parse_answer/disk_match.json
@@ -10,7 +10,7 @@
 	"8": "8",
 	"9": "9"
   },
-  "lvm_auto_rename": 1,
+  "existing_storage_auto_rename": 1,
   "filesys": "zfs (RAID10)",
   "gateway": "192.168.1.1",
   "hdsize": 223.57088470458984,
diff --git a/proxmox-auto-installer/tests/resources/parse_answer/disk_match_all.json b/proxmox-auto-installer/tests/resources/parse_answer/disk_match_all.json
index 5325fc3..6cfb96a 100644
--- a/proxmox-auto-installer/tests/resources/parse_answer/disk_match_all.json
+++ b/proxmox-auto-installer/tests/resources/parse_answer/disk_match_all.json
@@ -7,7 +7,7 @@
   "disk_selection": {
 	"9": "9"
   },
-  "lvm_auto_rename": 1,
+  "existing_storage_auto_rename": 1,
   "filesys": "zfs (RAID0)",
   "gateway": "192.168.1.1",
   "hdsize": 223.57088470458984,
diff --git a/proxmox-auto-installer/tests/resources/parse_answer/disk_match_any.json b/proxmox-auto-installer/tests/resources/parse_answer/disk_match_any.json
index 18e22d1..1921b34 100644
--- a/proxmox-auto-installer/tests/resources/parse_answer/disk_match_any.json
+++ b/proxmox-auto-installer/tests/resources/parse_answer/disk_match_any.json
@@ -14,7 +14,7 @@
 	"8": "8",
 	"9": "9"
   },
-  "lvm_auto_rename": 1,
+  "existing_storage_auto_rename": 1,
   "filesys": "zfs (RAID10)",
   "gateway": "192.168.1.1",
   "hdsize": 2980.820640563965,
diff --git a/proxmox-auto-installer/tests/resources/parse_answer/minimal.json b/proxmox-auto-installer/tests/resources/parse_answer/minimal.json
index bb72713..38112e4 100644
--- a/proxmox-auto-installer/tests/resources/parse_answer/minimal.json
+++ b/proxmox-auto-installer/tests/resources/parse_answer/minimal.json
@@ -7,7 +7,7 @@
   "filesys": "ext4",
   "gateway": "192.168.1.1",
   "hdsize": 223.57088470458984,
-  "lvm_auto_rename": 1,
+  "existing_storage_auto_rename": 1,
   "hostname": "pveauto",
   "keymap": "de",
   "mailto": "mail at no.invalid",
diff --git a/proxmox-auto-installer/tests/resources/parse_answer/nic_matching.json b/proxmox-auto-installer/tests/resources/parse_answer/nic_matching.json
index de94165..6eb3b8a 100644
--- a/proxmox-auto-installer/tests/resources/parse_answer/nic_matching.json
+++ b/proxmox-auto-installer/tests/resources/parse_answer/nic_matching.json
@@ -7,7 +7,7 @@
   "filesys": "ext4",
   "gateway": "10.10.10.1",
   "hdsize": 223.57088470458984,
-  "lvm_auto_rename": 1,
+  "existing_storage_auto_rename": 1,
   "hostname": "pveauto",
   "keymap": "de",
   "mailto": "mail at no.invalid",
diff --git a/proxmox-auto-installer/tests/resources/parse_answer/specific_nic.json b/proxmox-auto-installer/tests/resources/parse_answer/specific_nic.json
index 5b4fcfc..9791535 100644
--- a/proxmox-auto-installer/tests/resources/parse_answer/specific_nic.json
+++ b/proxmox-auto-installer/tests/resources/parse_answer/specific_nic.json
@@ -7,7 +7,7 @@
   "filesys": "ext4",
   "gateway": "10.10.10.1",
   "hdsize": 223.57088470458984,
-  "lvm_auto_rename": 1,
+  "existing_storage_auto_rename": 1,
   "hostname": "pveauto",
   "keymap": "de",
   "mailto": "mail at no.invalid",
diff --git a/proxmox-auto-installer/tests/resources/parse_answer/zfs.json b/proxmox-auto-installer/tests/resources/parse_answer/zfs.json
index 65724a8..85049cb 100644
--- a/proxmox-auto-installer/tests/resources/parse_answer/zfs.json
+++ b/proxmox-auto-installer/tests/resources/parse_answer/zfs.json
@@ -8,7 +8,7 @@
 	"6": "6",
 	"7": "7"
   },
-  "lvm_auto_rename": 1,
+  "existing_storage_auto_rename": 1,
   "filesys": "zfs (RAID1)",
   "gateway": "192.168.1.1",
   "hdsize": 80.0,
diff --git a/proxmox-installer-common/src/setup.rs b/proxmox-installer-common/src/setup.rs
index 64d05af..3082e8c 100644
--- a/proxmox-installer-common/src/setup.rs
+++ b/proxmox-installer-common/src/setup.rs
@@ -479,7 +479,7 @@ pub struct InstallConfig {
     #[serde(skip_serializing_if = "BTreeMap::is_empty")]
     pub disk_selection: BTreeMap<String, String>,
 
-    pub lvm_auto_rename: usize,
+    pub existing_storage_auto_rename: usize,
 
     pub country: String,
     pub timezone: String,
diff --git a/proxmox-tui-installer/src/setup.rs b/proxmox-tui-installer/src/setup.rs
index 8c01e42..02d9ece 100644
--- a/proxmox-tui-installer/src/setup.rs
+++ b/proxmox-tui-installer/src/setup.rs
@@ -17,7 +17,7 @@ impl From<InstallerOptions> for InstallConfig {
             zfs_opts: None,
             target_hd: None,
             disk_selection: BTreeMap::new(),
-            lvm_auto_rename: 0,
+            existing_storage_auto_rename: 0,
 
             country: options.timezone.country,
             timezone: options.timezone.timezone,
-- 
2.45.1





More information about the pve-devel mailing list