Bug 814399

Summary: logic error in mounting /media/deltacloud-userdata.txt
Product: [Retired] CloudForms Cloud Engine Reporter: dgao
Component: aeolus-audrey-agentAssignee: Joe Vlcek <jvlcek>
Status: CLOSED WORKSFORME QA Contact: dgao
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: gblomqui, hbrock, jvlcek, morazi, sshaaf, whayutin
Target Milestone: beta6Flags: dgao: needinfo-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-04 13:11:12 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:

Description dgao 2012-04-19 19:05:43 UTC
[root@10-16-120-104 ~]# mount /dev/fd0 /media
mount: you must specify the filesystem type
[root@10-16-120-104 ~]# echo $?
32

In the code:


        cmd = ['/bin/mount', '/dev/fd0', '/media']
        ret = _run_cmd(cmd)
        # If /media is already mounted (32) or any other error (0)
        if (ret['subproc'].returncode != 32) and  \
           (ret['subproc'].returncode != 0):
            _raise_ASError(('Failed command: \n%s \nError: \n%s') % \
                (' '.join(cmd), str(ret['err'])))


it seems to ignore this return code completely.

As a result it leads to :

[root@10-16-120-104 ~]# cat /var/log/audrey.log 
2012-04-19 14:38:47,312 - ERROR   : audrey:93 Failed accessing RHEVm user data.



[root@10-16-120-104 ~]# rpm -qa | grep "httplib"
python-httplib2-0.6.0-4.el6_0.noarch
[root@10-16-120-104 ~]# rpm -qa | grep "audrey"
aeolus-audrey-agent-0.4.5-1.el6.noarch

Comment 2 wes hayutin 2012-04-20 16:28:25 UTC
if this is a bug.. pushing to 1.1

Comment 3 Hugh Brock 2012-05-07 15:33:53 UTC
Not convinced this is a real bug -- Greg can you confirm config server is supposed to work this way?

Comment 4 Greg Blomquist 2012-05-21 15:41:54 UTC
This is a real bug.  The code in the agent assumed that a return code of 32 from mount simply meant that it was already mounted.  Turns out that 32 means "something bad happened" (bad permissions, invalid mount point, no such directory).

I'm a little confused why this is "ON_QA", though.  I didn't think we had a fix for this yet...

Comment 5 dgao 2012-06-01 16:47:05 UTC
Flipped it back to assigned so this can be fixed.

Comment 6 Joe Vlcek 2012-08-08 20:35:07 UTC
"831645 - Audrey Agent Fails to Access RHEVm User Data"
was the root cause for seeing this issue.

Now that bz831645 has been fix can you please confirm
if you still can reproduce this issue?

Comment 7 Greg Blomquist 2012-08-13 17:08:14 UTC
QE: Please see Comment #6.

I don't believe this issue can be hit anymore.  It's not truly a duplicate of bug 831645.  But should be avoided by that fix.

Also, changing the status of this back to "new" since no code has been committed to fix this particular issue.

Comment 8 Mike Orazi 2012-08-15 19:59:06 UTC
I'm going to ON_QE this bug.  If it is still able to be reproduced, I'd suggest we push it out to 2.0

Comment 9 dgao 2012-08-16 14:39:16 UTC
This is still an open issue because exit code 32 could mean a number of things and the current check 'ret['subproc'].returncode != 32)' is insufficient. 

Additional checks would need to be added. 

Moving back to assigned.

Comment 10 Joe Vlcek 2012-08-16 16:19:38 UTC
(In reply to comment #9)
> This is still an open issue because exit code 32 could mean a number of
> things and the current check 'ret['subproc'].returncode != 32)' is
> insufficient. 
> 
> Additional checks would need to be added. 
> 
> Moving back to assigned.

Agreed 100% As Greg pointed out in coment #6:
"It's not truly a duplicate of bug 831645."

"But should be avoided by that fix."

So it unless this bug can easily be reproduced I propose
it be fixed as a low priority issue in the next major
release.

Comment 11 Joe Vlcek 2012-11-09 16:26:48 UTC
I don't believe this bug is reproducible.
If it is not please close it.