installer/windows: add service dependency for storagenode

When system restarts, local dns resolver may not be ready before our
application starts up. Adding a dependency for dns service will help
prevent dns lookup not available error for storagenode on system reboot.

Change-Id: Ie4be2813736e377df551fd8190f2247d3ae05ccd
This commit is contained in:
Yingrong Zhao 2020-02-03 18:49:37 -05:00 committed by Yingrong Zhao
parent 75355547c2
commit f151a0b9e1

View File

@ -39,7 +39,11 @@
Password="[SERVICEPASSWORD]"
ErrorControl="normal"
Arguments="run --config-dir "[INSTALLFOLDER]\""
/>
>
<ServiceDependency Id="LanmanServer"/>
<ServiceDependency Id="Dnscache"/>
</ServiceInstall>
<ServiceControl Id="StoragenodeStartService" Start="install" Stop="both" Remove="both" Name="storagenode" Wait="yes" />
<fire:FirewallException Id="StoragenodePort" Name="storagenode.exe" Port="28967" Scope="any"/>
@ -67,6 +71,8 @@
ThirdFailureActionType="runCommand"
ProgramCommandLine="cmd /c &quot;(echo %date% %time% recovery triggered to execute in 3 minutes &amp;&amp; timeout 180 >NUL &amp;&amp; echo %date% %time% recovery command executed: &amp;&amp; copy /y &quot;[INSTALLFOLDER]storagenode-updater.old.exe&quot; &quot;[INSTALLFOLDER]storagenode-updater.exe&quot; &amp;&amp; net start storagenode-updater) >> &quot;[INSTALLFOLDER]storagenode-updater-recovery.log&quot; 2>&amp;1&quot;"
/>
<ServiceDependency Id="LanmanServer"/>
<ServiceDependency Id="Dnscache"/>
</ServiceInstall>
<ServiceControl Id="StoragenodeUpdaterStartService" Start="install" Stop="both" Remove="both" Name="storagenode-updater" Wait="yes" />
</Component>