<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dss/err.h, branch master</title>
<subtitle>DSS - dyadic snapshot scheduler</subtitle>
<id>https://git.tue.mpg.de/cgit/dss/atom?h=master</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/dss/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/'/>
<updated>2025-03-23T18:13:50Z</updated>
<entry>
<title>Switch back to variadic log macros.</title>
<updated>2025-03-23T18:13:50Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2024-10-23T16:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=07b73ad8272084b706d18ee2286bf25711dbaabb'/>
<id>urn:sha1:07b73ad8272084b706d18ee2286bf25711dbaabb</id>
<content type='text'>
This essentially reverts commit 66cdd5bc99a5 which aimed to make the
dss log facility C89 conform. While this was a worthwhile goal in
2012, it has little value today, since in 2025 we can safely assume
a C99 compliant compiler.

The patch was created with

	git revert -Xours 66cdd5bc

followed by manual tweaks to make it compile again.
</content>
</entry>
<entry>
<title>Dedoxify the source.</title>
<updated>2025-02-01T19:11:59Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2024-10-22T18:01:10Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=5770e00c6e59528762be20610af6d8bd24d6872f'/>
<id>urn:sha1:5770e00c6e59528762be20610af6d8bd24d6872f</id>
<content type='text'>
The doxygen comments actually make the source code harder to read,
because they tend to document the obvious. Besides, they are not used
uniformly accross the code base anyway.
</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>Replace license boilerplate with single line SPDX comments.</title>
<updated>2017-11-19T01:53:25Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-11-06T00:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=1f5ecfacc341f893d73caa0a613d553af33a6cc9'/>
<id>urn:sha1:1f5ecfacc341f893d73caa0a613d553af33a6cc9</id>
<content type='text'>
This gets rid of existing copyright templates in favor of just the
one-liner SPDX (Software Package Data Exchange) notice. All files are
licensed under the GPL-2.0, so the same tag is added to each file. No
copyright is changed by this commit.

Several files (mostly the very short ones) did not contain a license
text so far. By default all files without license information are
under the default license of this package, which is GPL version 2.
This commit adds the missing SPDX line so that now all files except
dss.css, index.html.in, INSTALL, NEWS and README have it.

We also remove author and copyright year, since the author is the same
everywhere, and the year hasn't been updated any more since at least
six years. Accurate information is available from the git log.

The COPYING file can also be removed because the license text at
https://spdx.org/licenses/GPL-2.0.html is immutable.
</content>
</entry>
<entry>
<title>Merge branch 'refs/heads/t/kill-w'</title>
<updated>2017-11-18T14:56:55Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-11-18T14:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=324d1364004376fa0b018afcb57cfe14aca7fcdb'/>
<id>urn:sha1:324d1364004376fa0b018afcb57cfe14aca7fcdb</id>
<content type='text'>
Two patches which make life easier for shutdown scripts which need
to terminate the dss process, but would like to wait until the exit
hook completed.

The merge conflicted in dss.suite, but this was trivial to fix.

Cooking for a week.

* refs/heads/t/kill-w:
  kill: New option --wait.
  run: Wait for children to die.
</content>
</entry>
<entry>
<title>kill: New option --wait.</title>
<updated>2017-11-11T15:26:09Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-10-15T16:08:47Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=faed24aec8859d232fe3c0da415265e0de099ce4'/>
<id>urn:sha1:faed24aec8859d232fe3c0da415265e0de099ce4</id>
<content type='text'>
Simply running "dss kill" during system shutdown to terminate the
dss process does not work as expected because the kill subcommand
exits after the signal has been sent, which might be long before the
targeted dss process terminates.

For example, the dss main process might be running its exit hook to
inform the system administrator about the fact that the dss service
is going down when the shutdown procedure already has deactivated the
network. Or the shutdown procedure kills the exit hook with SIGKILL
during its normal "killing remaining processes" phase before file
systems are unmounted.

With the --wait option, the kill subcommand will not return until the
dss process has died or the timeout expires. We hardcode the timeout
in send_signal() for the time being. It can be made configurable if
this turns out to be necessary.
</content>
</entry>
<entry>
<title>New option: --mountpoint.</title>
<updated>2017-10-21T11:06:45Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-10-16T15:19:08Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=31b7424d5b47509ed22667ca2ee31a5590664606'/>
<id>urn:sha1:31b7424d5b47509ed22667ca2ee31a5590664606</id>
<content type='text'>
The new option applies to run, create, ls and prune. The feature
could be implemented as a pre-create hook, but since it is so common,
it makes sense to add it to dss proper.

As for the implementation we simply check that "." and ".." are on
different devices (or are identical).
</content>
</entry>
<entry>
<title>run: Improve error message if dss is already running.</title>
<updated>2017-07-13T20:54:03Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2016-06-17T07:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=25b4f1983a3804353f5fc879f93ecde978a90aaf'/>
<id>urn:sha1:25b4f1983a3804353f5fc879f93ecde978a90aaf</id>
<content type='text'>
The current error message, "child terminated unexpectedly", is not
very comprehensive.

The most likely reason for the child to terminate is that it could not
obtain the semaphore lock because another dss process is running. This
commit adds a test to com_run() that check this condition in the
parent before the child process is born. This way, if another process
is holding the lock, we can fail with a nice error message that also
includes the pid of the process that holds the lock.
</content>
</entry>
<entry>
<title>Convert dss to lopsub.</title>
<updated>2017-07-13T20:54:03Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2016-05-06T14:18:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=3025388040c1521121255e5ae7ceabdcb1b1e421'/>
<id>urn:sha1:3025388040c1521121255e5ae7ceabdcb1b1e421</id>
<content type='text'>
This commit ditches gengetopt for the command line and config file
parsers in favor of the lopsub library. Hence from now on, lopsub
must be installed in order to compile dss while gengetopt is no
longer needed.

The mutually exclusive gengetopt group options --create, --prune, --ls,
--run, --kill and --reload are replaced by lopsub subcommands. However,
the --reload and --kill options have been combined to the new "kill"
subcommand which allows to send arbitrary signals to a running dss
process.

Due to the conversion, the syntax of the dss command changes
slightly. For example,

	dss --run

becomes

	dss run

while

	dss -Rdc foo

needs to be spelled as

	dss -c foo -- run -d

so that -d is regarded as an option to the "run" subcommand rather
than an option to dss.

With lopsub each subcommand has its own command line and config file
parser. Options to subcommands can be added to the configuration file
like this:

[run]
	daemon
	logfile=/var/log/dss.log

As for the implementation, the bulk of the changes is the conversion
of dss.ggo to the new dss.suite. The necessary adjustments to the
code are relatively simple. In particular, only dss.c needs to be
changed while all other .c files don't require any modifications.

The examples in INSTALL are adjusted to the new syntax. The commit also
drops support for Mac OS and Solaris, since lopsub is not supported
on these platforms yet.
</content>
</entry>
<entry>
<title>Rework restart logic, introduce --max-errors.</title>
<updated>2015-01-27T09:47:54Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2014-12-12T14:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=61e824a2563c8b78401278faf6d4e9fad29c1c12'/>
<id>urn:sha1:61e824a2563c8b78401278faf6d4e9fad29c1c12</id>
<content type='text'>
It has happened several times in the past that dss made no progress
because the underlying rsync command terminates with exit code 13
(Errors with program diagnostics). Currently dss special cases this
exit code as a non-fatal error, i.e. it does not terminate but restarts
the rsync command after 60 seconds. If the problem is permanent,
no new snapshots will be created, but the exit hook is not called
either, which is unfortunate.

This commit tries to improve on this. With this patch applied, the
only non-fatal exit code from rsync is 24 (Partial transfer due
to vanished source files), which is actually considered success.
All other non-zero exit codes cause dss to restart the rsync command,
but only at most N times, where N is the argument given to the new
--max-rsync-errors option.
</content>
</entry>
</feed>
