[Spacewalk-list] spacewalk: cant register a machine after restore from backup

Maarten Vanraes maarten at ba.be
Wed May 24 14:38:05 UTC 2017


We have a client that had a SAN crash.

We restored the spacewalk machine from rsync backup. but the synology 
backup NAS of the client didn't store permissions.

after quite some permission restores, we got back to a working spacewalk 
machine, but unfortunately, we seem unable to register a new machine, it 
fails with the following message:

ERROR:  new row for relation "rhnserverdmi" violates check constraint 
"vn_rhnserverdmi_product"
STATEMENT:  insert into rhnServerDMI ( id, product, bios_release, 
vendor, board, bios_version, bios_vendor, asset, server_id, system ) 
values ( 46, E'', E'08/04/2016', E'Intel Corp.', E'Intel corporation', 
E'SYSKLi35.86A.0051.2016.0804.1114', E'Intel Corp.', E'(chassis:         
                          ) (chassis:                                  ) 
(board: GESY64500BNT) (system:                                  )', 
1000010029, E'' )

If I look at this properly, it seems product is E'' , which doesn't look 
correct.

-------------------------
I also see a lot of:
ERROR:  column "query" does not exist at character 8
STATEMENT:  select query = '<IDLE>', count(*) from pg_stat_activity 
group by (query = '<IDLE>');

--------------------------------
there is a pgupgrade.log file:

The files belonging to this database system will be owned by user 
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

Success. You can now start the database server using:

     /usr/bin/postgres -D /var/lib/pgsql/data
or
     /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start

2017-04-21 08:24:45.508 GMT FATAL:  data directory "/var/lib/pgsql/data" 
has group or world access
2017-04-21 08:24:45.508 GMT DETAIL:  Permissions should be u=rwx (0700).
postmaster: could not find the database system
Expected to find it in the directory "/var/lib/pgsql/data",
but could not open file "/var/lib/pgsql/data/global/pg_control": 
Permission denied

----------------------------

obviously, this ran while database had the wrong permissions (777). I 
have no idea if this has anything to do with this or not.

I would appreciate any help with getting this back online.


Regards,

Maarten

-- 
BA NV
IT & Security




More information about the Spacewalk-list mailing list