View Issue Details

IDProjectCategoryView StatusLast Update
0000499bareos-core[All Projects] directorpublic2015-11-30 18:47
ReportermvwieringenAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformOpenIndianaOSOpenIndianaOS Versionb151a
Product Version14.2.5 
Target Version14.2.6Fixed in Version 
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.
bareos-master: impactyes
bareos-master: actionwill care
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impactyes
bareos-14.2: actionwill care
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

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 10:07:04

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 20:22:23

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:20 mvwieringen bareos-master: impact => yes
2015-08-04 20:20 mvwieringen bareos-master: action => will care
2015-08-04 20:20 mvwieringen bareos-14.2: impact => yes
2015-08-04 20:20 mvwieringen bareos-14.2: action => will care
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