Bug 29825 - Paketstatusdatenbank (pkgdb) legt keinen pg_hba.conf Eintrag an
Paketstatusdatenbank (pkgdb) legt keinen pg_hba.conf Eintrag an
Status: RESOLVED DUPLICATE of bug 32492
Product: UCS
Classification: Unclassified
Component: pkgdb
UCS 3.1
Other Linux
: P3 normal (vote)
: UCS 3.2-x
Assigned To: Bugzilla Mailingliste
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-14 09:11 CET by Tim Petersen
Modified: 2013-09-13 16:10 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Petersen univentionstaff 2012-12-14 09:11:04 CET
UCS 3.1 Slave

root@slave:~# apt-get purge univention-pkgdb
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut       
Statusinformationen werden eingelesen... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  univention-management-console-module-pkgdb univention-postgresql postgresql-common postgresql-8.4
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
Die folgenden Pakete werden ENTFERNT:
  univention-pkgdb*
0 aktualisiert, 0 neu installiert, 1 zu entfernen und 0 nicht aktualisiert.
Nach dieser Operation werden 295 kB Plattenplatz freigegeben.
Möchten Sie fortfahren [J/n]? 
(Lese Datenbank ... 42770 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von univention-pkgdb ...
Multifile: /etc/postgresql/7.4/main/pg_hba.conf
Multifile: /etc/postgresql/8.4/main/pg_hba.conf
Multifile: /etc/postgresql/8.3/main/pg_hba.conf
Löschen der Konfigurationsdateien von univention-pkgdb ...
Trigger für univention-config werden verarbeitet ...
Traceback (most recent call last):
  File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
    univention.pkgdb.main()
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 528, in main
    connection = open_database_connection(config_registry, pkgdbu=False)
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 511, in open_database_connection
    connection = pgdb.connect(database=connectstring)
  File "/usr/lib/python2.6/dist-packages/pgdb.py", line 482, in connect
    dbtty, dbuser, dbpasswd)
pg.InternalError: FATAL:  kein pg_hba.conf-Eintrag f?r Host >>10.200.11.245<<, Benutzer >>slave$<<, Datenbank >>pkgdb<<, SSL an

Ich konnte das anschließend genauso auf einem 3.1 Master reproduzieren
Comment 1 Tim Petersen univentionstaff 2012-12-14 09:29:14 CET
Das ist wohl eher ein anderes Problem.
Nach frischer Installation:

root@master:~# univention-pkgdb-scan 
Traceback (most recent call last):
  File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
    univention.pkgdb.main()
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 528, in main
    connection = open_database_connection(config_registry, pkgdbu=False)
  File "/usr/lib/pymodules/python2.6/univention/pkgdb.py", line 511, in open_database_connection
    connection = pgdb.connect(database=connectstring)
  File "/usr/lib/python2.6/dist-packages/pgdb.py", line 482, in connect
    dbtty, dbuser, dbpasswd)
pg.InternalError: FATAL:  kein pg_hba.conf-Eintrag f?r Host >>10.200.11.244<<, Benutzer >>master$<<, Datenbank >>pkgdb<<, SSL an
Comment 2 Tim Petersen univentionstaff 2012-12-14 09:30:27 CET
root@master:~# ucr search --brief pkgdb
pgsql/pkgdb/netmask: 255.255.255.0
pgsql/pkgdb/network: 10.200.11.0
pgsql/pkgdb/networks: 0.0.0.0/0 ::/0
pkgdb/overwrite/joincheck: <empty>
pkgdb/requiressl: true
pkgdb/scan: yes
Comment 3 Tim Petersen univentionstaff 2012-12-14 09:37:49 CET
Der pg_hba.conf Eintrag wird wohl aus folgender Variable generiert:

pgsql/pkgdb/networks: 0.0.0.0/0 ::/0
 List (space separated) of CIDR networks, from which systems may store their software state in pkgdb

Template:

@!@
print 'local pkgdb pkgdbu md5'
if configRegistry.is_true('pkgdb/requiressl'):
        for entry in configRegistry.get('pgsql/pkgdb/networks', '').split():
                print 'hostssl pkgdb +pkgdbg %s pam' % (entry, )
else:
        for entry in configRegistry.get('pgsql/pkgdb/networks', '').split():
                print 'host pkgdb +pkgdbg %s pam' % (entry, )
@!@


->

local pkgdb pkgdbu md5
hostssl pkgdb +pkgdbg 0.0.0.0/0 pam
hostssl pkgdb +pkgdbg ::/0 pam

Das scheint so nicht zu reichen.
Comment 4 Tim Petersen univentionstaff 2012-12-14 11:44:57 CET
Problem ist, dass ich auf dem System pkgdb zuvor gepurged hatte (Migrationsversuch). Beim Purge wird die Postgres-Gruppe entfernt. Da die Gruppe und der Host als Mitglied lediglich beim Durchlauf des Joinskripts angelegt wird, wurde die Gruppe bei der Neuinstallation nicht neu erzeugt.

Das sollte man robuster gestalten.
Comment 5 Janek Walkenhorst univentionstaff 2013-09-13 16:10:34 CEST
This should be fixed with Bug #32492

*** This bug has been marked as a duplicate of bug 32492 ***