openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
920 stars 437 forks source link

obsstoragesetup fails when OBS/server LV is >50% of the VG #16455

Open Conan-Kudo opened 2 months ago

Conan-Kudo commented 2 months ago

Issue Description

When setting up the OBS storage VG and allocating >50% of it to the server LV, obsstoragesetup fails because the math used results in negative numbers.

https://github.com/openSUSE/open-build-service/blob/2555059ee1b6002be75fa2ad38918670a32ba4e4/dist/obsstoragesetup#L226-L250

Expected Result

obsstoragesetup should be able to determine when this happens and handle it accordingly.

How to Reproduce

  1. Create a fresh machine with two disks, the first disk being an OS disk and the second being the data disk with OBS VG.
  2. Create a server LV with 60% of the VG space.
  3. Install the OBS appliance on the first disk.

Further Information

This was with OBS server 2.10.22, but also reproduces with Git master.

krauselukas commented 2 months ago

@M0ses is this similar to https://github.com/openSUSE/open-build-service/issues/14579 ?