Project

Profile

Help

Issue #7993

open

pulp_installer fails to create the database on EL7 when LANG=C.UTF-8

Added by mdepaulo@redhat.com over 3 years ago. Updated about 3 years ago.

Status:
NEW
Priority:
Normal
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

If the managed system is EL7 and has LANG=C.UTF-8, it fails.

This includes when the Vagrant host (Github Actions CI) has LANG=C.UTF-8, it bleeds over to the managed guest by Vagrant design:

fatal: [pulp3-source-centos7]: FAILED! => {"changed": true, "cmd": ["/opt/rh/rh-postgresql96/root/bin/initdb", "-D", "/var/opt/rh/rh-postgresql96/lib/pgsql/data"], "delta": "0:00:08.709082", "end": "2020-12-09 03:28:35.519257", "msg": "non-zero return code", "rc": 1, "start": "2020-12-09 03:28:26.810175", "stderr": "FATAL:  invalid input syntax for integer: \"NAMEDATALEN\"
child process exited with exit code 1
initdb: removing contents of data directory \"/var/opt/rh/rh-postgresql96/lib/pgsql/data\"", "stderr_lines": ["FATAL:  invalid input syntax for integer: \"NAMEDATALEN\"", "child process exited with exit code 1", "initdb: removing contents of data directory \"/var/opt/rh/rh-postgresql96/lib/pgsql/data\""], "stdout": "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 \"C\".
The default database encoding has accordingly been set to \"SQL_ASCII\".
The default text search configuration will be set to \"english\".

Data page checksums are disabled.

fixing permissions on existing directory /var/opt/rh/rh-postgresql96/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ", "stdout_lines": ["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 \"C\".", "The default database encoding has accordingly been set to \"SQL_ASCII\".", "The default text search configuration will be set to \"english\".", "", "Data page checksums are disabled.", "", "fixing permissions on existing directory /var/opt/rh/rh-postgresql96/lib/pgsql/data ... ok", "creating subdirectories ... ok", "selecting default max_connections ... 100", "selecting default shared_buffers ... 128MB", "selecting dynamic shared memory implementation ... posix", "creating configuration files ... ok", "running bootstrap script ... "]}

I have an incomplete fix here:

https://gist.github.com/mikedep333/c70a1da4230af5da3daec545e304ffa2

(It's not working properly, LANG is still C.UTF-8 in the postgresql role when I added debug statements to said role.)

I will workaround this on Github Actions CI by changing LANG on the host.

The permanent fix will be to just upgrade CentOS 7 systems to PostgreSQL 10 instead.

Actions #1

Updated by mdepaulo@redhat.com about 3 years ago

I will investigate whether this is actually a bug, or if the error was caused by Qemu Emulation prior to Qemu 5.2

Actions #2

Updated by mdepaulo@redhat.com about 3 years ago

  • Assignee set to mdepaulo@redhat.com
  • Triaged changed from No to Yes

Also available in: Atom PDF