Bug 814399 - logic error in mounting /media/deltacloud-userdata.txt
logic error in mounting /media/deltacloud-userdata.txt
Status: CLOSED WORKSFORME
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-audrey-agent (Show other bugs)
1.0.0
Unspecified Unspecified
unspecified Severity medium
: beta6
: ---
Assigned To: Joe Vlcek
dgao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-19 15:05 EDT by dgao
Modified: 2013-01-04 08:11 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-04 08:11:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dgao: needinfo-


Attachments (Terms of Use)

  None (edit)
Description dgao 2012-04-19 15:05:43 EDT
[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 12:28:25 EDT
if this is a bug.. pushing to 1.1
Comment 3 Hugh Brock 2012-05-07 11:33:53 EDT
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 11:41:54 EDT
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 12:47:05 EDT
Flipped it back to assigned so this can be fixed.
Comment 6 Joe Vlcek 2012-08-08 16:35:07 EDT
"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 13:08:14 EDT
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 15:59:06 EDT
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 10:39:16 EDT
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 12:19:38 EDT
(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 11:26:48 EST
I don't believe this bug is reproducible.
If it is not please close it.

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