Bug 1316908 - hosted-engine --deploy fails when you have i18n chars in /root/.ssh/authorized_keys
hosted-engine --deploy fails when you have i18n chars in /root/.ssh/authorize...
Status: CLOSED CURRENTRELEASE
Product: otopi
Classification: oVirt
Component: General (Show other bugs)
1.4.0
Unspecified Unspecified
unspecified Severity low (vote)
: ovirt-4.0.0-alpha
: 1.5.0
Assigned To: Yedidyah Bar David
Nikolai Sednev
: Triaged
: 1316909 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-11 08:00 EST by rjes78
Modified: 2017-05-11 05:24 EDT (History)
6 users (show)

See Also:
Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-05 03:43:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.0.0+
rule-engine: planning_ack+
sbonazzo: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 54731 master MERGED filetransaction: Convert sequences toStr 2016-03-15 05:06 EDT

  None (edit)
Description rjes78 2016-03-11 08:00:26 EST
Description of problem:
hosted-engine --deploy fails when you have i18n chars in /root/.ssh/authorized_keys

Version-Release number of selected component (if applicable):
3.6.4

How reproducible:
Every time.

Steps to Reproduce:
1. Add a new public key to /root/.ssh/authorized_keys and let the comments contain some national character like å,ä or ö.
2. Run hosted-engine --deploy and it will break.

Actual results:
Engine not installed
Comment 1 Oved Ourfali 2016-03-13 01:12:10 EST
*** Bug 1316909 has been marked as a duplicate of this bug. ***
Comment 2 Oved Ourfali 2016-03-13 01:13:02 EST
Please provide logs.
Currently marking as integration for first analysis.
Comment 3 Yedidyah Bar David 2016-03-13 03:23:55 EDT
The function mergeAuthKeysFile in pkissh.py generates a list containing both lines read from an existing authorized_keys file, which will have type 'unicode' if they contain utf-8 chars (auto-detected in python2), and a new line, which will usually(?) be ascii ('string').

Later on, code in otopi's filetransaction will '\n'.join(content) and fail.

A possible fix is to convert all to utf-8, either in ovirt-hosted-engine-setup or in otopi. Doing this in otopi will cover way more cases, which is a bit more delicate. Changing component to hosted-engine for now and moving needinfo to Sandro for a decision.
Comment 4 Sandro Bonazzola 2016-03-14 07:54:21 EDT
I think otopi should work correctly with utf-8 / unicode, it was meant to be python3 compatible. If it can be fixed in otopi, let's fix there.
Comment 5 Nikolai Sednev 2016-04-11 09:51:27 EDT
Works for me on these components:
Host:
otopi-1.5.0-0.0.master.20160322130511.git460941e.el7.noarch
qemu-kvm-rhev-2.3.0-31.el7_2.11.x86_64
libvirt-client-1.2.17-13.el7_2.4.x86_64
vdsm-4.17.999-817.git03d82f6.el7.centos.noarch
mom-0.5.2-0.0.master.20160226114234.git95535d1.el7.noarch
sanlock-3.2.4-2.el7_2.x86_64
ovirt-hosted-engine-ha-2.0.0-0.0.master.20160321143043.20160321143039.gitadbef4c.el7.noarch
ovirt-hosted-engine-setup-2.0.0-0.0.master.20160318071154.gite339fa9.el7.centos.noarch
ovirt-host-deploy-1.5.0-0.0.master.20160317100615.gitf913ead.el7.noarch
Linux 3.10.0-327.18.2.el7.x86_64 #1 SMP Fri Apr 8 05:09:53 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.2 (Maipo)

Engine:
ovirt-host-deploy-1.5.0-0.0.master.20160329063025.gitdf57fe1.el7.centos.noarch
ovirt-host-deploy-java-1.5.0-0.0.master.20160329063025.gitdf57fe1.el7.centos.noarch
javassist-3.16.1-10.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
java-1.7.0-openjdk-devel-1.7.0.99-2.6.5.0.el7_2.x86_64
java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2.x86_64
java-1.7.0-openjdk-headless-1.7.0.99-2.6.5.0.el7_2.x86_64
java-1.8.0-openjdk-headless-1.8.0.77-0.b03.el7_2.x86_64
javamail-1.4.6-8.el7.noarch
java-1.7.0-openjdk-1.7.0.99-2.6.5.0.el7_2.x86_64
ovirt-engine-setup-base-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-websocket-proxy-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-vmconsole-proxy-helper-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-restapi-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-cli-4.0.0.0-0.3.20160208.gitded440f.el7.centos.noarch
ovirt-engine-lib-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-extension-aaa-jdbc-1.1.0-0.0.master.20160215110938.git8ebdaba.el7.noarch
ovirt-engine-setup-plugin-ovirt-engine-common-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-setup-plugin-websocket-proxy-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-webadmin-portal-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-userportal-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-setup-plugin-vmconsole-proxy-helper-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-setup-plugin-ovirt-engine-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-backend-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-wildfly-overlay-10.0.0-1.el7.noarch
ovirt-engine-wildfly-10.0.0-1.el7.x86_64
ovirt-engine-tools-backup-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-tools-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-setup-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-dbscripts-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
ovirt-engine-sdk-python-3.6.5.1-0.1.20160330.gitbec59a2.el7.centos.noarch
ovirt-engine-extensions-api-impl-4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch
Linux 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.2.1511 (Core) 

Deployment steps were:
1)Fresh and clean el7.2 host with upstream repositories for 4.0.
2)I've changed host's /root/.ssh/authorized_keys comments to "ניקולאי@ניקולאי" character prior to HE deployment was attempted.
3)HE deployment was made using ovirt-engine-appliance-4.0-20160405.1.el7.centos.noarch.rpm.
4)Result-PASS.
Comment 6 Sandro Bonazzola 2016-07-05 03:43:16 EDT
oVirt 4.0.0 has been released, closing current release.

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