<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libbe/be_error.c, branch release/12.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2020-02-07T21:57:27Z</updated>
<entry>
<title>MFC r357067: Drop "All Rights Reserved" from all libbe/bectl files</title>
<updated>2020-02-07T21:57:27Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-02-07T21:57:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1d1ed1a5d73fd91fb6dfbd4dda0ae2f22593c9cf'/>
<id>urn:sha1:1d1ed1a5d73fd91fb6dfbd4dda0ae2f22593c9cf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MFC r356279: libbe(3): promote dependent clones when destroying a BE</title>
<updated>2020-01-10T03:37:52Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-01-10T03:37:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a8b7e8cd3ce219e10b39c07d6bbd93c6be1d8d4f'/>
<id>urn:sha1:a8b7e8cd3ce219e10b39c07d6bbd93c6be1d8d4f</id>
<content type='text'>
When removing a boot environment iterate over the dependents and process the
snapshots by grabbing any clones. Promote the clones we found and then
remove the target environment.

This fixes the ability to destroy a boot environment when it has been used
to spawn one or more other boot environments.

PR:		242592
</content>
</entry>
<entry>
<title>MFC r343335, r343977, r343993-r343994, r344034, r344084, r345302, r345769</title>
<updated>2019-04-08T17:41:39Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-04-08T17:41:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fa88eafaf8cf5b055f6907e8fc09ad68462bc523'/>
<id>urn:sha1:fa88eafaf8cf5b055f6907e8fc09ad68462bc523</id>
<content type='text'>
r343335:
libbe(3): simplify import, allow replication streams

Previously, we directly used libzfs_core's lzc_receive to import to a
temporary snapshot, then cloned the snapshot and setup the properties. This
failed when attempting to import replication streams with questionable
error.

libzfs's zfs_receive is a much better fit here, so we now use it instead
with the destination dataset and let libzfs take care of the dirty details.
be_import is greatly simplified as a result.

r343977:
libbe(3): Add a destroy option for removing the origin

Currently origin snapshots are left behind when a BE is destroyed, whether
it was an auto-created snapshot or explicitly specified via, for example,
`bectl create -e be@mysnap ...`.

Removing it automatically could be argued as a POLA violation in some
circumstances, so provide a flag to be_destroy for it. An accompanying
option will be added to bectl(8) to utilize this.

Some minor style/consistency nits in the affected areas also addressed.

r343993:
bectl(8): Add -o flag to destroy to clean up the origin snapshot of BE

We can't predict when destruction of origin is needed, and currently we have
a precedent for not prompting for things. Leave the decision up to the user
of bectl(8) if they want the origin snapshot to be destroyed or not.

Emits a warning when -o isn't used and an origin snapshot is left to be
cleaned up, for the time being. This is handy when one drops the -o flag but
really did want to clean up the origin.

A couple of -e ignore's have been sprinkled around the test suite for places
that we don't care that the origin's not been cleaned up. -o functionality
tests will be added in the future, but are omitted for now to reduce
conflicts with work in flight to fix bits of the tests.

r343994:
bectl(8): commit missing test modifications from r343993

r344034:
libbe(3): Belatedly note the BE_DESTROY_ORIGIN option added in r343977

r344084:
libbe(3): Fix be_destroy behavior w.r.t. deep BE snapshots and -o

be_destroy is documented to recursively destroy a boot environment.  In the
case of snapshots, one would take this to mean that these are also
recursively destroyed.  However, this was previously not the case.
be_destroy would descend into the be_destroy callback and attempt to
zfs_iter_children on the top-level snapshot, which is bogus.

Our alternative approach is to take note of the snapshot name and iterate
through all of fs children of the BE to try destruction in the children.

The -o option is also fixed to work properly with deep BEs.  If the BE was
created with `bectl create -e otherDeepBE newDeepBE`, for instance, then a
recursive snapshot of otherDeepBE would have been taken for construction of
newDeepBE but a subsequent destroy with BE_DESTROY_ORIGIN set would only
clean up the snapshot at the root of otherDeepBE: ${BEROOT}/otherDeepBE@...

The most recent iteration instead pretends not to know how these things
work, verifies that the origin is another BE and then passes that back
through be_destroy to DTRT when snapshots and deep BEs may be in play.

r345302:
bectl(8): change jail command to execute jail(8)

The jail(8) command provides a variety of jail pseudo-parameters that are
useful to consumers of bectl, mount.devfs being the most-often-requested
paramater by bectl users.

command, exec.start, nopersist, and persist may not be specified via -o to
bectl. The command/exec.start remains passed as it always has at the end of
bectl, and persistence is dictated by -b/-U bectl jail arguments.

r345769:
libbe: Fix zfs_is_mounted check w/ snapshots

'be_destroy' can destroy a boot environment (by name) or a given snapshot.
If the target to be destroyed is a dataset, check if it's mounted. We don't
want to check if the origin dataset is mounted when destroying a snapshot.

PR:		236043
</content>
</entry>
<entry>
<title>libbe(3): Fix error handling with respect to be_exists</title>
<updated>2018-09-01T02:22:26Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-09-01T02:22:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=162ec569493ba1919857c22a957c97700246da14'/>
<id>urn:sha1:162ec569493ba1919857c22a957c97700246da14</id>
<content type='text'>
Some paths through be_exists will set the error state, others will not
There are multiple reasons that a call can fail, so clean it up a bit: all
paths now return an appropriate error code so the caller can attempt to
distinguish between a BE legitimately not existing and just having the wrong
mountpoint. The caller is expected to bubble the error through to the
internal error handler as needed.

This fixes some unfriendliness with bectl(8)'s activate subcommand, where
it might fail due to a bad mountpoint but the only message output is a
generic "failed to activate" message.

Approved by:	re (gjb)
</content>
</entry>
<entry>
<title>libbe(3): More error handling bits</title>
<updated>2018-08-10T21:23:56Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-08-10T21:23:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c65a211146e723379e956cdc63fe1c4a114deac3'/>
<id>urn:sha1:c65a211146e723379e956cdc63fe1c4a114deac3</id>
<content type='text'>
be_add_child functionality gets split out into separate places as a bonus.
A lot of places here we'll gloss over libzfs errors, because they shouldn't
be happening given the conditions that we're operating under. "Unknown
error" is what I'm intending to use for the moment to indicate an
exceptional circumstance- exceptional enough that we can't tell the consumer
did because we're not so certain that they did anything.
</content>
</entry>
<entry>
<title>libbe(3): Clarify some errors</title>
<updated>2018-08-08T03:25:10Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-08-08T03:25:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2989df090ae6fa23ea8c75420a37c9054c0d0500'/>
<id>urn:sha1:2989df090ae6fa23ea8c75420a37c9054c0d0500</id>
<content type='text'>
While here, fix a bug with 'rename' that checked the wrong name for being
the active BE.
</content>
</entry>
<entry>
<title>Catch up on BE_ERR messages</title>
<updated>2018-08-08T03:11:13Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-08-08T03:11:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=50a1972ed878e14a0bb59c43f452058330865f74'/>
<id>urn:sha1:50a1972ed878e14a0bb59c43f452058330865f74</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libbe(3)/bectl(8): Standardize $FreeBSD$ IDs</title>
<updated>2018-08-07T14:02:41Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-08-07T14:02:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b6e7c421b75c07ddb0449e1692198dbb3c36547c'/>
<id>urn:sha1:b6e7c421b75c07ddb0449e1692198dbb3c36547c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libbe(3)/bectl(8): Standardize copyright headers</title>
<updated>2018-08-07T13:46:06Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-08-07T13:46:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b179da0111bf5734c60d07c110e8abae9cea300f'/>
<id>urn:sha1:b179da0111bf5734c60d07c110e8abae9cea300f</id>
<content type='text'>
- File names don't necessarily need to be repeated
- Add SPDX tags
- Add a missing copyright for Kyle Kneitinger in bectl.8, originally written
  by him in GSoC 2017; his standard copyright notice has been copied from
  other files within the same directory to remain consistent with how he
  clearly wished to portray it
</content>
</entry>
<entry>
<title>libbe(3): Document that we'll clobber previous errors set by set_error</title>
<updated>2018-08-07T03:26:32Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2018-08-07T03:26:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=20b7b8d86cc142b839c661557553965984818e70'/>
<id>urn:sha1:20b7b8d86cc142b839c661557553965984818e70</id>
<content type='text'>
</content>
</entry>
</feed>
