When I try to activate the original boot environment on my system using the command sudo bectl activate 12.0-ALPHA8 (environment was renamed from default) it is reported as unsuccessful. The follow error is printed to stderr: cannot promote 'zroot/ROOT/12.0-ALPHA8': not a cloned filesystem
That makes sense. When I wrote the promotion-upon-activation, I didn't take that kind of condition into account. I'll try to come up with a fix tonight or tomorrow.
Essentially, what needs to happen is look for the `clones` ZFS property of the to-be-activated BE. Only promote when the `clones` property is non-NULL and contains a string of a length greater than 0.
s/clones/origin/
Created attachment 198499 [details] svn(1) diff against head Hi, Attached patch should address. "origin" property is used to reflect base snapshot used for this dataset- if property exists, we should promote. This seems to do the right thing for me.
The posted patch works for me.
A commit references this bug: Author: kevans Date: Thu Nov 1 14:00:56 UTC 2018 New revision: 339994 URL: https://svnweb.freebsd.org/changeset/base/339994 Log: libbe(3): Don't promote non-cloned BEs Most easily reproducible by attempting to activate the currently activated BE, one would get a "not a cloned filesystem" error instead of success or a sane message. PR: 232488 MFC after: 3 days Changes: head/lib/libbe/be.c
Thanks! I'll MFC this in due time for 12.0.
A commit references this bug: Author: kevans Date: Mon Nov 5 18:12:41 UTC 2018 New revision: 340154 URL: https://svnweb.freebsd.org/changeset/base/340154 Log: MFC r339994: libbe(3): Don't promote non-cloned BEs Most easily reproducible by attempting to activate the currently activated BE, one would get a "not a cloned filesystem" error instead of success or a sane message. PR: 232488 Approved by: re (gjb) Changes: _U stable/12/ stable/12/lib/libbe/be.c