Project

General

Profile

Actions

Bug #4880

closed

ntopng - multiple issues (needs a major package rewrite)

Added by Kill Bill over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
ntop
Target version:
-
Start date:
07/25/2015
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
All
Affected Plus Version:
Affected Architecture:
All

Description

1/ All settings lost on reinstall/upgrade. After reinstall, I'm left with this in config.xml

<ntopng>
        <config>
                <__csrf_magic>sid:3c785b8e18dc3e5eed8beb64663550d794fd6ad6,1437813179</__csrf_magic>
                <id>ntopng</id>
                <mode>reinstallpkg</mode>
                <pkgconfirm>Confirm</pkgconfirm>
                <password>admin</password>
        </config>
</ntopng>

2/ Every second reinstall/upgrade fails (stops) at this point:

Custom commands...
Executing custom_php_global_functions()...

(which is mostly likely related to #3).

3/ All the functions stuff needs to go to separate inc file and only be called in places where it makes sense. When you (re)install the thing, basically exact same code is run no less than 3 times:

Custom commands...
Executing custom_php_global_functions()...done.
Executing custom_php_install_command()...done.
Executing custom_php_resync_config_command()...done.

Both custom_php_install_command() and custom_php_resync_config_command() call sync_package_ntopng() so it's run 3 times, which is totally pointless.

(Will try to produce a pull req if the time permits.)

Actions #1

Updated by Kill Bill over 9 years ago

Just a note here: 1/ only happens as a result of 2/ (and of subsequent restarting of the reinstall).

Actions #3

Updated by Kill Bill about 9 years ago

OK, merged. Did uninstall, followed by a couple of reinstalls, the reinstalls work fine, all settings preserved, password set correctly in the DB. The only nuisance left is that the ntopng service doesn't start after reinstall even if ntopng already enabled in package config. Guess it just needs $ntopng_config var made global in ntopng_sync_package().

Actions #4

Updated by Kill Bill about 9 years ago

Well, whatever has ben fixable is fixed, the rest is PBI-related breakage. Can be closed.

Actions #5

Updated by Chris Buechler about 9 years ago

  • Status changed from New to Resolved

thanks

Actions

Also available in: Atom PDF