From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 36B8A1FF2CF for ; Thu, 11 Jul 2024 13:59:07 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9456A32BC8; Thu, 11 Jul 2024 13:59:18 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Thu, 11 Jul 2024 13:57:55 +0200 Message-ID: <20240711115804.706227-4-c.heiss@proxmox.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240711115804.706227-1-c.heiss@proxmox.com> References: <20240711115804.706227-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.018 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH installer v3 3/4] install: config: rename option lvm_auto_rename -> existing_storage_auto_rename X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" As this is an internal option for the low-level installer anyway, no real functional changes here. Signed-off-by: Christoph Heiss --- 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@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@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@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, - 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 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 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel