View Issue Details

IDProjectCategoryView StatusLast Update
0004567Talerdeployment and operationspublic2016-10-11 15:28
ReporterFlorian Dold Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.0 
Target Version0.1Fixed in Version0.1 
Summary0004567: fix style and semantics issues in taler-build/switch_active.sh script
DescriptionThere's a host of issues:
- Please use $(...) instead of backticks, backticks aren't nestable and less readable.
- PLEASE check return codes. Currently we're switching to the deployment even though the build failed.
- Use "set -xu". This detects undefined variables and exits when a command failed, which also would resolve the previous bullet point.
- Indent code consistently. "if CONDITION; then" should be on one line.
- Please also include some output (whether we switched or not), so that we can see in buildbot what was actually going on.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Marcello Stanisci

2016-06-17 13:58

reporter   ~0010907

I'll go for using "set -xu", but the script did check before switching, by the
following lines:

# check exit code
if [[ $? == 0 ]]
then ln -fs -T /home/$INACTIVE/sockets /home/test/sockets
fi

Does that not work?

Marcello Stanisci

2016-06-17 20:46

reporter   ~0010910

You might mean "set -eu", since -x does not care about terminating the script (at least in bash). From 'help set':

      -x Print commands and their arguments as they are executed.

Florian Dold

2016-06-17 20:58

manager   ~0010911

Oops, you're right of course.

Marcello Stanisci

2016-06-17 21:23

reporter   ~0010912

Addressed. Tests needed.

Marcello Stanisci

2016-06-20 11:48

reporter   ~0010915

fixed in 9cdd2685e9

Issue History

Date ModifiedUsernameFieldChange
2016-06-07 17:27Florian DoldNew Issue
2016-06-07 17:27Florian DoldStatusnew => assigned
2016-06-07 17:27Florian DoldAssigned To => Marcello Stanisci
2016-06-17 13:58Marcello StanisciNote Added: 0010907
2016-06-17 20:46Marcello StanisciNote Added: 0010910
2016-06-17 20:58Florian DoldNote Added: 0010911
2016-06-17 21:23Marcello StanisciNote Added: 0010912
2016-06-20 11:48Marcello StanisciNote Added: 0010915
2016-06-20 11:48Marcello StanisciStatusassigned => informing
2016-06-20 11:48Marcello StanisciResolutionopen => fixed
2016-07-09 15:21Christian GrothoffProduct Version => 0.0
2016-07-09 15:21Christian GrothoffFixed in Version => 0.1
2016-07-09 15:21Christian GrothoffTarget Version => 0.1
2016-10-11 15:28Christian GrothoffStatusinforming => closed