Description of problem: The upgrade of RHV 4.2 to 4.3 fails with this error [2]. Satellite is being used and no Unicode character has been found in yum repos files. Enabling the repositories manually with subscription-manager and updating as explained in the docs [1], works fine. [1] https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html/upgrade_guide/upgrading_from_4-2 [2] ~~~ [ INFO ] Executing: env LC_ALL=C subscription-manager repos --enable rhel-7-server-rhv-4.3-manager-rpms --enable jb-eap-7.2-for-rhel-7-server-rpms Traceback (most recent call last): File "/usr/sbin/subscription-manager", line 9, in <module> load_entry_point('subscription-manager==1.24.13', 'console_scripts', 'subscription-manager')() File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 85, in main return managercli.ManagerCLI().main() File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2922, in main ret = CLI.main(self) File "/usr/lib64/python2.7/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 506, in main return_code = self._do_command() File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2260, in _do_command rc = self._set_repo_status(repos, rl, self.options.repo_actions) File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2358, in _set_repo_status print(_("Repository '%s' is enabled for this system.") % repo.id) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) [ ERROR ] Cannot enable repository: jb-eap-7.2-for-rhel-7-server-rpms ~~~ Version-Release number of selected component (if applicable): ovirt-fast-forward-upgrade-1.0.0-12.el7ev.noarch ovirt-engine-4.2.8.7-0.1.el7ev.noarch How reproducible: Always in this setup Steps to Reproduce: 1. ovirt-fast-forward-upgrade --backup --backup-dir=/var/lib/ovirt-engine/backups/ Actual results: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) Expected results: Upgrade successful. Additional info: /etc/locale.conf: ~~~ LANG="en_US.UTF-8" ~~~ sos_commands/i18n/locale: ~~~ LANG=fr_FR.UTF-8 LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL= ~~~
I reproduced it by just having LANG=es_ES.UTF-8 in the environment. Changing it to LANG=en_US.UTF-8 fixes the problem. ~~~ [root@rhvm42 ~]# ovirt-fast-forward-upgrade [ INFO ] Welcome to upgrade helper! A few reminders before we start: - Make sure Engine backup is updated! - This is an incremental upgrade tool. RHV doesn't support direct upgrades, example: from 4.0 directly to 4.2 - Red Hat Virtualization clusters have a compatibility version. The cluster compatibility version indicates the features of Red Hat Virtualization supported by all of the hosts in the cluster. - The cluster compatibility is set according to the version of the least capable host operating system in the cluster. - To change the cluster compatibility version, you must have first updated all the hosts in your cluster to a level that supports your desired compatibility level. Check if there is an icon next to the host indicating an update is available. +----------------------------------------------+ | Red Hat Virtualization Manager Compatibility | +----------------------------------------------+ | RHV Release | Cluster Compability Levels | |----------------------------------------------| | 4.0 | 4.0, 3.6 | | 4.1 | 4.1, 4.0, 3.6 | | 4.2 | 4.2, 4.1, 4.0, 3.6 | | 4.3 | 4.3, 4.2, 4.1 | +----------------------------------------------+ Detected RHV version 4.2, target upgrade: 4.3 Do you want to proceed? [N/y]y [ INFO ] Collecting enabled repositories by subscription-manager... [ INFO ] Executing: env LC_ALL=C subscription-manager repos --list-enabled [ WARNING ] The following repositories are required for 4.2 - rhel-7-server-rhv-4.2-manager-rpms - rhel-7-server-ansible-2-rpms - rhel-7-server-rhv-4-manager-tools-rpms - rhel-7-server-rpms - rhel-7-server-supplementary-rpms - jb-eap-7-for-rhel-7-server-rpms Are you sure you want to continue? It might generate conflicts on RPM dependency. [N/y]y [ INFO ] Executing: env LC_ALL=C engine-upgrade-check VERB: queue package ovirt-engine-setup for update VERB: Downloading: jb-eap-7-for-rhel-7-server-rpms/7Server/x86_64 (0%) VERB: Downloading: jb-eap-7-for-rhel-7-server-rpms/7Server/x86_64 4.0 k(100%) VERB: Downloading: rhel-7-server-ansible-2-rpms/x86_64 (0%) VERB: Downloading: rhel-7-server-ansible-2-rpms/x86_64 4.0 k(100%) VERB: Downloading: rhel-7-server-rhv-4-manager-tools-rpms/x86_64 (0%) VERB: Downloading: rhel-7-server-rhv-4-manager-tools-rpms/x86_64 4.0 k(100%) VERB: Downloading: rhel-7-server-rhv-4.2-manager-rpms/x86_64 (0%) VERB: Downloading: rhel-7-server-rhv-4.2-manager-rpms/x86_64 4.0 k(100%) VERB: Downloading: rhel-7-server-rpms/7Server/x86_64 (0%) VERB: Downloading: rhel-7-server-rpms/7Server/x86_64 3.5 k(100%) VERB: Downloading: rhel-7-server-supplementary-rpms/7Server/x86_64 (0%) VERB: Downloading: rhel-7-server-supplementary-rpms/7Server/x86_64 3.4 k(100%) VERB: Building transaction VERB: Empty transaction VERB: Transaction Summary: No upgrade is available for the setup package. Please note that system may not be up to date if engine-setup wasn't executed after yum update. [ INFO ] Executing: env LC_ALL=C yum update Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock Excluding 11 updates due to versionlock (use "yum versionlock status" to show them) No packages marked for update [ INFO ] Enabling repository: rhel-7-server-rhv-4.3-manager-rpms [ INFO ] Enabling repository: jb-eap-7.2-for-rhel-7-server-rpms [ INFO ] Executing: env LC_ALL=C subscription-manager repos --enable rhel-7-server-rhv-4.3-manager-rpms --enable jb-eap-7.2-for-rhel-7-server-rpms Traceback (most recent call last): File "/usr/sbin/subscription-manager", line 9, in <module> load_entry_point('subscription-manager==1.24.13', 'console_scripts', 'subscription-manager')() File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 85, in main return managercli.ManagerCLI().main() File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2922, in main ret = CLI.main(self) File "/usr/lib64/python2.7/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 506, in main return_code = self._do_command() File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2260, in _do_command rc = self._set_repo_status(repos, rl, self.options.repo_actions) File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2358, in _set_repo_status print(_("Repository '%s' is enabled for this system.") % repo.id) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 55: ordinal not in range(128) [ ERROR ] Cannot enable repository: jb-eap-7.2-for-rhel-7-server-rpms ~~~
Just verified, it is a issue in subscription-manager affecting ovirt-fast-forward-upgrade. https://bugzilla.redhat.com/show_bug.cgi?id=1766445 Proposal patch: https://github.com/candlepin/subscription-manager/pull/2179 Workaround: Use en_US.UTF-8 in locale.conf: 1. # cat /etc/locale.conf LANG="en_US.UTF-8" 2. Reboot 3. trigger again ovirt-fast-forward-upgrade
Douglas can we set env to LC_ALL=C before calling subscription manager within ovirt-fast-forward-upgrade? This will solve for us till platform properly fix it.
(In reply to Sandro Bonazzola from comment #4) > Douglas can we set env to LC_ALL=C before calling subscription manager > within ovirt-fast-forward-upgrade? > This will solve for us till platform properly fix it. Already there: https://github.com/oVirt/ovirt-fast-forward-upgrade/blob/master/src/ovirt-fast-forward-upgrade#L254-L260 https://github.com/oVirt/ovirt-fast-forward-upgrade/blob/master/src/ovirt-fast-forward-upgrade#L339-L345 In the description of this bug, you will see also from the logs: [ INFO ] Executing: env LC_ALL=C subscription-manager repos --enable rhel-7-server-rhv-4.3-manager-rpms --enable jb-eap-7.2-for-rhel-7-server-rpms
Using ovirt-fast-forward-upgrade-1.0.0-17.el7ev.noarch the specific part works, however the patch causes failure later on when engine-setup is executed with 'env -i LC_ALL=C' which causes it to fail with: [ INFO ] Stage: Environment setup (late) [ ERROR ] Failed to execute stage 'Environment setup (late)': Command 'exportfs' is required but missing [root@engine ~]# rpm -qa | grep nfs-utils nfs-utils-1.3.0-0.65.el7.x86_64 [root@engine ~]# exportfs -h usage: exportfs [-adfhioruvs] [host:/path] [root@engine ~]# locale LANG=fr_FR.UTF-8 LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL= When engine-setup is executed without 'env -i LC_ALL=C' (or just without the '-i') the setup continues through the check without problems.
Error in log: 2020-03-03 15:56:26,742+0100 DEBUG otopi.context context._executeMethod:145 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/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py", line 146, in _late_setup self.command.get('exportfs'), File "/usr/share/otopi/plugins/otopi/system/command.py", line 57, in get res = super(Plugin, self).get(command, optional) File "/usr/lib/python2.7/site-packages/otopi/command.py", line 74, in get command=command RuntimeError: Command 'exportfs' is required but missing 2020-03-03 15:56:26,743+0100 ERROR otopi.context context._executeMethod:154 Failed to execute stage 'Environment setup (late)': Comman d 'exportfs' is required but missing
(In reply to Petr Matyáš from comment #9) > 2020-03-03 15:56:26,743+0100 ERROR otopi.context context._executeMethod:154 > Failed to execute stage 'Environment setup (late)': Comman > d 'exportfs' is required but missing Does this happen also when you run engine-setup directly (with fr_FR.UTF-8)? If so, that's a bug in engine-setup, not in fast-forward. Please attach the full setup log, thanks.
Well, yeah. I thought as it is directly caused by the patch posted here then it can be fixed (actually workarounded) here.
Did you reproduce and open a bug on engine-setup?
Yes, I did.
(In reply to Yedidyah Bar David from comment #10) > (In reply to Petr Matyáš from comment #9) > > 2020-03-03 15:56:26,743+0100 ERROR otopi.context context._executeMethod:154 > > Failed to execute stage 'Environment setup (late)': Comman > > d 'exportfs' is required but missing > > Does this happen also when you run engine-setup directly (with fr_FR.UTF-8)? > If so, that's a bug in engine-setup, not in fast-forward. > > Please attach the full setup log, thanks. It seems to be directly related to 'env -i'.
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://access.redhat.com/errata/RHSA-2020:1308