Description of problem: engine-setup for a 4.0 engine failed when restored from a 3.6.8 backup Version-Release number of selected component (if applicable): From: rhevm-3.6.8.1-0.1.el6 To: rhevm-4.0.2.6-0.1.el7ev How reproducible: 100% on this specific system Steps to Reproduce: 1. On the 3.6.8 engine (el6) run: engine-backup --scope=all --mode=backup --file=backup.bck --log=backuplog.log 2. Copy backup.bck over to a scratched installed el7 (7.2) 3. Switch to the el7 machine 4. yum install rhevm 5. engine-backup --mode=restore --file=backup.bck --log=restore.log --provision-db --no-restore-permissions 6. engine-setup Actual results: # engine-setup [ ERROR ] Yum unknown locale: UTF-8 [ ERROR ] Yum unknown locale: UTF-8 [ INFO ] Stage: Initializing [ INFO ] Stage: Environment setup Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'] Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160814230752-uum2rv.log Version: otopi-1.5.1 (otopi-1.5.1-3.el7ev) [ ERROR ] Failed to execute stage 'Environment setup': unknown locale: UTF-8 [ INFO ] Stage: Clean up Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160814230752-uum2rv.log [ ERROR ] Failed to execute stage 'Clean up': 'NoneType' object has no attribute 'cleanup' [ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160814230753-setup.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ ERROR ] Execution of setup failed Expected results: engine-setup should run successfully Additional info: 2016-08-14 23:07:53 DEBUG otopi.context context._executeMethod:142 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod method['method']() File "/usr/share/otopi/plugins/otopi/packagers/yumpackager.py", line 216, in _setup with self._miniyum.transaction(): File "/usr/lib/python2.7/site-packages/otopi/miniyum.py", line 336, in __enter__ self._managed.beginTransaction() File "/usr/lib/python2.7/site-packages/otopi/miniyum.py", line 718, in beginTransaction self._transactionBase = self._yb.history.last() File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1106, in <lambda> history = property(fget=lambda self: self._getHistory(), File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1051, in _getHistory pdb_path = self.conf.persistdir + "/history" File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1083, in <lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 382, in _getConfig startupconf.pluginconfpath,disabled_plugins,enabled_plugins) File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 636, in doPluginSetup plugin_types, confpath, disabled_plugins, enabled_plugins) File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 166, in __init__ self.run('config') File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run func(conduitcls(self, self.base, conf, **kwargs)) File "/usr/lib/yum-plugins/langpacks.py", line 202, in config_hook (lang, encoding) = locale.getdefaultlocale() File "/usr/lib64/python2.7/locale.py", line 511, in getdefaultlocale return _parse_localename(localename) File "/usr/lib64/python2.7/locale.py", line 443, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8 2016-08-14 23:07:53 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Environment setup': unknown locale: UTF-8
Created attachment 1190775 [details] ovirt engine setup log
A quick search for 'yum "unknown locale: UTF-8"' finds: http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart-error-valueerror-unknown-locale-utf-8 https://bugs.python.org/issue18378 Can you please check your environment? If not sure please attach sosreport.
(In reply to Yedidyah Bar David from comment #2) > A quick search for 'yum "unknown locale: UTF-8"' finds: > > http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart- > error-valueerror-unknown-locale-utf-8 > https://bugs.python.org/issue18378 > > Can you please check your environment? If not sure please attach sosreport. Look like: export LC_ALL=en_US.UTF-8 solved it. I see that LC_ALL is not set even on other systems. Can we consider setting it to workaround this issue?
(In reply to Gil Klein from comment #3) > (In reply to Yedidyah Bar David from comment #2) > > A quick search for 'yum "unknown locale: UTF-8"' finds: > > > > http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart- > > error-valueerror-unknown-locale-utf-8 > > https://bugs.python.org/issue18378 > > > > Can you please check your environment? If not sure please attach sosreport. > Look like: export LC_ALL=en_US.UTF-8 solved it. In the shell where you ran engine-setup? What's the output of 'locale'? > > I see that LC_ALL is not set even on other systems. On my machine I don't have LC_ALL but do have LANG=en_US.UTF-8 . > > Can we consider setting it to workaround this issue? Yes.
(In reply to Yedidyah Bar David from comment #4) > (In reply to Gil Klein from comment #3) > > (In reply to Yedidyah Bar David from comment #2) > > > A quick search for 'yum "unknown locale: UTF-8"' finds: > > > > > > http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart- > > > error-valueerror-unknown-locale-utf-8 > > > https://bugs.python.org/issue18378 > > > > > > Can you please check your environment? If not sure please attach sosreport. > > Look like: export LC_ALL=en_US.UTF-8 solved it. > > In the shell where you ran engine-setup? Yes, if I set it on the same shell, I was able to continue with the setup process. > > What's the output of 'locale'? # locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LC_CTYPE=UTF-8 LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= > > > > > I see that LC_ALL is not set even on other systems. > > On my machine I don't have LC_ALL but do have LANG=en_US.UTF-8 . > > > > > Can we consider setting it to workaround this issue? > > Yes.
(In reply to Gil Klein from comment #5) > (In reply to Yedidyah Bar David from comment #4) > > What's the output of 'locale'? > # locale > locale: Cannot set LC_CTYPE to default locale: No such file or directory > locale: Cannot set LC_ALL to default locale: No such file or directory > LANG=en_US.UTF-8 > LC_CTYPE=UTF-8 Perhaps this one is causing this. What do you have in /etc/sysconfig/i18n ? and in /root/.i18n ?
(In reply to Yedidyah Bar David from comment #6) > (In reply to Gil Klein from comment #5) > > (In reply to Yedidyah Bar David from comment #4) > > > What's the output of 'locale'? > > # locale > > locale: Cannot set LC_CTYPE to default locale: No such file or directory > > locale: Cannot set LC_ALL to default locale: No such file or directory > > LANG=en_US.UTF-8 > > LC_CTYPE=UTF-8 > > Perhaps this one is causing this. > > What do you have in /etc/sysconfig/i18n ? and in /root/.i18n ? # ls -l /etc/sysconfig/i18n ls: cannot access /etc/sysconfig/i18n: No such file or directory # ls -l /root/.i18n ls: cannot access /root/.i18n: No such file or directory
(In reply to Gil Klein from comment #7) > (In reply to Yedidyah Bar David from comment #6) > > (In reply to Gil Klein from comment #5) > > > (In reply to Yedidyah Bar David from comment #4) > > > > What's the output of 'locale'? > > > # locale > > > locale: Cannot set LC_CTYPE to default locale: No such file or directory > > > locale: Cannot set LC_ALL to default locale: No such file or directory > > > LANG=en_US.UTF-8 > > > LC_CTYPE=UTF-8 > > > > Perhaps this one is causing this. > > > > What do you have in /etc/sysconfig/i18n ? and in /root/.i18n ? > # ls -l /etc/sysconfig/i18n > ls: cannot access /etc/sysconfig/i18n: No such file or directory That's normally created during installation, should always exist imo. If you ssh to this machine from another one, can also be set in the client - you can check with 'ssh -v', and/or 'ssh -F /dev/null'. Perhaps you ssh from a Mac [1]? I'd close this bug. If you want to keep it, should probably be set on otopi, to emit a warning or error if locale seems wrong. Not sure it's worth it though - mis-configured locale probably causes many other problems. [1] http://www.cyberciti.biz/faq/os-x-terminal-bash-warning-setlocale-lc_ctype-cannot-change-locale/
(In reply to Yedidyah Bar David from comment #8) > (In reply to Gil Klein from comment #7) > > (In reply to Yedidyah Bar David from comment #6) > > > (In reply to Gil Klein from comment #5) > > > > (In reply to Yedidyah Bar David from comment #4) > > > > > What's the output of 'locale'? > > > > # locale > > > > locale: Cannot set LC_CTYPE to default locale: No such file or directory > > > > locale: Cannot set LC_ALL to default locale: No such file or directory > > > > LANG=en_US.UTF-8 > > > > LC_CTYPE=UTF-8 > > > > > > Perhaps this one is causing this. > > > > > > What do you have in /etc/sysconfig/i18n ? and in /root/.i18n ? > > # ls -l /etc/sysconfig/i18n > > ls: cannot access /etc/sysconfig/i18n: No such file or directory > > That's normally created during installation, should always exist imo. > > If you ssh to this machine from another one, can also be set in the client - > you can check with 'ssh -v', and/or 'ssh -F /dev/null'. Perhaps you ssh from > a Mac [1]? You got it right, I opened the SSH session from an OSX machine. I can confirm the suggested workaroud solved this issue. > > I'd close this bug. If you want to keep it, should probably be set on otopi, > to emit a warning or error if locale seems wrong. Not sure it's worth it > though - mis-configured locale probably causes many other problems. Two suggestions here: 1. Can we detect this issue and send OSX users a reference to the suggested workaround? 2. I would suggested adding a documention / kb article to help unblock OSX users from running engine-setup > > [1] > http://www.cyberciti.biz/faq/os-x-terminal-bash-warning-setlocale-lc_ctype- > cannot-change-locale/
Please open a bug on freebsd. Can you create a KB?
(In reply to Yaniv Dary from comment #10) > Please open a bug on freebsd. > Can you create a KB? I'm not sure how to create a KB article. Marina, can you please assist?
Thanks, Germano, for the KCS: https://access.redhat.com/solutions/2790341
See also bug 1670376.