Closed YouriT closed 7 years ago
Hello,
This is actually not an issue but visual pollution emitted by the golang core (https://github.com/golang/go/blob/abdd73cc43f9187e8918879944ec0dacbc912b5c/src/net/http/transport.go#L1606). The next release will include a mount option to redirect stderr/stdout so it would be one way to get rid of this annoyance.
If you want to use a particular container then use the container
mount option and pass it your container name.
The storage_url
option should be free of any reference to a container name as long as you don't use Swift ACLs. You should use username
, password
and tenant
mount options if possible since svfs will retrieve the storage URL and authentication tokens automatically with these.
Indeed it actually get mounted properly you're right. The annoying part is that it get created with those permissions:
drwx------ 1 root wheel 4096 Nov 22 15:13 mountpoint
And therefore is not accessible under the current user, this is why I was mislead by thinking it was a bug.
Just have to figure out how to bypass this behaviour. Will close as soon as I found the workaround.
What I was trying to get for storage_url
is in fact obtained through out container
option and works fine :)
Merci bien !
@YouriT Take a look at access restriction mount options : they allow specifying the uid
and gid
of your target user.
Was just digging into it!
Works fine. So in order to make this issue useful, the correct way to mount a specific Object Storage from Public Cloud on Mac is through out the following step (in case you want to add it in the docs):
# Get your uid/gid
$ id
uid=501(Youri) gid=20(staff) #truncated...
# Mount a specific object storage container coming from Public Cloud
$ mount_svfs pcs /mount/directory/destination -o username="$OS_USERNAME",password="$OS_PASSWORD",tenant="$OS_TENANT_ID",region="$OS_REGION_NAME",container="$CONTAINER_NAME",uid=501,gid=20
Options uid
and gid
can also straightly be set like this to avoid the use of id
command: uid=$UID,gid=$GID
.
Explanations:
$OS_USERNAME
/ $OS_PASSWORD
/ $OS_TENANT_ID
and $OS_REGION_NAME
are straightly loaded from the openrc.sh
file that can be downloaded from the OVH Control Panel under Cloud > Servers > PROJET_NAME > OpenStack > WrenchIcon > Downloading an Openstack configuration file
$CONTAINER_NAME
is the name of the container that you defined when creating the object-storage container.Now you can cd /mount/directory/destination
and start doing what you want.
As a side note @xlucas mount_svfs
shall detect the current user and mount with this user and not always with root.
Thanks again :)
@YouriT That's a good point, I will add this to the next release too.
Hey, I am using Centos7 docker container and trying to mount object storage using svfs.
Mounting is done successfully and I can access the files but after some time :
Unsolicited response received on idle HTTP channel starting with "HTTP/1.0 408 Request Time-out\r\nCache-Control: no-cache\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>\n"; err=<nil>
What does it mean and how can I get rid of this ??
Context
svfs version : 0.9.0
storage provider : OVH
product : Public Cloud Object Storage
Steps to reproduce this issue :
sudo mkdir /Volumes/mountpoint
sudo mount_svfs pcs /Volumes/mountpoint -o username=...,password=...,tenant=...,region="GRA1"
cd /Volumes/mountpoint
Results you expected :
That it gets mounted properly and that I can access the folder.
Results you observed :
Debug log :
Additional question :
At the same time I'm posting this, I don't get what I should put in
storage_url
option to mount only one container? Giving the container url from the OVH Control panel doesn't help (https://storage.gra1.cloud.ovh.net/v1/AUTH_THEKEY/CONTAINER_NAME
)