Bug 814399 - logic error in mounting /media/deltacloud-userdata.txt
Summary: logic error in mounting /media/deltacloud-userdata.txt
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-audrey-agent
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: beta6
Assignee: Joe Vlcek
QA Contact: dgao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-19 19:05 UTC by dgao
Modified: 2013-01-04 13:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-04 13:11:12 UTC
Embargoed:
dgao: needinfo-


Attachments (Terms of Use)

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.


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