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

Obscure error message after migration to icingadb when config is older #430

Closed
RincewindsHat opened this issue Nov 23, 2023 · 3 comments · Fixed by #443
Closed

Obscure error message after migration to icingadb when config is older #430

RincewindsHat opened this issue Nov 23, 2023 · 3 comments · Fixed by #443
Assignees
Labels
bug Something isn't working
Milestone

Comments

@RincewindsHat
Copy link
Member

Describe the bug

After switching to IcingaDB adding new nodes (and possibly other actions) does result in the error message:

Too few arguments to function ipl\Sql\Connection::select(), 0 passed in /usr/share/icingaweb2/modules/businessprocess/library/Businessprocess/State/MonitoringState.php on line 73 and exactly 1 expected

If the line

# Backend: icinga

is removed or replaced by

# Backend:

it will work again.

Expected behavior

The module should probably check if the backend is available at all and not throw errors.
A (semi)automatic migration might also be nice.

Your Environment

  • module businessprocess: v2.5.0
  • Icinga Web 2 version and modules (System - About): 2.12.1
  • PHP version used (php --version):
  • Server operating system and version: Ubuntu LTS
@manfredw
Copy link

Have the same issue (5000+ hosts) with latest icingaweb+modules.
Hosts/services are splitted in several BP config files, default backend is/was icinga-ido.

When switching backend to icingadb, the error is gone as described above, but opening the business process module in icingaweb2 takes much more time. Tested with latest Chrome and Firefox browsers, load time changes from some hundred milliseconds to 4-40s. icingacli based BP checks struggle with errors.
Maybe there are additional issues with icingaweb2, browser developer tools are reporting content-security-policy blockings and "SameSite" cookie attribute warnings.

@nilmerg nilmerg added the bug Something isn't working label Jan 8, 2024
@nilmerg nilmerg added this to the 2.5.1 milestone Jan 8, 2024
@sukhwinder33445 sukhwinder33445 self-assigned this Mar 26, 2024
@sukhwinder33445
Copy link
Contributor

Hi @RincewindsHat,
I cannot reproduce this bug, can you please write down the steps?

@sukhwinder33445
Copy link
Contributor

I can reproduce it now.

nilmerg added a commit that referenced this issue Apr 19, 2024
…e in add/edit form throws an error (#443)

`HostServiceTermValidator`: `$testConfig` requires backend for
`MonitoringState::apply()` call.

If the `$testConfig` has no backend set and icingadb is in use,
`MonitoringState::__construct($config) => $config->getBackend()` returns
an icingadb backend that is not suitable for the `MonitoringState`
class.

fixes
#430
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants