Project

General

Profile

Bug #11681

foreman, candlepin, gutterball databases use default encoding vs explicit UTF8

Added by Ivan Necas almost 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman modules
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1255520
Description of problem:

It appears when we create the foreman, gutterball and candlepin databases we might be using the default postgresql encoding for the db's vs explicitly forcing UTF8. This is causing issues during errata input:

/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
caused by: (ActiveRecord::StatementInvalid) PGError: ERROR: character with byte sequence 0xe2 0x80 0x98 in encoding "UTF8" has no equivalent in encoding "LATIN1"
: UPDATE "katello_errata" SET "issued" = '2011-03-10', "severity" = '', "title" = 'strace bug fix update', "reboot_suggested" = 'f', "updated" = '2011-05-19', "description" = 'The strace program intercepts and records the system calls called and received
by a running process. It can print a record of each system call, its arguments
and its return value.
:::
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.66/lib/katello/tasks/reindex.rake:37:in `index_objects'
... skipped 19 lines
caused by: (PGError) ERROR: character with byte sequence 0xe2 0x80 0x98 in encoding "UTF8" has no equivalent in encoding "LATIN1"

... skipped 47 lines
Tasks: TOP => katello:reindex
[ lo1-padm-sat-3 ] #

I have researched several reports from your knowledge database with errata_import failing on upgrade from 6.0.8 to 6.1 but none of them correspond with the error:
caused by: (PGError) ERROR: character with byte sequence 0xe2 0x80 0x98 in encoding "UTF8" has no equivalent in encoding "LATIN1"

and it seems to be on the latest available packages. The Satellite 6.1 server cannot be used usefully at the moment as there is no errata!!!

Is this of assistance:
bash-4.2$ psql -l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------
--------------------+-----------------+-----------------+-------------------------
candlepin | postgres | LATIN1 | en_GB.ISO8859-1 | en_GB.ISO8859-1 | =T/postgres + | | | | | postgres=CTc/postgres + | | | | | candlepin=CTc/postgres
foreman | foreman | LATIN1 | en_GB.ISO8859-1 | en_GB.ISO8859-1 | =T/foreman + | | | | | foreman=CTc/foreman
gutterball | postgres | LATIN1 | en_GB.ISO8859-1 | en_GB.ISO8859-1 | =T/postgres + | | | | | postgres=CTc/postgres + | | | | | gutterball=CTc/postgres
postgres | postgres | LATIN1 | en_GB.ISO8859-1 | en_GB.ISO8859-1 |
template0 | postgres | LATIN1 | en_GB.ISO8859-1 | en_GB.ISO8859-1 | =c/postgres + | | | | | postgres=CTc/postgres
template1 | postgres | LATIN1 | en_GB.ISO8859-1 | en_GB.ISO8859-1 | =c/postgres + | | | | | postgres=CTc/postgres

From the following I am not seeing an explicit UTF8 creation,

https://github.com/theforeman/puppet-foreman/blob/master/manifests/database/postgresql.pp


Related issues

Related to Installer - Bug #13496: foreman-installer error when locale is not en_US.utf8 New2016-02-01

Associated revisions

Revision 2b101b79 (diff)
Added by Ivan Necas almost 4 years ago

Refs #11681 - Explicitly use UTF-8 as postgres database encoding

Revision dce8c469 (diff)
Added by Ivan Necas almost 4 years ago

Refs #11681 - Explicitly use UTF-8 as postgres database encoding

Revision 4e3f6957
Added by Ivan Necas almost 4 years ago

Merge pull request #26 from iNecas/postgres-encoding

Refs #11681 - Explicitly use UTF-8 as postgres database encoding

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Project changed from Foreman to Installer
  • Category set to Foreman modules
  • Status changed from New to Closed
  • Priority changed from High to Normal
  • % Done changed from 0 to 100
  • Legacy Backlogs Release (now unused) set to 63
  • Pull request https://github.com/theforeman/puppet-foreman/pull/356 added
  • Pull request deleted ()

#2 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #13496: foreman-installer error when locale is not en_US.utf8 added

Also available in: Atom PDF