<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dss/dss.c, branch next</title>
<subtitle>DSS - dyadic snapshot scheduler</subtitle>
<id>https://git.tue.mpg.de/cgit/dss/atom?h=next</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/dss/atom?h=next'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/'/>
<updated>2023-11-07T14:11:55Z</updated>
<entry>
<title>Fix --config-file for relative paths.</title>
<updated>2023-11-07T14:11:55Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2023-09-19T14:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=cac14c7d96355a9ca02f69627f01ddebe699afcc'/>
<id>urn:sha1:cac14c7d96355a9ca02f69627f01ddebe699afcc</id>
<content type='text'>
The dss lock works by first turning the given config file path
argument into a canonical absolute path using dss_realpath(), then
hashing this absolute path to obtain a key ID for semget(2).

If the given path is relative, we have to compute the ID before
changing to the destination directory because dss_realpath() needs to
call stat(2) to detect symlinks, and this system call will fail if the
current working directory has changed. This is currently not the case
as we change to the destination directory early in check_config().

If dss_realpath() fails, we silently use the unmodified path argument
for hashing to deal with the case that the default config does not
exist. As a result, if relative paths are given, the key ID depends
on whether or not change_to_dest_dir() was called. This is the case
for the run subcommanmd, but not for the kill subcommand. Thus the
kill subcommand does not work as expected if a relative path is given.

Fix this by grabbing the lock before changing the working directory
in all cases.
</content>
</entry>
<entry>
<title>Avoid duplicate error message.</title>
<updated>2020-05-17T15:08:33Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2020-05-17T15:08:33Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=bf0f03c00f6de518d01b6cb1e94c1d447e5cd3b1'/>
<id>urn:sha1:bf0f03c00f6de518d01b6cb1e94c1d447e5cd3b1</id>
<content type='text'>
If parse_config_file() encounters an error, it logs the error *and*
returns the error code, which causes the error message to be logged
again. Fix this by removing the log statement from parse_config_file().
</content>
</entry>
<entry>
<title>Merge branch 'refs/heads/t/prune'</title>
<updated>2019-11-07T11:31:02Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-11-07T11:31:02Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=766ebea19c1618ddab85a4fc6af2a5bf53a9ec38'/>
<id>urn:sha1:766ebea19c1618ddab85a4fc6af2a5bf53a9ec38</id>
<content type='text'>
A couple of cleanups and unifications for the snapshot pruning code,
which is executed by the prune and run subcommands. With the patches
applied, both subcommands behave identically, i.e. they consider
the same set of snapshots as candidates for pruning. Also the prune
command gained the new --disk-space option to force it to act as if
disk space was high or low.

Cooking for six weeks.

* refs/heads/t/prune:
  Introduce prune --disk-space.
  Revamp com_prune().
  Factor out find_removable_snapshot().
  prune Simplify rm exit code logic.
  find_oldest_removable_snapshot(): Improve log message.
  prune: Print a message if there is nothing to prune.
  get_snapshot_list(): Add comment about sorting.
  prune: Fail gracefully if pre-rm hook fails.
</content>
</entry>
<entry>
<title>Fix logic to append slash to the source directory.</title>
<updated>2019-10-25T11:29:50Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-10-25T11:29:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=2f2b61d159e93e3da97c21da3d644c2c549bf12c'/>
<id>urn:sha1:2f2b61d159e93e3da97c21da3d644c2c549bf12c</id>
<content type='text'>
This bug was introduced recently in commit dd3f58c0bdf1
(create_rsync_argv(): Allocate correctly sized arg array) which
redefined N.
</content>
</entry>
<entry>
<title>Simplify split_args().</title>
<updated>2019-10-13T03:58:52Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-02-06T16:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=c3ad4e36f7ee18ab6fab4595fa2728a47c1db761'/>
<id>urn:sha1:c3ad4e36f7ee18ab6fab4595fa2728a47c1db761</id>
<content type='text'>
Both callers pass the same value for the delimiters, so we can
remove the last argument of the function.
</content>
</entry>
<entry>
<title>Introduce prune --disk-space.</title>
<updated>2019-09-21T13:11:09Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-02-07T22:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=71a8073e6f18ccc21880a475af8d864279a960b8'/>
<id>urn:sha1:71a8073e6f18ccc21880a475af8d864279a960b8</id>
<content type='text'>
The new option takes a mandatory argument of the set {check, high,
low}. The latter two make the command act as if disk space was
high/low without actually performing the check. This is mostly useful
for debugging.
</content>
</entry>
<entry>
<title>Revamp com_prune().</title>
<updated>2019-09-21T13:11:09Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-09-01T17:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=d4d72473957544283b6d426c3d4fa0b3f583da87'/>
<id>urn:sha1:d4d72473957544283b6d426c3d4fa0b3f583da87</id>
<content type='text'>
The prune subcommand implements its own logic for picking the snapshot
to remove. The algorithm is similar but not identical to how the run
subcommand gets rid of snapshots.

This patch eliminates this inconsistency by changing com_prune()
to call the find_removable_snapshot() helper which was introduced in
the previous commit.

Since find_removable_snapshot() returns a dynamically allocated string
via the "why" pointer, we have to introduce another label for freeing
this memory.

The patch also improves the help text of the prune subcommand slightly.
</content>
</entry>
<entry>
<title>Factor out find_removable_snapshot().</title>
<updated>2019-09-21T13:10:50Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-02-07T19:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=e3f9c1dcc861be14fc9a3f33057a905047e9a926'/>
<id>urn:sha1:e3f9c1dcc861be14fc9a3f33057a905047e9a926</id>
<content type='text'>
Both the run and the prune subcommand contain code for picking a
suitable snapshot to remove, with slightly different semantics.

This is a preparatory patch for eliminating the differences between
the two implementations. It introduces a new helper which can be
shared. After this patch, only the run subcommand uses the helper. A
subsequent patch will convert the second caller, com_prune().
</content>
</entry>
<entry>
<title>prune Simplify rm exit code logic.</title>
<updated>2019-09-21T13:08:40Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-09-01T17:31:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=8255344c3fe023bde18aa06e0f860752445d0735'/>
<id>urn:sha1:8255344c3fe023bde18aa06e0f860752445d0735</id>
<content type='text'>
We can rely on the fact that wait_for_remove_process() sets
snapshot_removal_status to the correct value on success.
</content>
</entry>
<entry>
<title>find_oldest_removable_snapshot(): Improve log message.</title>
<updated>2019-09-21T13:08:40Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2019-02-10T11:05:27Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=4b924a3bd5b3dd3e5d28de86def51a25034291f1'/>
<id>urn:sha1:4b924a3bd5b3dd3e5d28de86def51a25034291f1</id>
<content type='text'>
The other three functions which return a candidate for removal print
one debug message but not the name of the selected snapshot, so make
find_oldest_removable_snapshot() follow this pattern too.
</content>
</entry>
</feed>
