Bug #57059 agent update installer doesn't use all values from command line for the dialogs
Submitted: 28 Sep 2010 10:00 Modified: 24 Jan 2011 19:37
Reporter: Carsten Segieth Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S3 (Non-critical)
Version:2.3.0.2025 OS:Any
Assigned to: BitRock Merlin CPU Architecture:Any

[28 Sep 2010 10:00] Carsten Segieth
Description:
The agent update installer does not use the command line values for

 --backupdir <backupdir>
 --restartImmediately 0

if called in interactive (text / win32) mode, but uses the installer defaults

 --backupdir <installdir>/patchbackup
 --restartImmediately 1

here instead:

$ .../mysqlmonitoragent-${VER}-linux-glibc2.3-x86-32bit-update-installer.bin --installdir ${INSTALLDIR_UPD} --enableproxy 1 --enableaggregator 1 --aggregatorport 44046 --aggregatorsslport 44047 --createBackup 1 --backupdir ${INSTALLDIR_UPD}/backup_${VER} --restartImmediately 0

...
----------------------------------------------------------------------------
Backup and Restart Options

Do you want to create a backup during the update process?

Backup the current installation [Y/n]:

Backup directory [/data0/merlin/agent/2.2.2.1729/rhel4-x86-32bit/net-qa1/patchbackup]:

Restart Agent immediately after updating all files [y/N]:

----------------------------------------------------------------------------
...
----------------------------------------------------------------------------
Please wait while Setup installs MySQL Enterprise Monitor Agent Update on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################

----------------------------------------------------------------------------
Setup has finished installing MySQL Enterprise Monitor Agent Update on your computer.

Restart MySQL Enterprise Monitor Agent now [Y/n]: n

View Readme File [Y/n]: n
----------------------------------------------------------------------------

This may not be the most common customer case, but if one uses a script to start the installer that sets all values on command line these values should be used, regardless whether one then uses unattended or interactive mode. In unatteneded mode the values are used as specified on command line, but the shown values in interactive mode are not what has been set on command line. So it is not possible to just 'click through' an interactive install, one has to change values to get the same result.

The "Restart MySQL Enterprise Monitor Agent now [Y/n]:" at the end should be predefined with the value of "--restartImmediately".

How to repeat:
use the shown parameters on command line and see that they are not evaluated in interactive mode.
A full command line can be used from "How to repeat" in bug 57056, just remove then '--mode unatteneded'.

Suggested fix:
- use all values given on command line also in interactive mode to predefine what the user sees in the dialogs
- avoid any difference in logic between the install modes
[6 Oct 2010 14:58] BitRock Merlin
Patch sent to Andy.
[8 Oct 2010 15:47] Enterprise Tools JIRA Robot
Andy Bang writes: 
In build 2.3.0.2030.
[8 Oct 2010 15:47] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
tested with 2.3.0.2030 on Linux-32bit, the value of '--backupdir <...>' is not used in the installer; see 

    --backupdir /data0/merlin/agent/2.2.2.1729/rhel4-x86-32bit/net-qa1/backup_2.3.0.2030

in the command line and

   Backup directory [/data0/merlin/agent/2.2.2.1729/rhel4-x86-32bit/net-qa1/patchbackup]

in the install dialog. The value of --restartImmediately  seemed to be used.

$ /nfstmp2/merlin/packages/2.3.0.2030/agents/mysqlmonitoragent-2.3.0.2030-linux-glibc2.3-x86-32bit-update-installer.bin --installdir /data0/merlin/agent/2.2.2.1729/rhel4-x86-32bit/net-qa1 --enableproxy 1 --enableaggregator 1 --aggregatorport 44046 --aggregatorsslport 44047 --createBackup 1 --backupdir /data0/merlin/agent/2.2.2.1729/rhel4-x86-32bit/net-qa1/backup_2.3.0.2030 --restartImmediately 0

Language Selection

Please select the installation language
[1] English - English
[2] Japanese - ???
Please choose an option [1] :
----------------------------------------------------------------------------
Welcome to the setup wizard for the MySQL Enterprise Monitor Agent Update

----------------------------------------------------------------------------
Please specify the directory that contains the previous installation of the MySQL Enterprise Monitor Agent

Installation directory [/data0/merlin/agent/2.2.2.1729/rhel4-x86-32bit/net-qa1]:

----------------------------------------------------------------------------
Backup and Restart Options

Do you want to create a backup during the update process?

Backup the current installation [Y/n]:

Backup directory [/data0/merlin/agent/2.2.2.1729/rhel4-x86-32bit/net-qa1/patchbackup]:

Restart Agent immediately after updating all files [y/N]:

----------------------------------------------------------------------------
[13 Oct 2010 15:52] BitRock Merlin
Patch sent to Andy.
[29 Nov 2010 13:52] Enterprise Tools JIRA Robot
Carsten Segieth writes: 
OK in 2.3.1.2044
[24 Jan 2011 19:37] John Russell
Added to 2.3.1 change log:

The agent update installer used default values instead of values
specified on the command line for --backupdir and
--restartImmediately, when the installer was invoked in interactive
(text / win32) mode.