fluent-package-builder icon indicating copy to clipboard operation
fluent-package-builder copied to clipboard

msi: keep fluentdopt when previous options is set

Open kenhys opened this issue 2 years ago • 8 comments

  • It will be overridden when install path has changed.
  • If fluentdopt is empty, set default value
  • If install path is same, do not change it.

kenhys avatar Dec 21 '23 07:12 kenhys

TODO: check behavior.

kenhys avatar Dec 21 '23 07:12 kenhys

Need to fix it.

 Executing op: CustomActionSchedule(Action=InstallFluentdWinSvc,ActionType=3073,Source=BinaryData,Target=WixQ
uietExec64,CustomActionData="c:\opt\fluent\bin\ruby.exe" "c:\opt\fluent\bin\fluent-package-post-fluentdwinsvc.rb" "c:\opt\fluent\")
MSI (s) (BC:A8) [16:30:03:916]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI743F.tmp, Entrypoint: WixQuietExec64
WixQuietExec64:  c:\opt\fluent\bin\ruby.exe: No such file or directory -- c:/opt/fluent/bin/fluent-package-post-fluentdwinsvc.rb (LoadError)

WixQuietExec64:  Error 0x80070001: Command line returned an error.
WixQuietExec64:  Error 0x80070001: QuietExec64 Failed
WixQuietExec64:  Error 0x80070001: Failed in ExecCommon method
CustomAction InstallFluentdWinSvc returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

kenhys avatar Feb 02 '24 07:02 kenhys

I've forgot to bundle script.

kenhys avatar Feb 02 '24 07:02 kenhys

Action 10:47:25: InstallFluentdWinSvc. 
MSI (s) (8C:CC) [10:47:25:202]: Executing op: CustomActionSchedule(Action=InstallFluentdWinSvc,ActionType=3073,Source=BinaryData,Target=WixQ
uietExec64,CustomActionData="c:\opt\fluent\bin\ruby.exe" "c:\opt\fluent\bin\fluent-package-post-fluentdwinsvc.rb" "c:\opt\fluent\")
MSI (s) (8C:40) [10:47:25:202]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSICBB9.tmp, Entrypoint: WixQuietExec64
WixQuietExec64:  c:/opt/fluent/lib/ruby/3.2.0/win32/registry.rb:289:in `OpenKey': 指定されたファイルが見つかりません。 (Win32::Registry::Err
or)
WixQuietExec64:         from c:/opt/fluent/lib/ruby/3.2.0/win32/registry.rb:431:in `open'
WixQuietExec64:         from c:/opt/fluent/lib/ruby/3.2.0/win32/registry.rb:542:in `open'
WixQuietExec64:         from c:/opt/fluent/bin/fluent-package-post-fluentdwinsvc.rb:12:in `<main>'
WixQuietExec64:  Error 0x80070001: Command line returned an error.

should fix unexpected error.

kenhys avatar Feb 05 '24 01:02 kenhys

migration script itself works, but integrated with installer does not works as expected, Investigating now...

kenhys avatar Feb 06 '24 05:02 kenhys

MSI (s) (EC:1C) [13:42:56:766]: Executing op: CustomActionSchedule(Action=InstallFluentdWinSvcFluentdopt,ActionType=3073,Source=BinaryData,T
arget=WixQuietExec64,CustomActionData="c:\opt\fluent\bin\ruby.exe" "c:\opt\fluent\bin\fluent-package-post-fluentdwinsvc.rb" "c:\opt\fluent\")
MSI (s) (EC:74) [13:42:56:766]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIC4CF.tmp, Entrypoint: WixQuietExec64
WixQuietExec64:  fluentdwinsvc default: -c 'c:\opt\fluent"etc\fluent\fluentd.conf' -o 'c:\opt\fluent"fluentd.log'
WixQuietExec64:  fluentdwinsvc registry key was opened: SYSTEM\CurrentControlSet\Services\fluentdwinsvc
WixQuietExec64:  fluentdwinsvc: reset to default fluentdopt configuration

It is strange that appended install path seems corrupted and it raise Registry::Error when accessing fluentdopt.

kenhys avatar Feb 07 '24 04:02 kenhys

I've created minimum installer to assess the root cause, but it is not reproduced yet. hmm. (quoting bug is out of scope)

MSI (s) (80:C8) [14:31:16:745]: Hello, I'm your 32bit Elevated Non-remapped custom action server.
WixQuietExec64:  fluentdwinsvc default: -c 'c:\opt\fluent"etc\fluent\fluentd.conf' -o 'c:\opt\fluent"fluentd.log'
WixQuietExec64:  fluentdwinsvc registry key was opened: SYSTEM\CurrentControlSet\Services\fluentdwinsvc
WixQuietExec64:  fluentdwinsvc current value: -c 'c:\opt\fluent"etc\fluent\fluentd.conf' -o 'c:\opt\fluent"fluentd.log'
WixQuietExec64:  fluentdwinsvc: fluentdopt configuration was same as default one: -c 'c:\opt\fluent"etc\fluent\fluentd.conf' -o 'c:\opt\flue
nt"fluentd.log'

kenhys avatar Feb 08 '24 05:02 kenhys

Sorry I'm not check this in detail, but we should note that the service is reinstalled when updating.

daipom avatar Mar 07 '24 05:03 daipom