Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msi: keep fluentdopt when previous options is set #609

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kenhys
Copy link
Contributor

@kenhys kenhys commented Dec 21, 2023

  • 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
Copy link
Contributor Author

kenhys commented Dec 21, 2023

TODO: check behavior.

@kenhys kenhys force-pushed the keep-winsvcopt branch 3 times, most recently from 247d09d to 66c394a Compare December 25, 2023 08:27
@kenhys kenhys added this to the 5.0.3 (T.B.D.) milestone Feb 2, 2024
@kenhys
Copy link
Contributor Author

kenhys commented Feb 2, 2024

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
Copy link
Contributor Author

kenhys commented Feb 2, 2024

I've forgot to bundle script.

@kenhys kenhys force-pushed the keep-winsvcopt branch 2 times, most recently from 754f0fe to 334ced4 Compare February 2, 2024 09:48
@kenhys
Copy link
Contributor Author

kenhys commented Feb 5, 2024

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 kenhys force-pushed the keep-winsvcopt branch 6 times, most recently from 33aff94 to 11b1b94 Compare February 6, 2024 05:15
@kenhys
Copy link
Contributor Author

kenhys commented Feb 6, 2024

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

@kenhys
Copy link
Contributor Author

kenhys commented Feb 7, 2024

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
Copy link
Contributor Author

kenhys commented Feb 8, 2024

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'

@daipom daipom self-requested a review February 16, 2024 05:41
@kenhys kenhys added the Windows label Feb 20, 2024
Before:

* always reset fluentdopt

After:

* If fluentdopt is empty, set default value
* If fluentdopt configuration is changed from default one, keep it.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
@daipom
Copy link
Contributor

daipom commented Mar 7, 2024

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

@kenhys kenhys removed this from the 5.0.4 (T.B.D.) milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants