Bug 457559

Summary: s3fs pytthon script -p option fails, invalid arg
Product: [Fedora] Fedora Reporter: Chris G. Sellers <chris.sellers>
Component: fuse-s3fsAssignee: Neil Horman <nhorman>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-01 16:23:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to change how keys are set in command mode none

Description Chris G. Sellers 2008-08-01 14:29:58 UTC
Description of problem:

the -p option is not properly defined in the opts section fo the
handle_command_mode definition.  Needs to include p to be successful

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Chris G. Sellers 2008-08-01 14:31:24 UTC
p is actually in the list, my mistake, however the behavior does still exist. 
If I find a solution I'll post

Comment 2 Chris G. Sellers 2008-08-01 14:34:27 UTC
Was able to get around the issue by having -s first in the args list and then
using -p 

Comment 3 Neil Horman 2008-08-01 14:42:04 UTC
Created attachment 313204 [details]
patch to change how keys are set in command mode

Thanks for the report, I think I need to use putenv instead of environ there. 
Can you try this patch and see how it works?  Thanks!

Comment 4 Chris G. Sellers 2008-08-01 14:53:24 UTC
hrmm, didn't seem to fix it.  Still get weird -p error

[csellers@dspacetrial1 dspace-trial]$ sudo -u dspace /usr/bin/s3fs dspace-trial
/usr/local/dpsace-trial -p 0WPRTZ6ENM9S7FGP5AR2 -s
W/xUbTcUUtbp4APCwwMaeQK3TZ/UD4PgalaTeFWM 
audit_log_user_command(): Connection refused
Usage: s3fs [mountpoint] [options]

s3fs: error: no such option: -p

Also -p is missing from the usage line too
(./s3fs [<-C> [-hcdrfk]] [<bucket> <mountpoint>])

It's very strange behavior.
Linux dspacetrial1.nitle.org 2.6.16-xenU #1 SMP Mon May 28 03:41:49 SAST 2007
i686 athlon i386 GNU/Linux


Comment 5 Neil Horman 2008-08-01 15:11:06 UTC
Ah, I see your problem, you're trying to use s3fs in  mount mode, rather than in
command mode (in command mode you need to specify -C as the first option).  When
in mount mode you specify options like you do when you use the mount utility (-o
option=value,option=value).  Try running like this:

sudo -u dspace /usr/bin/s3fs -o
AWS_ACCESS_KEY_ID=<pubkey>,AWS_SECRET_ACCESS_KEY=<seckey> dspace-trial
/usr/local/dpsace-trial

I've updated the binary in my git tree upstream to reflect the addional
parameters that are missing from the usage/help output.  Thanks! 

Comment 6 Chris G. Sellers 2008-08-01 15:21:50 UTC
I was successful before using the ENV vars, so I'm glad things worked out. 
Thanks and good work. Bug resolved. 

Comment 7 Neil Horman 2008-08-01 16:23:34 UTC
cool. Thanks!