nethesis / dev

Nethesis issue tracker
http://www.nethesis.it
4 stars 1 forks source link

nethvoice-report-update FAILS at first install #6092

Closed Stell0 closed 2 years ago

Stell0 commented 2 years ago

nethvoice-report-conf action checks if data_call table columns needs to be fixed and drop the table if the fix is needed (it will be created again the first night). But the action doesn't check if the table exists and at first install it does not. This prints some errors and make the action fail:

Nov 25 10:14:42 makako esmith::event[14113]: ERROR 1050 (42S01) at line 129: Table 'cost_details' already exists
Nov 25 10:14:46 makako esmith::event[14113]: Empty profile config
Nov 25 10:14:47 makako esmith::event[14113]: Please update your modules and reload Asterisk by browsing to your server.
Nov 25 10:14:47 makako esmith::event[14113]: ERROR 1146 (42S02) at line 1: Table 'asteriskcdrdb.data_call' doesn't exist
Nov 25 10:14:47 makako esmith::event[14113]: ERROR 1146 (42S02) at line 1: Table 'asteriskcdrdb.data_call' doesn't exist
Nov 25 10:14:47 makako esmith::event[14113]: ERROR 1051 (42S02) at line 1: Unknown table 'data_call'
Nov 25 10:14:47 makako esmith::event[14113]: Action: /etc/e-smith/events/nethvoice-report-update/S50nethvoice-report-conf FAILED: 1 [5.145547]
Nov 25 10:14:47 makako esmith::event[14113]: [INFO] service collectd restart
Nov 25 10:14:47 makako esmith::event[14113]: [INFO] service httpd reload
Nov 25 10:14:48 makako esmith::event[14113]: [INFO] service nethvoice-report-api restart
Nov 25 10:14:48 makako esmith::event[14113]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.960474]
Nov 25 10:14:48 makako esmith::event[14113]: Event: nethvoice-report-update FAILED

The package installation and the database aren't compromised by the errors

Steps to reproduce

Expected behavior

nethvoice-report-update should end with SUCCESS

Actual behavior

nethvoice-report-update FAILS

Components

nethvoice-report-1.0.5-1.ns7.x86_64

nethbot commented 2 years ago

in 7.9.2009/nethesis-testing:

Stell0 commented 2 years ago

Test case:

nethbot commented 2 years ago

in 7.9.2009/nethesis-updates: