ioBroker.js-controller
ioBroker.js-controller copied to clipboard
Command "plugin disable sentry" doesn't work immediately after installation
When installing ioBroker without starting it, I get the following error when calling:
user@my-host-name:/opt/iobroker$ iob plugin disable sentry
The host "my-host-name" does not exist!
Even if I do a iob host this before the above command, I still get the same error.
why dont we just create raw host object at iob setup @Apollon77 ?
Till now on install and first start there could be different hostnames. If we create a host and then the name has changed on first start there could be weird cases where system thinks it is multihost. If we do we need to make sure this can not happen.
Is the hostname pinned in iobroker.json?? Then we could think about it for this case.
in both my installations system.hostname is just an empty string in iobroker.json
But the same issues would happen if someone renames host later, or not? maybe you can give some details regarding the mentioned case..
it seems that iobroker.json system.hostname is only set when iob host is used
When system.hostname is empty then the real hostname is requested and used. When yu set syste.hostname (and yes this is done when using ´iob host` you overwrite the hostname to define that the configured one is used over the "real" one.
The problem about the changing hostname is exactly as @foxriver76 said: in the Docker image we actually have to change the hostname at first start-up: It is stored during the build process of the temporary build container here and then changed to the hostname of the running container here. So, it seems that part of the host configuration is already done during installation, but the part needed for "plugin disable sentry" is missing.
In my case, the hostname is defined in the config file, so this would would also be enough.
Now, this issue is no longer pressing for me as @Apollon77 pointed out that setting diag to "none" also disables Sentry.