freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
379 stars 161 forks source link

Invalid behavior after the ZPOOL variable is changed by the user: packages disappear after reboot #1104

Open yurivict opened 6 months ago

yurivict commented 6 months ago

Prerequisites

Describe the bug

When the ZPOOL value is changed by the user old datasets become invalid, yet poudriere starts and works while they are mounted. This causes unpredictable behavior. Particularly, built packages become unavailable after reboot due to confusion that invalid datasets cause.

How to reproduce

Steps to reproduce the behavior:

  1. Run poudriere
  2. Change ZPOOL
  3. Run poudriere again
  4. Observe that old and new ZFS datasets are both mounted

Expected behavior

During the startup: poudriere should look at each ZFS dataset that is mounted under /usr/local/poudriere, and it should remove it if it is mounted on zpool that isn't currently configured to use poudriere (the ZPOOL variable isn't equal to it).

Environment