Changesets: bareos

master 79d989be

2024-01-29 08:15

Sebastian Sura

Ported: N/A

Details Diff
util: make MakeSessionKey use random data

This should make it unfeasable to guess the session key.
mod - core/src/lib/util.cc Diff File

master 90e8716b

2024-01-27 17:03

Christopher Fore


Committer: Bareos Bot

Ported: N/A

Details Diff
core: Fix compile errors on GCC 14

Starting in GCC 14, it will no longer include <algorithm> by default,
resulting in compile errors for various projects.

https://gcc.gnu.org/gcc-14/porting_to.html

Errors:

core/src/cats/sql_get.cc:1309:42: error: cannot convert
'std::vector<std::__cxx11::basic_string<char> >::iterator' to
`const char*'

1309 | jobids.erase(std::remove(jobids.begin(), jobids.end(),
remove_jobid),

core/src/stored/append.cc:78:3: error: `for_each' was not declared in
this scope

78 | for_each(attributes_.begin(), attributes_.end(),

core/src/dird/ua_prune.cc:897:27: error: `remove_if' is not a member
of `std'; did you mean `remove_cv'?

897 | prune_list.erase(std::remove_if(prune_list.begin(),
prune_list.end(),

Signed-off-by: Christopher Fore <csfore@posteo.net>
mod - core/src/cats/sql_get.cc Diff File
mod - core/src/dird/ua_prune.cc Diff File
mod - core/src/stored/append.cc Diff File

master c9e032e0

2024-01-26 18:16

Bareos Bot


Committer: GitHub

Ported: N/A

Details Diff
Merge pull request #1670

Improve FreeBSD dependencies
mod - CHANGELOG.md Diff File
mod - core/platforms/freebsd/bareos-freebsd/bareos.com-common/BareosCommonMakefile Diff File
mod - core/platforms/freebsd/bareos-freebsd/bareos.com-database-postgresql/Makefile Diff File

master 41c54344

2024-01-26 18:16

Bareos Bot

Ported: N/A

Details Diff
Update CHANGELOG.md
mod - CHANGELOG.md Diff File

master 203a3c53

2024-01-26 13:45

Sebastian Sura

Ported: N/A

Details Diff
passive-test: fix not using passive client
mod - systemtests/tests/passive/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in Diff File
mod - systemtests/tests/passive/testrunner Diff File

master 0ab7c243

2024-01-26 13:44

Sebastian Sura

Ported: N/A

Details Diff
stored: fix some bad string formats
mod - core/src/stored/dir_cmd.cc Diff File

master 9b4ca344

2024-01-26 13:05

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
socket-server: fix using global variables

Since our binary is not started correctly, we should not depend on the
state of global objects and instead create them manually when needed.
mod - core/src/dird/socket_server.cc Diff File

master 05c2c19b

2024-01-26 10:54

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
heartbeat: fix data race

Since both Jmsg and the heartbeat thread write to the director socket,
we need to enable locking!
mod - core/src/filed/heartbeat.cc Diff File

master 5dda458d

2024-01-26 10:02

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
heartbeat-interval: create test reproducing data race

This is done with a plugin that just spams job messages for a while.
mod - core/src/plugins/filed/CMakeLists.txt Diff File
add - core/src/plugins/filed/spam/spam.cc Diff File
mod - systemtests/tests/CMakeLists.txt Diff File
add - systemtests/tests/heartbeat-interval/CMakeLists.txt Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/messages/Daemon.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/messages/Standard.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/pool/Differential.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/pool/Full.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/pool/Incremental.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/pool/Scratch.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/profile/operator.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-dir.d/storage/File.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-fd.d/client/myself.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-fd.d/messages/Standard.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-sd.d/device/FileStorage.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-sd.d/messages/Standard.conf Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in Diff File
add - systemtests/tests/heartbeat-interval/etc/bareos/bconsole.conf.in Diff File
add - systemtests/tests/heartbeat-interval/functions Diff File
add - systemtests/tests/heartbeat-interval/test-setup Diff File
add - systemtests/tests/heartbeat-interval/testrunner-check Diff File

master 849d36b2

2024-01-26 08:19

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
connection-pool: remove unused authenticated

Since all connections in the pool were always authenticated, we can
just remove that member and just assume that the connection is
authenticated.
mod - core/src/dird/job.cc Diff File
mod - core/src/dird/ua_status.cc Diff File
mod - core/src/lib/connection_pool.cc Diff File
mod - core/src/lib/connection_pool.h Diff File

master f5d7f23d

2024-01-26 08:19

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
connection-pool: remove unused timeout
mod - core/src/lib/connection_pool.cc Diff File

master 8c2d988d

2024-01-26 07:36

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
connection-pool: add proper timeouts
mod - core/src/dird/fd_cmds.cc Diff File
mod - core/src/dird/job.cc Diff File
mod - core/src/dird/socket_server.cc Diff File
mod - core/src/dird/ua_status.cc Diff File
mod - core/src/lib/connection_pool.cc Diff File
mod - core/src/lib/connection_pool.h Diff File

master 3021d971

2024-01-26 07:36

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
thread-util: make synchronized templated over mutex

This is needed in case you want to use timed mutex for example.
mod - core/src/lib/thread_util.h Diff File

master 9eb6ed62

2024-01-26 07:35

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
thread-util: add wait_until function
mod - core/src/lib/thread_util.h Diff File

master 9f29175d

2024-01-25 14:25

arogge

Ported: N/A

Details Diff
remove unused pkglists
rm - docs/pkglists/Debian_10.x86_64 Diff File
rm - docs/pkglists/EL_7.x86_64 Diff File
rm - docs/pkglists/SLE_12_SP5.x86_64 Diff File
rm - docs/pkglists/Solaris_11.4.i386 Diff File
rm - docs/pkglists/Solaris_11.4.sparc Diff File
rm - docs/pkglists/win32-debug Diff File
rm - docs/pkglists/win32-release Diff File
rm - docs/pkglists/win64-debug Diff File

master 21c6f768

2024-01-25 14:17

arogge

Ported: N/A

Details Diff
matrix: remove distros that will EOL this year

As the platforms that EOL this year are not a target for Bareos 24
anymore, we remove them from the build for master.
The platforms are:
- Debian 10
- RHEL 7
- SLES 12
mod - .matrix.yml Diff File

master 30170f50

2024-01-25 12:45

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
connection-pool: search from last to first

This was also done this way before the rewrite
mod - core/src/lib/connection_pool.cc Diff File

master ec48c873

2024-01-25 11:59

joergs

Ported: N/A

Details Diff
python-bareos: requires from 2.7 to 3.6 (RHEL7)
mod - python-bareos/setup.py Diff File

master 76418693

2024-01-25 11:05

arogge


Committer: Bareos Bot

Ported: N/A

Details Diff
matrix: add openssl 3 ulc

also upgrade the openssl 1.1 ulc to build on ubuntu 20.
mod - .matrix.yml Diff File
rm - docs/pkglists/ULC_deb_OpenSSL_1.1.i586 Diff File
add - docs/pkglists/ULC_deb_OpenSSL_3.0.x86_64 Diff File

master a51168ea

2024-01-25 07:10

Sebastian Sura

Ported: N/A

Details Diff
fvec: better remap emulation

We first try to extend the first mapping instead of doing the whole
unmark + mark step.
mod - core/src/stored/backends/dedup/fvec.h Diff File

master 1c8cb447

2024-01-25 07:10

Sebastian Sura

Ported: N/A

Details Diff
fvec: add madvise after mmap

We want to use huge pages if possible to reduce the number of page
faults.
mod - core/src/stored/backends/dedup/fvec.h Diff File

master 5436ec99

2024-01-25 07:09

Sebastian Sura

Ported: N/A

Details Diff
fvec: remove fallocate

It turns out that posix_fallocate can become very slow on glibc if you
the filesystem does not really support it since the fallback is just
writing a bunch of zeroes into the file. This is not what we want so
we only use ftruncate for now.
mod - core/src/stored/backends/dedup/fvec.h Diff File

master 8074342e

2024-01-24 15:13

Bareos Bot


Committer: GitHub

Ported: N/A

Details Diff
Merge pull request #1647

Make BareosDirPluginPrometheusExporter.py work with python3
mod - CHANGELOG.md Diff File
mod - contrib/dir-plugins/prometheus/BareosDirPluginPrometheusExporter.py Diff File

master a4eddda1

2024-01-24 15:13

Bareos Bot

Ported: N/A

Details Diff
Update CHANGELOG.md
mod - CHANGELOG.md Diff File

master a79789a4

2024-01-23 10:32

Sebastian Sura


Committer: Bareos Bot

Ported: N/A

Details Diff
connection-pool: fix data race

Some operations were improperly synchronized. For example take
cleanup() for example:

```
|for (i = connections_->size() - 1; i >= 0; i--) {
1| connection = connections_->get(i);
| Dmsg2(800, "checking connection %s (%d)\n", connection->name(), i);
2| if (!connection->check()) {
| Dmsg2(120, "connection %s (%d) is terminated => removed\n",
| connection->name(), i);
| connections_->remove(i);
4| delete (connection);
| }
|}
```
We dont lock connections_ or connection in anyway here. This means
that not only could we get a NULL returned at (1), we also have to
account for the fact that at any moment connection could get deleted
from under us from a different thread -- even if we are currently
holding its lock. This will happen if two threads call cleanup at
the same time and one is at (2) while the other one is at (4).

Similarly the check() function just calls WaitDataIntr() on the socket
without ensuring exclusive access (for example by locking the
connection!). WaitDataIntr is not a const function so its not safe to
call without ensuring exclusive access. Even though it might look
like this should be safe since the function just waits, but it in fact
can write to some internal data (e.g. b_errno in case of an error)
which can definitely cause problems.

Connection::in_use is also very misleading. While it does not suffer
from the data race problem (as its an atomic value), its
interpretation does: If you read false from it, you do not actually know
whether some thread is using the connection (and has yet to update the
bool) or if the connection is actually unused.

All these problems and some more lead to the decision to rewrite this
code completely.

The basic idea is that the connection pool now is simply a vector of
connections protected by one lock. The connections itself do not have
a lock.

The locks are owned by the vector. The only way to interact with the
connections inside the pool is by locking the whole vector. This
eliminates all the problems above.

The connections itself are now also an raii type. They own the socket
they hold. That means that they will take care of closing/destroying
the socket once they leave the scope (similarly to a unique pointer).
mod - core/src/dird/fd_cmds.cc Diff File
mod - core/src/dird/fd_cmds.h Diff File
mod - core/src/dird/job.cc Diff File
mod - core/src/dird/socket_server.cc Diff File
mod - core/src/dird/ua_status.cc Diff File
mod - core/src/lib/connection_pool.cc Diff File
mod - core/src/lib/connection_pool.h Diff File
 First  Prev  1 2 3 ... 8 9 10 11 12 13 14 ... 60 ... 120 ... 180 ... 240 ... 300 ... 360 ... 420 ... 480 ... 540 ... 600 ... 607 608 609  Next  Last