mariadb: make security_reset.expect's timeout configurable
Under heavy load, when the security_reset script is being run to set
up root password, it might happen that the mysql server doesn't get a
change to evaluate the SQL statement sent by security_reset.expect
before the hardcoded 10 seconds timeout is reached.
Allow the timeout to be overriden via env variable DB_MAX_TIMEOUT,
which is already used as a timeout variable in extend_start.sh
Change-Id: If82c6daca82a48d899605829dc99cf4a352cddcd
Closes-Bug: #1775864
(cherry picked from commit 8e2906a59e
)
This commit is contained in:
parent
7b3edfce94
commit
60959a0b5c
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/expect -f
|
||||
|
||||
set timeout 10
|
||||
if [catch {set timeout $env(DB_MAX_TIMEOUT)}] {set timeout 10}
|
||||
spawn mysql_secure_installation
|
||||
expect {
|
||||
timeout { send_user "\nFailed to get 'Enter current password for root (enter for none):' prompt\n"; exit 1 }
|
||||
|
|
Loading…
Reference in New Issue