Bug 1247822

Summary: Report an unclear error while set password for a non-exsitent user inside the guest
Product: Red Hat Enterprise Linux 7 Reporter: zhenfeng wang <zhwang>
Component: qemu-guest-agentAssignee: Ademar Reis <areis>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.2CC: berrange, dyuan, fjin, knoel, marcandre.lureau, mzhan, wzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-30 11:11:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhenfeng wang 2015-07-29 02:23:03 UTC
Description of problem:
Report an unclear error while set password for a non-exsitent user inside the guest

Version-Release number of selected component (if applicable):
kernel-3.10.0-300.el7.x86_64
libvirt-1.2.17-2.el7.x86_64
qemu-kvm-rhev-2.3.0-13.el7.x86_64

guest info
qemu-guest-agent-2.3.0-2.el7.x86_64.rpm

How reproducible:
100%

Steps to Reproduce:
1.Prepare a running guest with guest agent installed
2.Get selinux to permissive mode since bug 1243458 haven't fixed yet
#setenforce 0
# getenforce
Permissive

3.Set password for a non-exsitent user inside the guest, will get an unclear error,this info should be improved

# virsh set-user-password  virt-tests-vm1  --user user1 --password redhat 
error: internal error: unable to execute QEMU agent command 'guest-set-user-password': child process has failed to set user password


Actual results:
report an unclear error while set password for a non-exsitent user inside the guest

Expected results:
should get clear error info, such as "user user1 didn't exsit"

Additional info:

Comment 2 Marc-Andre Lureau 2015-07-30 10:38:15 UTC
this is really minor and perhaps wontfix: if it fails to set password it is very likely because the user didn't exist, so the generic error is enough.

Parsing chpasswd error output is cumbersome and could potentially break on various systems or updates.

Daniel, since you implemented it, I suppose you came to similar conclusion?

Comment 3 Daniel Berrangé 2015-07-30 10:53:54 UTC
Yeah, I don't think it is worth the complexity to try to parse chpassword output here, the generic error is sufficient IMHO.

Comment 4 Marc-Andre Lureau 2015-07-30 11:11:05 UTC
agree, let's close as wontfix then