When installing PS on Ubuntu, it prompts for password even when skipping it
General
Escalation
General
Escalation
Description
Environment
OS: Ubuntu 16.04
Smart Checklist
Activity
Show:

Evgeniy Patlan May 5, 2019 at 8:17 PM
Hi .
I have investigated this issue and found the root of the issue.
Once you are executing commands you export nooninteractive param and after that execute apt command with sudo - so you are changes user space.
if you would remove sudo from apt command everything would work well;
Installing PS on Ubuntu 16.04 asks for password, even when disabling asking for password as shown on https://serversforhackers.com/c/installing-mysql-with-debconf using 'export DEBIAN_FRONTEND="noninteractive"'.
Password prompts break script installation.
How to test on Ubuntu 16.04:
sudo su
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
sudo apt-get update
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get install -y percona-server-server-5.7
If installing PXC or upstream MySQL it does not prompts for password when using 'export DEBIAN_FRONTEND="noninteractive"' which is expected behavior:
On PXC 5.7:
sudo su
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
apt-get update
export DEBIAN_FRONTEND="noninteractive"
apt-get install -y percona-xtradb-cluster-57
On upstream (before installing Percona packages):
apt update
export DEBIAN_FRONTEND="noninteractive"
apt install -y mysql-server mysql-client
You can remove "export" line and check that it prompts for password.
Expected behavior: when installing PS 5.7, if setting 'export DEBIAN_FRONTEND="noninteractive"' , password prompt should not trigger.