Opened 3 years ago

Closed 3 years ago

#2346 closed defect (done)

Fix service install of Hive Slave

Reported by: ascheibe Owned by: ascheibe
Priority: medium Milestone: HeuristicLab 3.3.12
Component: Hive.Slave Version: 3.3.11
Keywords: Cc:

Description (last modified by ascheibe)

The Environment.UserInteractive condition is wrong because the installer can also be installed in a non-interactive way.

Change History (7)

comment:1 Changed 3 years ago by ascheibe

  • Status changed from new to accepted

comment:2 Changed 3 years ago by ascheibe

  • Description modified (diff)
  • Owner changed from ascheibe to mkommend
  • Status changed from accepted to reviewing

r12107 fixed slave service install

comment:3 Changed 3 years ago by mkommend

  • Owner changed from mkommend to abeham

comment:4 Changed 3 years ago by abeham

The installDone flag is not clear to me. You start the service only when installDone was false, meaning neither install, nor uninstall happened. For me this seems counter-intuitive.

Also if there was an exception when installing or uninstalling installDone was likely still set to true as the exception probably occurs later. Is this intended behavior?

The exception is only output to the console. Is there a console in the environment that the installer runs in?

comment:5 Changed 3 years ago by ascheibe

Yes, your first point is true. There are 2 modes how this program is started:

  • By the installer: If the slave gets installed, the program is started with the --install flag and when the program is deinstalled it it is started with the --uninstall flag. This is just to register and deregister the service with windows.
  • By the user in the service console: When this is done it should not (un)install the program but just run it.

Concerning your second point: That is intended because i don't want to start the service, dosen't matter if install failed or not.

Concerning three: I hope so. I run e.g. nsExec::ExecToLog '"$INSTDIR\HeuristicLab.Clients.Hive.Slave.WindowsService.exe" --uninstall'. So I assume stdout is displayed in the installer dialog log window.

Maybe some more explaination why I got rid of the Environment.UserInteractive condition: The IT does automated installs on the computers in the labs. I assume that these computers run a service themself that installs the software. The problem therefore was that the service registration was never called because the installer was run by a service (which is not Environment.UserInteractive).

If the installDone flag is misleading I could also replace it with return statements.

comment:6 Changed 3 years ago by abeham

  • Owner changed from abeham to ascheibe
  • Status changed from reviewing to readytorelease

okay, reviewed.

comment:7 Changed 3 years ago by ascheibe

  • Resolution set to done
  • Status changed from readytorelease to closed

r12222: merged r12107 into stable

Note: See TracTickets for help on using tickets.