Bug 732939

Summary: [PATCH] can't set fuse-s3fs options/params through the arguments
Product: [Fedora] Fedora Reporter: Muayyad Alsadi <alsadi>
Component: fuse-s3fsAssignee: Neil Horman <nhorman>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: nhorman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fuse-s3fs-0.7-6.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-19 22:57:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Muayyad Alsadi 2011-08-24 08:27:56 UTC
Description of problem:
can't set options/params through the arguments

Version-Release number of selected component (if applicable):
fuse-s3fs-0.7-5.fc15

How reproducible:
always

Steps to Reproduce:
1. don't export env access key/ security key
2. set them using -o
  

Additional info:
the following lines in the code should be fixed

               #Set the env correctly
               if self.AWS_ACCESS_KEY_ID != None:
                       os.putenv("AWS_ACCESS_KEY_ID",self.AWS_ACCESS_KEY_ID)
               if self.AWS_SECRET_ACCESS_KEY != None:
                       os.putenv("AWS_SECRET_ACCESS_KEY",
                               self.AWS_SECRET_ACCESS_KEY)

               if (os.environ.get("AWS_ACCESS_KEY_ID") == None):
                       print "Need to specify AWS_ACCESS_KEY_ID"
               if (os.environ.get("AWS_SECRET_ACCESS_KEY") == None):
                       print "Need to specify AWS_SECRET_ACCESS_KEY"

as python docs says < http://docs.python.org/library/os.html#os.putenv

When putenv() is supported, assignments to items in os.environ are
automatically translated into corresponding calls to putenv();
however, calls to putenv() don’t update os.environ, so it is actually
preferable to assign to items of os.environ.

the code above set's env with putenv then read it with environ
the docs says just set it with environ and it will call putenv

so it should be

               if self.AWS_ACCESS_KEY_ID != None:
                       os.environ["AWS_ACCESS_KEY_ID"]=self.AWS_ACCESS_KEY_ID
               if self.AWS_SECRET_ACCESS_KEY != None: os.environ["AWS_SECRET_ACCESS_KEY"]=self.AWS_SECRET_ACCESS_KEY

Comment 1 Fedora Update System 2011-08-24 14:02:22 UTC
fuse-s3fs-0.7-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/fuse-s3fs-0.7-6.fc15

Comment 2 Fedora Update System 2011-08-26 19:09:38 UTC
Package fuse-s3fs-0.7-6.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fuse-s3fs-0.7-6.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/fuse-s3fs-0.7-6.fc15
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-09-19 22:57:16 UTC
fuse-s3fs-0.7-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.