View Issue Details

IDProjectCategoryView StatusLast Update
0001172bareos-coredirectorpublic2020-02-03 17:50
Reporterp7k Assigned Toarogge  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSanyOS Version3
Product Version19.2.4~rc1 
Fixed in Version19.2.5 
Summary0001172: update_bareos_tables script broken in >=19.2.4
DescriptionHi,

thank you very much for the new 19.2.4 Release. Today I tried the update from 18.2.7 to 19.2.4. The Catalog database requires a schema update ("Version error for database "bareos". Wanted 2192, got 2171") but the update script fails for postgresql databases:

$ /usr/lib/bareos/scripts/update_bareos_tables
Updating postgresql tables
Upgrading database schema from version 2171 to 2192
/usr/lib/bareos/scripts/update_bareos_tables: line 171: -f: command not found

The noted line (171)

PGOPTIONS='--client-min-messages=warning' -f ${temp_sql_schema} -d ${db_name} $*

 seems to be missing a "psql".

I've added "psql" to the line. Now the update has worked. It still does not work perfectly because of

Updating postgresql tables
Upgrading database schema from version 2171 to 2192
BEGIN
ALTER TABLE
DROP INDEX
UPDATE 1
COMMIT
psql:/tmp/tables.sql.2960:15: ERROR: invalid value for parameter "client_min_messages": "fatal"
HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error.
ANALYZE
Finished upgrading database to version 2192

Maybe it could be reworked a little bit.

OS: Fedora 31
PostgreSQL: psql (PostgreSQL) 12.1
Affected Bareos Version: 19.2.4 (But it is also missing in the current master branch - https://github.com/bareos/bareos/blob/master/core/src/cats/update_bareos_tables.in)


Best regards,
Paul
TagsNo tags attached.

Relationships

related to 0001173 closedarogge Release Bareos 19.2.5 

Activities

arogge

arogge

2020-02-03 15:02

manager   ~0003721

You're totally right. Seems like that slipped through automated testing.
I guess we'll see a 19.2.5 really soon.
arogge

arogge

2020-02-03 15:05

manager   ~0003722

I wonder why you get that error concerning client_min_messages. According to the PostgreSQL documentation "Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC".
I'll test this on F31 and see if I can reproduce it.
arogge

arogge

2020-02-03 15:13

manager   ~0003723

I'm sorry, but I'm unable to reproduce the second issue you have described yet.
What PostgreSQL are you using? F31 ships only postgresql-server-11.6-1.fc31.x86_64 which doesn't seem to be what you're running.
p7k

p7k

2020-02-03 15:20

reporter   ~0003724

Thank you very much for your feedback. Of course you are right for the server side settings. For the client settings probably other options apply. It says so here, for example https://www.postgresql.org/docs/12/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES

I am using the official pgsql 12 upstream repo (https://download.postgresql.org/pub/repos/yum/12/fedora). So it is easier to install the Fedora release updates. But for the older ones (10, 11) this also seems to apply.
arogge

arogge

2020-02-03 15:42

manager   ~0003725

You're right. However, the error with 'client_min_messages' can be safely ignored, so we're not going to hotfix it right now.
arogge

arogge

2020-02-03 17:50

manager   ~0003727

The update script works in 19.2.5 and we also have a test for this on the way.

Related Changesets

bareos: bareos-19.2 58ba8d00

2020-02-03 16:04

pstorz


Committer: arogge

Ported: N/A

Details Diff
update_bareos_tables: fix missing psql call in scripts

(cherry picked from commit 9423b98f3dd090eb8f285f6d8cb4c49af5c30949)
Affected Issues
0001172
mod - core/src/cats/update_bareos_tables.in Diff File

bareos: master b8b09ed1

2020-02-03 17:21

arogge


Committer: GitHub

Ported: N/A

Details Diff
Merge pull request 0000405 from bareos/dev/pstorz/master/fix-postgres-update

update_bareos_tables: fix missing psql call in scripts
Affected Issues
0001172
mod - core/src/cats/update_bareos_tables.in Diff File

Issue History

Date Modified Username Field Change
2020-02-03 11:26 p7k New Issue
2020-02-03 15:02 arogge Assigned To => arogge
2020-02-03 15:02 arogge Status new => confirmed
2020-02-03 15:02 arogge Note Added: 0003721
2020-02-03 15:05 arogge Note Added: 0003722
2020-02-03 15:13 arogge Status confirmed => feedback
2020-02-03 15:13 arogge Note Added: 0003723
2020-02-03 15:20 p7k Note Added: 0003724
2020-02-03 15:20 p7k Status feedback => assigned
2020-02-03 15:42 arogge Note Added: 0003725
2020-02-03 16:29 arogge Relationship added related to 0001173
2020-02-03 17:49 arogge Changeset attached => bareos master b8b09ed1
2020-02-03 17:49 arogge Changeset attached => bareos bareos-19.2 58ba8d00
2020-02-03 17:50 arogge Status assigned => resolved
2020-02-03 17:50 arogge Resolution open => fixed
2020-02-03 17:50 arogge Fixed in Version => 19.2.5
2020-02-03 17:50 arogge Status resolved => closed
2020-02-03 17:50 arogge Note Added: 0003727