File tree 3 files changed +11
-6
lines changed
3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8
8
9
9
## [ 0.15.1] 2022-09-16
10
10
### Fixed
11
- - set-status: fix a bug that delete the status (#224 )
11
+ - set-status: fix a bug that deletes the status (#224 )
12
+ - start: fix pot getting stuck in state "starting" on pot start failure (#227 )
12
13
13
14
## [ 0.15.0] 2022-09-11
14
15
### Added
Original file line number Diff line number Diff line change 2
2
# shellcheck disable=SC3033,SC3040,SC3043
3
3
:
4
4
5
- : " ${_POT_INTERNAL_STATUS:= " starting started stopping stopped" } "
5
+ : " ${_POT_INTERNAL_STATUS:= " starting doa started stopping stopped" } "
6
6
7
7
set-status-help ()
8
8
{
9
- cat << -" EOH "
9
+ cat << -EOH
10
10
Internal command, DO NOT USE IF YOU DON'T KNOW WHAT YOU ARE DOING!
11
11
This command is meant to be invoked using lockf
12
12
pot set-status [-hv] [-p pname] [-s status]
13
13
-h print this help
14
14
-v verbose
15
15
-p pname : pot name
16
- -s status : the status [starting started stopping stopped ]
16
+ -s status : the status [$_POT_INTERNAL_STATUS ]
17
17
EOH
18
18
}
19
19
@@ -106,14 +106,16 @@ pot-set-status()
106
106
return 1
107
107
fi
108
108
;;
109
- " started" )
109
+ " started" | " doa " )
110
110
if [ " $_current_status " != " starting" ]; then
111
111
return 1
112
112
fi
113
113
;;
114
114
" stopping" )
115
115
# you can always stop a stopped pot (for cleanup reasons)
116
- if [ " $_current_status " != " started" ] && [ " $_current_status " != " stopped" ]; then
116
+ if [ " $_current_status " != " started" ] &&
117
+ [ " $_current_status " != " doa" ] &&
118
+ [ " $_current_status " != " stopped" ]; then
117
119
return 1
118
120
fi
119
121
;;
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ start-cleanup()
30
30
if [ -z " $_pname " ]; then
31
31
return
32
32
fi
33
+ # doa state will only be set if pot is in state "starting"
34
+ lockf " ${POT_TMP:-/ tmp} /pot-lock-$_pname " " ${_POT_PATHNAME} " set-status -p " $_pname " -s doa
33
35
if [ -n " $_iface " ] && _is_valid_netif " $_iface " ; then
34
36
pot-cmd stop -p " $_pname " -i " $_iface " -s
35
37
else
You can’t perform that action at this time.
0 commit comments