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:
Run poudriere
Change ZPOOL
Run poudriere again
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
Poudriere Version [e.g. 3.3.1 or git hash or port version]: 3.3.7
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:
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