Thursday, 2016-11-03

*** Socket_0x03 has joined #swift305:42
*** Socket_0x03 has joined #swift305:42
*** openstackgerrit has quit IRC05:48
*** openstackgerrit has joined #swift305:49
*** Socket_0x03 has quit IRC06:03
*** openstackgerrit has quit IRC07:48
*** openstackgerrit has joined #swift307:48
*** acoles_ is now known as acoles09:56
*** tingo has joined #swift313:31
*** chsc has joined #swift315:56
*** chsc has quit IRC15:56
*** chsc has joined #swift315:56
*** chsc has quit IRC16:03
*** vquicksilver has joined #swift316:14
vquicksilverHi16:15
vquicksilverI'm trying to configure swift3 on centos 7 with openstack mitaka, I created the credentials in keystone without any trouble but I'm unable to access any resource using s3cmd or s3curl16:16
vquicksilverI always get the following error: <html><h1>Not Found</h1><p>The resource could not be found.</p></html>16:17
vquicksilverhow can I debug this?16:17
vquicksilverI have the following pipeline: pipeline = catch_errors gatekeeper healthcheck cache swift3 s3token authtoken keystoneauth container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-server16:18
vquicksilverany help would be apreciated :)16:19
*** bill_az has joined #swift316:29
*** bill_az has quit IRC16:38
cnfvquicksilver check the logs, are you hitting v2 or v3?16:40
vquicksilvercnf: I don't see any related info in the logs16:41
vquicksilvercnf: I'm using wsgi to run the swift proxy, and I enabled debug in apache16:41
vquicksilvercnf: anyway think I'm using v316:42
cnfswift3 is hardcoded to v2 on keystone, I ran into trouble with that16:43
vquicksilvercnf: how can I check what version is using? on how can I enable v2 in keystone?16:43
cnfdoes it work in swift?16:43
vquicksilvercnf: sorry I'm a noob with this kind of things16:44
vquicksilvercnf: swift is working fine with the swift client16:44
vquicksilverAFAIK16:44
cnfwell, do make sure :P16:44
vquicksilvercnf: hehe, you know I can make swift stat, quotas are working etc...16:45
vquicksilvercnf: so seems to be ok, how can I make a petition to the v2 api?16:45
cnfput keystone in debug, and watch the logs16:45
vquicksilvercnf: should I change OS_IDENTITY_API_VERSION=316:45
vquicksilver?16:45
cnfwhen you hit the s3 endpoint, it'll query keystone16:45
cnfsee what url it hits16:46
vquicksilvercnf: ok16:46
vquicksilvercnf: so I should launch a petition to the proxy-server, and see a petition in the keystone log16:46
vquicksilverlet me check it16:46
vquicksilvercnf: uhm I can't see anything in keystone16:49
cnfwell, that's not good, is it16:50
cnfdo you see anything when you manually query it?16:50
vquicksilvercnf yes, for example if I do a swift list I can see lines in the log16:50
vquicksilvercnf: I'm using fernet tokens by the way16:51
cnfthen check your swift3 config16:51
vquicksilvercnf: I don't have any special config for it16:52
vquicksilverfor s3token I have my keystone url and the user for querying it16:52
cnfyou have at least 2 sections in your proxy.conf, rght?16:53
cnfswift3, and s3token ?16:53
vquicksilver[filter:swift3]16:53
vquicksilveruse = egg:swift3#swift316:53
vquicksilvers3_acl = false16:53
vquicksilveryes16:53
vquicksilver[filter:s3token]16:53
vquicksilverpaste.filter_factory = keystonemiddleware.s3_token:filter_factory16:53
vquicksilverauth_host = keystone.iaas.es16:53
vquicksilverauth_port = 3535716:53
vquicksilverauth_protocol = https16:53
vquicksilverauth_uri = https://keystone.iaas.es:5000/16:53
vquicksilveradmin_tenant_name = service16:53
vquicksilveradmin_user = swift16:53
vquicksilverI omit the admin_password line16:53
vquicksilverand I think I have it correctly placed in the pipeline16:53
cnfdon't even need those16:55
vquicksilvercnf: I got it from the config in the test folder16:55
vquicksilvercnf: should I left the auth_uri only?16:56
cnf[filter:s3token]16:56
cnfuse = egg:keystonemiddleware#s3_token16:56
cnfauth_host = <ip>16:56
cnfauth_port = 3535716:56
cnfauth_protocol = http16:56
cnfis all I have16:56
vquicksilverlet me check it16:56
vquicksilverstill the same16:59
vquicksilverno lines appear in the keystone.log16:59
vquicksilverswift list is still working16:59
vquicksilverbut when I use s3cmd ls I can't see any lines17:00
*** chsc has joined #swift317:00
vquicksilvercnf: in the client I should point it to the proxy right?17:01
cnfyeah17:02
vquicksilverI'm out of ideas17:02
cnfand my workday is almost done17:02
cnfwait for the US people to come online :P17:02
vquicksilvercnf: hehe ok17:02
vquicksilvercnf: thanks for your time anyway :)17:04
vquicksilvercnf: so in my endpoints I only have keystone with /v317:20
timburkegood morning17:26
timburke(catching up on scrollback)17:26
vquicksilvermorning timburke17:27
timburkevquicksilver: can the same user access things through the Swift API? i wonder if perhaps the account doesn't exist yet (and account_autocreate is still set to its default of false)17:29
vquicksilvertimburke: yes, the user can access three containers17:29
vquicksilverand put files etc...17:30
vquicksilverlet me check the account_autocreate value17:30
vquicksilver[app:proxy-server]17:30
vquicksilveruse = egg:swift#proxy17:30
vquicksilveraccount_autocreate = true17:30
timburkegot some proxy logs that include an S3-style attempt?17:30
vquicksilvertimburke: this is what I see in the proxy log17:31
vquicksilverNov  3 18:31:28 rack32u10 proxy-server: Starting Keystone auth_token middleware17:31
vquicksilverNov  3 18:31:28 rack32u10 proxy-server: Deferring reject downstream17:31
vquicksilverNov  3 18:31:28 rack32u10 proxy-server: 109.70.132.20 109.70.132.20 03/Nov/2016/17/31/28 GET / HTTP/1.1 404 - - - - 70 - tx013a3b2a29ae412295014-00581b7470 - 0.0003 - - 1478194288.110852957 1478194288.111125946 -17:31
vquicksilvertimburke: after doing s3cmd ls17:32
vquicksilvertimburke: maybe I'm not using the client correctly? I followed the guide for swiftstack, I did s3cmd --configure and changed the urls to point my proxy17:33
vquicksilverby the way I get the same result with s3curl and also with cyberduck17:33
timburkeyeah, that should work... just before those lines, was there anything about swift3/s3token?17:34
vquicksilvertimburke: nothing, that's why I was asking if there exist some way of enabling debug or something like that17:34
timburkeit doesn't make sense to me that it should 404. 403, maybe, but 404 is weird17:34
timburkei've got three settings i like to turn on for hunting down weird issues: in the DEFAULT section, set log_headers = true and log_level = DEBUG, and in the swift3 section set force_swift_request_proxy_log = true17:36
vquicksilvertimburke: ok, the system is not in production yet, so I can change anything17:37
vquicksilvertimburke: let me apply those changes17:37
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Pipeline is "catch_errors gatekeeper healthcheck cache swift3 s3token authtoken keystoneauth container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-server"17:39
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Starting Keystone auth_token middleware17:39
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Starting the S3 Token Authentication component17:40
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Use keystone middleware.17:40
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Calling S3Token middleware.17:40
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Not a path query, skipping.17:40
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Deferring reject downstream17:40
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Received request from17:40
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: Authorizing as anonymous (txn: tx16cf9f34da394d5ab4ab7-00581b7644)17:40
vquicksilverNov  3 18:39:16 rack32u10 proxy-server: 109.70.132.20 109.70.132.20 03/Nov/2016/17/39/16 GET / HTTP/1.1 404 - curl/7.43.0 - - 70 - tx16cf9f34da394d5ab4ab7-00581b7644 X-Identity-Status:%20Invalid%0AUser-Agent:%20curl/7.43.0%0ADate:%20jue%2C%2003%20nov%202016%2017:39:14%20%2B0000%0AHost:%20swift.iaas.es%0AAccept:%20%2A/%2A 0.0003 - - 1478194756.576819897 1478194756.577096939 -17:40
vquicksilvertimburke: Authorizing as anonymous?17:40
vquicksilverthis is with s3cmd instead17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Pipeline is "catch_errors gatekeeper healthcheck cache swift3 s3token authtoken keystoneauth container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-server"17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Starting Keystone auth_token middleware17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Starting the S3 Token Authentication component17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Use keystone middleware.17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Calling S3Token middleware.17:41
*** tingo has quit IRC17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Not a path query, skipping.17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Deferring reject downstream17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Received request from17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: Authorizing as anonymous (txn: tx03afc9eaccb84edf99d4e-00581b7696)17:41
vquicksilverNov  3 18:40:38 rack32u10 proxy-server: 109.70.132.20 109.70.132.20 03/Nov/2016/17/40/38 GET / HTTP/1.1 404 - - - - 70 - tx03afc9eaccb84edf99d4e-00581b7696 X-Amz-Date:%20Thu%2C%2003%20Nov%202016%2017:40:37%20%2B0000%0AX-Identity-Status:%20Invalid%0AHost:%20swift.iaas.es%0AAccept-Encoding:%20identity%0AContent-Length:%200 0.0003 - - 1478194838.733294010 1478194838.733561993 -17:41
timburkehmm. looks like swift3 doesn't realize it's an S3 request? https://github.com/openstack/swift3/blob/467e5db/swift3/s3_token_middleware.py#L15117:41
timburkeand wait, i don't see anything about an Authorization header...17:42
vquicksilvertimburke: so what I'm doing wrong?17:45
vquicksilveror is it some bug with the swift3 version in centos?17:45
timburkeyou've set up access_key and secret_key entries in the s3cmd config, right?17:46
vquicksilvertimburke: yes, let me check anyway17:46
vquicksilvertimburke: yeah17:46
vquicksilvertimburke: I can provide the credentials if you want to try17:49
vquicksilvermaybe is my .s3cfg file17:49
vquicksilverbut I get the same result with s3curl --id id --key key17:49
vquicksilverwhy it says invalid host?17:52
timburkewhere did it say that? i saw something about X-Identity-Status: Invalid...17:57
vquicksilverX-Identity-Status:%20Invalid%0AHo │17:58
vquicksilver                      | st:%20swift.iaas.es%17:58
timburkeah, yeah; it's logging multiple headers lines there. "X-Identity-Status: Invalid" is one, "Host: swift.iaas.es" is another18:00
vquicksilvertimburke: ah ok, sorry18:00
vquicksilvertimburke: I ve been trying to make this work for a few hours, I need coffee18:01
timburketends to help :-)18:01
cnfohai18:02
cnfdid it get fixed?18:02
vquicksilvercnf: still not working18:02
cnfwell, if timburke is on the case, things are sure to move along18:03
cnfhe the man!18:03
vquicksilvercnf: thanks to timburke we got more info18:03
cnf(well, i'm assuming tim is a man, I might be wrong)18:03
vquicksilvercnf: do you have any endpoint in your keystone explictly enabling the v2 api or something like that?18:04
vquicksilvercnf: I only have /v3 endpoints18:04
cnfno, it's always enabled18:04
vquicksilverok18:04
cnfbut on v3 ALL endpoints work on 500018:05
cnfon v2 this is not the case18:05
cnfwhich was what bit me18:05
vquicksilvercnf: ok18:05
cnfbecause I had keystone behind an ssl proxy, and it was forwarding everyhting to port 500018:06
vquicksilvercnf here is on the same machine, so it should work18:06
cnfoh, but you set an FQDN for the keystone host18:06
cnfare you sure it is resolving to an address that works?18:06
cnfon that host?18:07
vquicksilvercnf: I have keystone.iaas.es like 127.0.0.1 in my /etc/hosts18:07
vquicksilverit should work18:07
cnfok18:07
cnfand keystone is listening to 127.0.0.1?18:07
vquicksilveryeah18:07
cnfit didn't bind to the ip of eth0 or something?18:07
cnfk18:07
timburkevquicksilver: with s3curl, mind tacking on a --debug? i'm hoping to see that it actually *did* calculate a signature and drop it in an Authorization header18:08
cnfwith timburke on the case, i'll stop adding random stuff ^^;18:08
vquicksilvertimburke: sure18:09
timburkeassuming that it does, we'll then need to sort out why that wasn't showing up in the logs, and why swift3 didn't translate it to a /v1/some-swift-account wort of request18:09
vquicksilverWill sleep and continue despite this problem.18:09
vquicksilverPlease set up /home/ghost/.s3curl for future requests.18:09
vquicksilvers3curl: Found the url: host=swift.iaas.es; port=; uri=; query=;18:10
vquicksilvers3curl: cname endpoint signing case18:10
vquicksilvers3curl: StringToSign='GET\n\n\njue, 03 nov 2016 18:09:23 +0000\n/swift.iaas.es/'18:10
vquicksilvers3curl: exec curl -H Date: jue, 03 nov 2016 18:09:23 +0000 -H Authorization: AWS 81a6e1a6d6d24a75a41cacd8c68d753f:OsTfxFfeH2RX111b2N/61bO3/fM= -L -H content-type:  https://swift.iaas.es18:10
vquicksilverby the way if you want to try secret key is 4a4783c0e3fe40d88164b8fc87ad06c3 and id is 81a6e1a6d6d24a75a41cacd8c68d753f18:10
vquicksilverthinks I can pass -s -v to curl if I do: s3curl --id 81a6e1a6d6d24a75a41cacd8c68d753f --key -- -s -v https://swift.iaas.es18:13
vquicksilvertimburke: maybe I should remove the rpm, and install a more recent version?18:16
timburkevquicksilver: i wonder if there's any chance Apache could be trying to handle the Authorization header, then strips it out before it reaches Swift?18:20
vquicksilvertimburke: maybe you are right18:21
timburkei know i've had a bit of trouble lately with apache mangling requests in unexpected ways (like https://bugs.launchpad.net/python-swiftclient/+bug/1621581)18:23
openstackLaunchpad bug 1621581 in python-swiftclient "swiftclient returns response headers without 'Content-Length' param, thus causing upload object to fail" [Undecided,In progress] - Assigned to Arun Mani (arun-mani)18:23
vquicksilvertimburke: can I prevent apache from doing that?18:24
vquicksilvertimburke: I have a very basic configuration for it, just defined some virtualhosts18:24
vquicksilverdisable mod_proxy maybe?18:26
vquicksilvertimburke: just disabled it18:29
timburkeunfortunately, i'm not very familiar with using apache to reverse-proxy. you might be able to try connecting directly to port that swift is running on? i know that various libraries have difficulty with computing signatures for that, though18:30
vquicksilvertimburke: have to go home know, but I will try to use swift out of apache to diagnose this18:31
vquicksilverI'll let you know the results18:31
vquicksilverthanks for your help18:31
timburkegood luck!18:31
*** acoles is now known as acoles_18:45
*** bill_az has joined #swift319:14
*** bill_az has quit IRC19:25
*** bill_az has joined #swift321:24
*** bill_az has quit IRC21:39
openstackgerritTim Burke proposed openstack/swift3: Add more validation for auth_uri  https://review.openstack.org/36516621:57
openstackgerritTim Burke proposed openstack/swift3: Make s3token work in a Keystone-V3-only world  https://review.openstack.org/38465922:16
*** chsc has quit IRC23:32

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!