Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1192954 - Can not restore backup file to rhevm with non-default lc_messages
Can not restore backup file to rhevm with non-default lc_messages
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
3.4.2
Unspecified Unspecified
high Severity unspecified
: ---
: 3.5.1
Assigned To: Yedidyah Bar David
Jiri Belka
integration
: Reopened, ZStream
Depends On: 1176457
Blocks: 1193058 1197441
  Show dependency treegraph
 
Reported: 2015-02-16 05:32 EST by rhev-integ
Modified: 2015-09-24 06:13 EDT (History)
17 users (show)

See Also:
Fixed In Version: org.ovirt.engine-root-3.5.1-1
Doc Type: Bug Fix
Doc Text:
Previously, lc_messages might have been set to a non-English locale in postgresql.conf. The engine-backup --mode=restore command did not filter expected errors, which were in English, and failed. With this update, engine-backup --mode=restore was changed to require lc_messages to be 'en_US.UTF-8'. As a result, if lc_messages is not 'en_US.UTF-8', a more helpful error message is returned.
Story Points: ---
Clone Of: 1176457
Environment:
Last Closed: 2015-04-28 14:47:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ylavi: Triaged+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 37193 master ABANDONED packaging: engine-backup: filter errors by codes Never
oVirt gerrit 37806 master MERGED packaging: setup: pg conf check/set lc_messages Never
oVirt gerrit 37809 master MERGED packaging: engine-backup: Require lc_messages = en_US.UTF-8 Never
oVirt gerrit 37811 ovirt-engine-3.5 ABANDONED packaging: setup: pg conf check/set lc_messages Never
oVirt gerrit 37812 ovirt-engine-3.5 MERGED packaging: engine-backup: Require lc_messages = en_US.UTF-8 Never
Red Hat Product Errata RHSA-2015:0888 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Virtualization Manager 3.5.1 update 2015-04-28 18:40:04 EDT

  None (edit)
Comment 1 Yedidyah Bar David 2015-02-17 05:41:04 EST
Decided to close, as the patch will be too intrusive. Will be fixed in 3.6.

For a workaround, please see the 3.6 bug 1176457 comment 9.

Please reopen if considered important enough for 3.5.
Comment 2 Yedidyah Bar David 2015-02-17 05:52:02 EST
On a second thought, decided to reopen, but with a smaller change - will only patch engine-backup and not engine-setup. So on 3.5, the only change is that if engine-backup --mode=restore is ran with a non-en_US.UTF-8 lc_messages, it will exit with this message:

lc_messages is set to an unsupported value in postgresql.conf. Please set
it to en_US.UTF-8 and restart postgresql
Comment 3 Yedidyah Bar David 2015-02-17 08:15:37 EST
Note to QE:

To reproduce:

1. install and setup engine
2. edit /var/lib/pgsql/data/postgresql.conf and set lc_messages = 'ja_JP.UTF-8' and restart postgresql
3. engine-backup --mode=backup --file=b1 --log=b1.log
4. engine-cleanup
5. engine-backup --mode=restore --file=b1 --log=b1-restore.log

Will fail with 'Errors while restoring database engine', will leave engine db populated. So a next attempt of (5.) will say it's not empty.

To verify:

1-4. Same as above
5. Same as above, will fail with:
lc_messages is set to an unsupported value in postgresql.conf. Please set it to en_US.UTF-8 and restart postgresql.
and will leave the database still empty.
6. Another attempt to run (5.) will fail the same
7. Fix postgresql.conf as instructed
8. Try (5.) again, should succeed.
Comment 4 Yedidyah Bar David 2015-02-18 05:36:19 EST
Note that lc_messages in postgresql.conf defaults to the system locale when initing the db. So to simulate a real customer case, either install the OS with some non-English locale, or change /etc/sysconfig/i18n, before initing postgres. If you already did, e.g. on a system with rhevm set up, you can run engine-cleanup, and then
service postgresql stop
rm -rf /var/lib/pgsql/data

Then you can edit /etc/sysconfig/i18n and run engine-setup (which also calls initdb if auto provisioning postgres).
Comment 6 Jiri Belka 2015-03-06 06:17:34 EST
ok, based on #3 and #4.

rhevm-tools-3.5.1-0.1.el6ev.noarch
Comment 7 errata-xmlrpc 2015-04-28 14:47:24 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0888.html

Note You need to log in before you can comment on or make changes to this bug.