StackStorm / st2-packages

StackStorm deb/rpm packages (automated docker build pipeline)
https://stackstorm.com/
27 stars 59 forks source link

Installing st2 v3.4dev does not wait for the y/n input to confirm the python3.6 installation form the deadsnakes repository #688

Closed winem closed 3 years ago

winem commented 3 years ago

OS

root@st2-3:~# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS"

Setup method

curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password=Ch@ngeMe --unstable

(as per https://github.com/StackStorm/discussions/issues/66)

Issue details

The command above shows the following message:

20210220T230020+0000 ########################################################
20210220T230020+0000           Installing StackStorm unstable               
20210220T230020+0000 ########################################################
20210220T230022+0000 
20210220T230022+0000 WARNING!
20210220T230022+0000 The python3.6 package is a required dependency for the StackStorm st2 package but that is not installable from any of the default Ubuntu 16.04 repositories.
20210220T230022+0000 We recommend switching to Ubuntu 18.04 LTS (Bionic) as a base OS. Support for Ubuntu 16.04 will be removed with future StackStorm versions.
20210220T230022+0000 
20210220T230022+0000 Alternatively we'll try to add python3.6 from the 3rd party 'deadsnakes' repository: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.
20210220T230022+0000 By continuing you are aware of the support and security risks associated with using unofficial 3rd party PPA repository, and you understand that StackStorm does NOT provide ANY support for python3.6 packages on Ubuntu 16.04.
20210220T230022+0000 
20210220T230022+0000 To bypass this check in future, you can provide the following flag: --u16-add-insecure-py3-ppa
20210220T230022+0000 
20210220T230022+0000 Press [y] to continue or [n] to cancel adding it: 
20210220T230022+0000 ############### ERROR ###############
20210220T232700+0000 # Failed on Setup args #
20210220T232700+0000 #####################################

The script asks the user to choose whether to proceed with python3.6 from the deadsnakes repository ( https://github.com/winem/st2-packages/blob/72e5d8c6dc23227b2faf568ea50fc2dc30c28225/scripts/st2bootstrap-deb.sh#L142 ) but it does not wait for the users input. In fact it fails with an error.

These two scenarios work as expected:

The issue is probably caused by the stdin redirection with | bash -s -- when using the command chain.

Workaround

The setup using the command chain with --u16-add-insecure-py3-ppa works fine. That's what I'll do for now to proceed with the testing.

I'll also provide a PR soon.