Bug 1108536

Summary: edit-node:Set a public key for the "root" user failed with --sshkey=USER, PUB_KEY_FILE
Product: Red Hat Enterprise Virtualization Manager Reporter: haiyang,dong <hadong>
Component: ovirt-nodeAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 3.4.0CC: cshao, gklein, gouyang, hadong, huiwa, iheim, leiwang, ycui
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: node
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 20:59:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1123329, 1142923, 1156165    

Description haiyang,dong 2014-06-12 08:12:38 UTC
Description of problem:
Using the --sshkey=USER,PUB_KEY_FILE parameter of edit-node tools to Set a public key for the "root" user failed. Couldn't find the "authorized_keys" file in "/root/.ssh"

It only failed when setting the specified user "root", no this issue for setting the admin user or other user.

Version-Release number of selected component (if applicable):
ovirt-node-tools-3.0.1-18.el6_5.10.noarch.rpm
rhevh-6.5-20140430.0
ovirt-node-3.0.1-18.el6_5.10


How reproducible:
100%

Steps to Reproduce:

Actual results:

Expected results:


Additional info:

Comment 2 haiyang,dong 2014-10-11 06:11:00 UTC
Test version:
ovirt-node-tools-3.1.0-0.20.20141006gitc421e04.el6.noarch
ovirt-node-minimizer-3.1.0-0.20.20141006gitc421e04
rhevh-6.6-20141007.0.el6ev.iso

Test step:
1.[root@hp-z600-04 home]# cat id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApGKFdaxdZ4DyHNp1H4jXApc6kfG/1/e7vKTlvv578RmAgVThvfk/G3F7lRxejiLqu10rnts50I/i112hQKRPJy9bPS7j/Vy/VHKfY5sji4mNEr4jFGfNy7FjGttukUt2eCTJ445NKnAHQ2hwJ7O/av1EQGq5mQCscB4O9qRzGdHYHO9Gpg12Lpm9S4rI6JT6Pd56rrN14K3eII2AsOT280b8R8/Xqh+iN/fFkSd5Y4Ez/pXCZ++SRK4BMkmPKNvtIRrImbJOQb1olJliBq/kIp3Thk3+UkvNT+Xa3d4dgObVLUH7eKl3dDcX+HsVQEZXLRKxV0CDfuTmlDoS7/2Ytw== root.lab.eng.nay.redhat.com

2. [root@hp-z600-04 home]# edit-node --sshkey=root,id_rsa.pub rhevh-6.6-20141007.0.el6ev.iso 
rhevh-6.6-20141007.0.el6ev.iso
Warning: the state of SELinux is disabled
done
Running Minimizer
...
fragmd5 = 1dde5d6a27299279c81943da332e71c91a4e35a29a6e7f72b7ed3e85b16c
frags = 20
Setting supported flag to 0
Moving 'rhevh-6.6-20141007.0.el6ev.iso.edited.iso' to 'rhevh-6.6-20141007.0.el6ev.iso.edited.iso'

3. [root@hp-z600-04 home]# edit-node --shell rhevh-6.6-20141007.0.el6ev.iso.edited.iso 
rhevh-6.6-20141007.0.el6ev.iso.edited.iso
Warning: the state of SELinux is disabled
Launching shell. Exit to continue.
----------------------------------
[root@hp-z600-04 /]# cat /root/.ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApGKFdaxdZ4DyHNp1H4jXApc6kfG/1/e7vKTlvv578RmAgVThvfk/G3F7lRxejiLqu10rnts50I/i112hQKRPJy9bPS7j/Vy/VHKfY5sji4mNEr4jFGfNy7FjGttukUt2eCTJ445NKnAHQ2hwJ7O/av1EQGq5mQCscB4O9qRzGdHYHO9Gpg12Lpm9S4rI6JT6Pd56rrN14K3eII2AsOT280b8R8/Xqh+iN/fFkSd5Y4Ez/pXCZ++SRK4BMkmPKNvtIRrImbJOQb1olJliBq/kIp3Thk3+UkvNT+Xa3d4dgObVLUH7eKl3dDcX+HsVQEZXLRKxV0CDfuTmlDoS7/2Ytw== root.lab.eng.nay.redhat.com
[root@hp-z600-04 /]# 

Now edit-node tools Set a public key for the "root" user successfully with --sshkey=USER, PUB_KEY_FILE 

So this bug has been fixed,change the status into "VERIFIED".

Comment 4 errata-xmlrpc 2015-02-11 20:59:10 UTC
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/RHEA-2015-0160.html