]> git.proxmox.com Git - pve-installer.git/commitdiff
install: config: rename option lvm_auto_rename -> existing_storage_auto_rename
authorChristoph Heiss <c.heiss@proxmox.com>
Tue, 16 Jul 2024 08:18:09 +0000 (10:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 16 Jul 2024 15:51:41 +0000 (17:51 +0200)
As this is an internal option for the low-level installer anyway, no
real functional changes here.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 files changed:
Proxmox/Install.pm
Proxmox/Install/Config.pm
proxmox-auto-installer/src/utils.rs
proxmox-auto-installer/tests/resources/parse_answer/disk_match.json
proxmox-auto-installer/tests/resources/parse_answer/disk_match_all.json
proxmox-auto-installer/tests/resources/parse_answer/disk_match_any.json
proxmox-auto-installer/tests/resources/parse_answer/minimal.json
proxmox-auto-installer/tests/resources/parse_answer/nic_matching.json
proxmox-auto-installer/tests/resources/parse_answer/specific_nic.json
proxmox-auto-installer/tests/resources/parse_answer/zfs.json
proxmox-installer-common/src/setup.rs
proxmox-tui-installer/src/setup.rs

index c0f89559edcf9695bbea208821066d8f99c7e5e4..9efa4f1b58f32aeafc7380305408e97b2e981a91 100644 (file)
@@ -384,8 +384,8 @@ sub ask_existing_vg_rename_or_abort {
        $vg->{new_vgname} = "$vgname-OLD-$short_uid";
     }
 
-    my $response_ok = Proxmox::Install::Config::get_lvm_auto_rename();
-    if (!$response_ok) {
+    my $do_rename = Proxmox::Install::Config::get_existing_storage_auto_rename();
+    if (!$do_rename) {
        my $message = "Detected existing '$vgname' Volume Group(s)! Do you want to:\n";
 
        for my $vg_uuid (keys %$duplicate_vgs) {
@@ -394,10 +394,10 @@ sub ask_existing_vg_rename_or_abort {
        }
        $message .= "or cancel the installation?";
 
-       $response_ok = Proxmox::UI::prompt($message);
+       $do_rename = Proxmox::UI::prompt($message);
     }
 
-    if ($response_ok) {
+    if ($do_rename) {
        for my $vg_uuid (keys %$duplicate_vgs) {
            my $vg = $duplicate_vgs->{$vg_uuid};
            my $new_vgname = $vg->{new_vgname};
index ecd8a74182d73dea3804fefa9aee72ee2210f16d..e4490396e70be2bbfbf4f0882f71f8ef34999eb9 100644 (file)
@@ -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;
index 202ad41516998cc7fe82c736ad91b66d34f66576..cc47f5f6a315b16b47b0592a6252aaa7872e57ac 100644 (file)
@@ -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(),
index 3a117b66f9317141371281eed56ef4300c75a912..2618fd4b8a32e2a4f408d69b1ee3055c6f3ff5e0 100644 (file)
@@ -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,
index 5325fc398f4b24299c6c2418f3d6934a7293f345..6cfb96ab3d3e27ae6379ebd71c7850d1f6e72461 100644 (file)
@@ -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,
index 18e22d17b890e3b6749cf8e93651791a6d2f14ad..1921b3457402ae8dc8e0fd9358ba3af943947b04 100644 (file)
@@ -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,
index bb7271386cdfcb4792b754d1fbfd4a89f40065d1..38112e48c5574c4c769cc0b00332b28c839850bf 100644 (file)
@@ -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@no.invalid",
index de94165e8e66560e06cab74973fd1c544acc7c11..6eb3b8aa40b614c4dc7403a799d2fda587c33b64 100644 (file)
@@ -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@no.invalid",
index 5b4fcfcd69f7aba0ab50d61c5afb5f2b12035557..9791535f6a606e7479c97d296069e44ae1caf0f2 100644 (file)
@@ -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@no.invalid",
index 65724a8fbb86204b0adf4ebb5fe44ea8ab26e7c1..85049cbf99e1ed77a00707e89d00c698791b12ae 100644 (file)
@@ -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,
index 9aa4063133d5a99c4f27256899696b1c3bf3c119..804da1a3be58abb076bca06c9c9325041079179b 100644 (file)
@@ -480,7 +480,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,
index 8c01e4216329549c316164f81f5953cdb2f4f040..02d9ecebddff694f437dcc00a0732b02a210291a 100644 (file)
@@ -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,