./upgrade.sh should ask immediately the admin password

Bug #1468557 reported by Fabrizio Soppelsa
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Fuel Python (Deprecated)

Bug Description

[root@fuel tmp]# ./upgrade.sh
New python executable in /tmp/upgrade/.fuel-upgrade-venv/bin/python
Installing setuptools............done.
Installing pip...............done.
..........
..........
..........
..........
..........
Admin Password:

1) Can we output "Type admin password:"
2) And ask it immediately when the user launches the upgrade script

Mike Scherbakov (mihgen)
Changed in fuel:
assignee: Fuel Dev (fuel-dev) → Fuel Python Team (fuel-python)
tags: added: low-hanging-fruit
Changed in fuel:
milestone: none → 7.0
Changed in fuel:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

@Fabrizio,

Why it's bug and why it's medium? Looks more like a Wishlist to me.

Let me explain the situation why it behaves so. We have the fuel upgrade script written in Python. It does the real master upgrade, and it prompts user for the admin password at the very beginning. Unfortunately, this script depends on some Python libraries, such as docker-py, argparse, six, etc., and that's why we need the 'upgrade.sh' wrapper which creates a temporary virtualenv, installs dependencies in there and runs the fuel upgrade script. The info you've seen is about creating the virtualenv.

So we're prompting users for the password at the very beginning point, and the problem is in preparation of virtualenv. I don't see why it's bug and which issues do we have. Yeah, we can move password prompt into upgrade.sh, before virtualenv creation, and then pass this value into fuel upgrade script as some CLI argument, but it looks strange to me and I'd prefer to keep all logic in fuel_upgrade script, not in the wrapper.

Changed in fuel:
status: Confirmed → Invalid
Revision history for this message
Oleg S. Gelbukh (gelbuhos) wrote :

Igor, the problem with this behavior is that upgrade.sh is a long running script and I, for instance, tend to switch context immediately after starting it. However, if I do, the script will actually stop within 10-15 seconds and wait indefinitely for the admin password.

I think it should be possible to prompt the password from the shell, store it to shell var and pass to the Python script after env is created. However, this has certain security implications that needs to be thought of.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.