View Issue Details

IDProjectCategoryView StatusLast Update
0000499bareos-coredirectorpublic2015-11-30 18:47
Reportermvwieringen Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformOpenIndianaOSOpenIndianaOS Versionb151a
Product Version14.2.5 
Summary0000499: Director state file gets truncated
DescriptionWhen using the -t (test config) option the state file with the last ran
Jobs gets truncated.
Additional InformationIn test mode we do not load the actual previous state file content but do write
out the empty state information which truncates the original state-file.
As the systemd start script uses the -t option to make sure the config is
working it always truncates the state file on start/restart/
TagsNo tags attached.

Relationships

child of 0000474 closed Release bareos-14.2.6 

Activities

mvwieringen

mvwieringen

2015-08-04 20:21

developer   ~0001797

Fix committed to bareos master branch with changesetid 5475.
mvwieringen

mvwieringen

2015-08-14 22:21

developer   ~0001803

Fix committed to bareos bareos-14.2 branch with changesetid 5499.

Related Changesets

bareos: master 88765d11

2015-08-04 12:07

mvwieringen

Ported: N/A

Details Diff
Fix state file truncation when running bareos-dir -t

When bareos-dir -t is run (which is done from the systemd startup) we
never read the state-file nor create a pid-file but in the
terminate_dird() function we unconditionally write a new state-file
which means we clobber its content.

We now keep track of the test_config flag using a static global variable
and don't try updating the state-file nor removing the pid-file in
terminate_dird() when we are in test_config mode.

Also made the terminate_dird() and terminate_stored() static as they are
not referenced from anywhere else anyway so lets not clobber the
namespace with it.

Fixes 0000499: Director state file gets truncated
Affected Issues
0000499
mod - src/dird/dird.c Diff File
mod - src/stored/stored.c Diff File

bareos: bareos-14.2 6dd8b299

2015-08-04 22:22

mvwieringen

Ported: N/A

Details Diff
Fix state file truncation when running bareos-dir -t

When bareos-dir -t is run (which is done from the systemd startup) we
never read the state-file nor create a pid-file but in the
terminate_dird() function we unconditionally write a new state-file
which means we clobber its content.

We now keep track of the test_config flag using a static global variable
and don't try updating the state-file nor removing the pid-file in
terminate_dird() when we are in test_config mode.

Also made the terminate_dird() and terminate_stored() static as they are
not referenced from anywhere else anyway so lets not clobber the
namespace with it.

Fixes 0000499: Director state file gets truncated
Affected Issues
0000499
mod - src/dird/dird.c Diff File
mod - src/stored/stored.c Diff File

Issue History

Date Modified Username Field Change
2015-08-04 20:19 mvwieringen New Issue
2015-08-04 20:19 mvwieringen Status new => assigned
2015-08-04 20:19 mvwieringen Assigned To => mvwieringen
2015-08-04 20:21 mvwieringen Changeset attached => bareos master 88765d11
2015-08-04 20:21 mvwieringen Note Added: 0001797
2015-08-04 20:21 mvwieringen Status assigned => resolved
2015-08-04 20:21 mvwieringen Resolution open => fixed
2015-08-14 22:21 mvwieringen Changeset attached => bareos bareos-14.2 6dd8b299
2015-08-14 22:21 mvwieringen Note Added: 0001803
2015-10-02 19:59 mvwieringen adm Assigned To mvwieringen =>
2015-10-02 19:59 mvwieringen adm Status resolved => closed
2015-11-30 18:47 joergs Relationship added child of 0000474