netdata / msi-installer

Netdata installer for Windows using WSL2
GNU General Public License v3.0
22 stars 3 forks source link

Doubts and possible "Issues" #25

Closed thiagoftsm closed 1 year ago

thiagoftsm commented 1 year ago

Hello guys,

I was reviewing windows register entries and testing an installed Netdata on a Windows Server and I observed some issues that created some concerns and I am sharing them here:

Best regards!

dfpr commented 1 year ago

I'll comment according to the best of my knowledge of Netdata and the rationale of the decisions made when developing the MSI installer, others may be able to provide more insight of different related aspects.

Hello guys,

I was reviewing windows register entries and testing an installed Netdata on a Windows Server and I observed some issues that created some concerns and I am sharing them here:

The WiX toolset used to generate the MSI defaults to this, changing it would be cosmetical but certainly possible.

  • I agree completely we need to install windows_exporter, because it is important for our WMI collector, but what is the motive we are keeping the installer inside Netdata directory? Is this the unique way to uninstall it?

Since the Netdata MSI can't, because of Windows Installer limitations, install another MSI file simultaneously, the windows_exporter MSI is included and installed by a logon task after restart, it is not necessary to uninstall it and it is not deleted along other temporary files since I didn't consider it necessary.

  • We are not checking Computer\HKEY_CURRENT_USER\Environment\PATH when we are installing or removing netdata, because the host had 4 entries for C:\\Program files(x86)\\, it should have only one.

If you mean the installation folder C:\\Program Files (x86\\Netdata then certainly that's inefficient and will be fixed.

  • Now about NetdataWSL:

    • Why are we using a different name for the software?

I don't remember the reasoning for this but I can change it.

  • Why are we setting installer version instead netdata version in Control Panel\All Control Panel Items\Programs and features?

Since for the same Netdata version and while developing the MSI several different installers are being tested then tracking the MSI version seems more useful for now.

  • Now comparing PostgreSQL with Netdata. PostgreSQL has something that I love, when we install it on Microsoft, everything is centered in one unique directory. Our installer has data inside C:\\Program files(x86)\\Netdata and in C:\\NetdataWSL, why cannot we move this last directory inside the first?

I used the Program Files directory first since when trying to specify c:\netdata Windows Installer insisted in using the drive with most free space available so that was becoming d:\netdata for me. C:\\NetdataWSL is meant to hold only the distro files, I didn't test if other scripts and files can co-exist there but I can look into achieving that.

  • On host I was accessing, I observed that we have proper incoming configured in Windows Defender, but nothing was configured for outcoming, can this affect access to cloud? If yes, do we plan to configure this?

Best regards!

I'm not totally familiar with the required ports but I added the rule so when running the agent in WSL1 the firewall popup doesn't appear, WSL2 just ignores the firewall AFAIK and Outcoming rules don't seem necessary as the default behavior is to allow any traffic and without them the connection to the cloud is working.

thiagoftsm commented 1 year ago

Thank you @dfpr for your answers.

I will keep this issue open while you do not address the points that we agree to be necessary modifying. :)

I will take a look again in Outcoming rules to verify the necessity to modify them and I will update this issue.

Best regards!

Ferroin commented 1 year ago
* This https://github.com/netdata/msi-installer/blob/b876e5ab14d9f78cd7fefbba75f278b0323f74cc/src/docker_image_to_wsl_tar.sh#L24-L45
    configuration file won't show a lot of important charts, why are we taking this decision? Unless we want to run only `WMI`, we need to enable other plugins; When I enabled all Windows Task Manager was showing a small % for CPU usage and memory was also small.

Yes, this is intentional. Most of the plugins do not provide useful information on Windows because they only show data from inside WSL, not data from the system as a whole.

thiagoftsm commented 1 year ago

I talked with @cakrit about this, the plugin was not an issue. I will work late today with netdata on Microsoft to understand an issue that @cakrit detected and firewall outgoing rules.

cakrit commented 1 year ago

None of the pending improvements here are blockers, but listing them in case we want to proceed to fix them:

thiagoftsm commented 1 year ago

None of the pending improvements here are blockers, but listing them in case we want to proceed to fix them:

I agree, but the PATH is something that we need to address with new release.

dfpr commented 1 year ago

I'm working on the path issue, I'll commit soon along other improvements.

dfpr commented 1 year ago

I've fixed the path issue and renamed NetdataWSL to Netdata.

dfpr commented 1 year ago

Now everything goes to C:\Netdata and the MSI gets the version from netdata -V

thiagoftsm commented 1 year ago

Hello @dfpr,

I decided to do what is not expected on our server to verify what could happen, and I observed something weird. I double click the latest msi-installer and it restart the server without to ask me if I want to restart it right now or later, please, take a look on this, because we should not restart any server without admins to accept.

When the installation ended, I observed that windows exporter was running with default options (ping @cakrit ), on the other hand netdata was not initialized, and when I started it on terminal, I observed messages on screen instead to have log files populated and when I took a look in our log files I saw this:

Screenshot_20221117_141535

Default netdata.conf is used, and according to @cakrit explanation, we should have only go.d.plugin enabled.

Ancient issues were really fixed, thanks @dfpr , but now we have these.

Best regards!

dfpr commented 1 year ago

Hello @dfpr,

I decided to do what is not expected on our server to verify what could happen, and I observed something weird. I double click the latest msi-installer and it restart the server without to ask me if I want to restart it right now or later, please, take a look on this, because we should not restart any server without admins to accept.

When the installation ended, I observed that windows exporter was running with default options (ping @cakrit ), on the other hand netdata was not initialized, and when I started it on terminal, I observed messages on screen instead to have log files populated and when I took a look in our log files I saw this:

Screenshot_20221117_141535

Default netdata.conf is used, and according to @cakrit explanation, we should have only go.d.plugin enabled.

Ancient issues were really fixed, thanks @dfpr , but now we have these.

Best regards!

Double clicking the MSI will cause installation issues, it should be run through elevated command msiexec /i netdata.msi To avoid autorestart run msiexec /i netdata.msi autorestart=0 installation will finish after. The other issues are caused by not running the installation command in an admin terminal as instructed in the README. Wsl is not available for the LocalSystem user used by Windows installer so this can't be avoided.

thiagoftsm commented 1 year ago

Hello @dfpr ,

Is there a way to avoid start installation with double click and showing a message box giving this additional information you gave us? Can we force autorestart=0 during the installation?

Best regards!

dfpr commented 1 year ago

Certainly, I'll change it within this week.

Message ID: @.***>

dfpr commented 1 year ago

Hello @dfpr ,

Is there a way to avoid start installation with double click and showing a message box giving this additional information you gave us? Can we force autorestart=0 during the installation?

Best regards!

Now if MSI is run without elevation it will notify user of the correct way. autorestart=0 is default now

thiagoftsm commented 1 year ago

Thank you very much @dfpr !

As soon we have a new installer I will test it.

Best regards!

cakrit commented 1 year ago

@thiagoftsm do your tests, so we can close this. Note this issue, you can circumvent by deleting /etc/wsl.conf after the installation and restarting wsl.

thiagoftsm commented 1 year ago

I am closing this right now, but I will open another with other issues I detected while I was testing latest MSI installer on Windows Server 2022