SatelliteQE / automation-tools

A set of tools to help to automate testing Foreman with Robottelo (https://github.com/SatelliteQE/robottelo)
GNU General Public License v3.0
16 stars 33 forks source link

Better environment variable parsing for INSTALLER_OPTIONS #313

Closed elyezer closed 5 years ago

elyezer commented 8 years ago

Installer options parsing should happen as soon as possible on product_install task in order to fail without doing any action on the server.

    if os.environ.get('INSTALLER_OPTIONS'):
        # INSTALLER_OPTIONS are comma separated katello-installer options.
        # It will be of the form "key1=val1,key2=val2".
        ins_opt = os.environ.get('INSTALLER_OPTIONS', '')
        ins_opt_dict = dict(i.split('=') for i in ins_opt.split(','))
        installer_options.update(ins_opt_dict)
elyezer commented 8 years ago

Actually it is not a bug, but an enhancement. Updated the labels to match that.

lpramuk commented 7 years ago

@elyezer Why to fail ? rather continue without unparsable options...

elyezer commented 7 years ago

@lpramuk because the user was asking for something and the system decided to go with a subset of what has been asked. Better to tell the user that is wrong than deciding what is best to do...

san7ket commented 5 years ago

Currently satellite adds in installer options against all the plugins installed and supported. This is very hard to keep track of,. Also, the error reporting of the installer itself as drastically improved. So, the tasks fails quickly, and user can easily figure out what went wrong.

Please feel free to re-open, if this still needs fixing