previously the disk selection was reset if the advanced options
dialogue was re-opened. this commit adapts the behavior to restore
the previous selection.
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This is basically "installer information" and will is used
for things such as default values for which we do not want
to pass around all the data.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The convoluted calculation logic in case the disks is 8GB leads to
datasize becoming 16EiB further down:
* after calculating and removing the rootsize from $rest, $rest becomes
smaller than $space (which should be the minimal non-used space in the
volume-group) - this leads to a negative value, which overflows in
the `& ~0xFFF` opration.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
While this was already done in the $rest < 48 GiB cases, it wasn't yet
done for the else branch and also not if $maxroot_mb was assigned,
because of being smaller.
Second and last step towards fixing an issue reported in the community
forum [0] where using 250.00 hdsize, 250 maxroot and 0 minfree would
fail.
Turns out two extents would be missing because of lvcreate implicitly
rounding up, one of them for the root LV (the one for metadata was
already handled in the previous commit).
[0]: https://forum.proxmox.com/threads/129320/post-566375
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
First step towards fixing an issue reported in the community forum [0]
where using 250.00 hdsize, 250 maxroot and 0 minfree would fail.
Turns out two extents would be missing because of lvcreate implicitly
rounding up, one of them for the metadata.
[0]: https://forum.proxmox.com/threads/129320/post-566375
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Otherwise the user only has 5 seconds to see the error message before
the machine reboots.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
If lots of disks are present and the available screen size is rather
small, it might be impossible for users to properly set all disks as
they want.
Fix it by making the view scrollable.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
previously the tui used `u64` internally to represent the disk size.
since the perl-based installer expects GiB as floats and that is also
what is displayed in the tui that meant a lot of converting back and
forth. it also lead to an error where the disk sizes that were set
seemed to not have been persisted, even though the sizes were
correctly set. this commit refactors the installer to convert the size
once in the beginning and then stick to `f64`.
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>
Tested-by: Christoph Heiss <c.heiss@proxmox.com>
Perl definitively acts very different with the while variant, it
seems it keeps the file handle open and reuses it in future calls,
even if the directory base of the glob is different
This reverts commit 90fb3d7615.
the for/foreach ones read everything in to build a list and then
iterate that, the while one is lazy and needs less memory.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
When the prompt abstraction got added in bc05a8f ("add basic UI
plugin infrastructure") it also inlined the check for the answer, as
that can be differently structured for each user interface, and
returns bool. But when switching over to this new infra, two sites
weren't updated to the simpler bool check and still checked with the
previous "equals 'ok'", which now was always false.
Fixes: 72bea99 ("switch prompt, error and message calls to new UI infra")
Reported-by: Alexander Zeidler <a.zeidler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
it's just safer to make the user look at the summary and avoid that a
stray enter hits of the installation.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
except the password dialog, since the user must provide input
to do that, we have to set the focus index on all relevant views
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
After eaa7d41 - which directs all stderr from the TUI to tty2 - this can
be safely done without interrupting the TUI.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Since we already handly non-present domain names, invalid names can be
handled the same way, as not to completely fail the installation.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>