Monday, 2019-12-23

tdasilvamattoliverau: o/00:08
mattoliverautdasilva: o/00:08
*** hoonetorg has quit IRC01:16
*** hoonetorg has joined #openstack-swift01:20
seongsoochomorning ~01:21
tdasilvaseongsoocho: o/01:25
mattoliverauseongsoocho: o/01:30
seongsoochoI have a trouble uploading object with formpost in train version (python3). If the filename in form-data contains unicode string,  the upload failed.01:32
seongsoochohttps://github.com/openstack/swift/blob/master/swift/common/swob.py#L30801:32
seongsoochoI think wsgi_quote function can't handle unicode string.01:32
seongsoochoI'm testing it and once the problem  is cleared I'll register it as a bug.01:33
*** threestrands has joined #openstack-swift02:30
*** diablo_rojo has joined #openstack-swift03:49
*** diablo_rojo has quit IRC04:24
*** threestrands has quit IRC04:28
*** psachin has joined #openstack-swift04:49
*** psachin has quit IRC04:54
*** threestrands has joined #openstack-swift05:40
timburkewell *that* looks like some crazy-town... https://github.com/openstack/swift/blob/2.23.1/swift/common/utils.py#L4447-L445105:50
timburke(which is getting called at https://github.com/openstack/swift/blob/2.23.1/swift/common/middleware/formpost.py#L273 )05:52
timburkemakes me worry that non-ascii content-types are broken, too :-/05:56
timburke(at least, in some circumstances)05:56
*** baojg has joined #openstack-swift05:56
*** baojg has quit IRC05:58
*** psachin has joined #openstack-swift06:17
seongsoochotimburke:   ok.. and I have one question. Is there any reason that why wsgi_quote encode a wsgi_path to latin1?06:23
timburkebecause wsgi uses latin1 for headers -- even if swift requires that container metadata be valid utf-8 strings, when a wsgi server like eventlet parses the bytes off the wire, it reads them as latin1 and passes them to us as latin106:26
timburkeso then we later need to re-encode to bytes and check that they decode as utf-806:26
timburkehttps://www.python.org/dev/peps/pep-3333/#unicode-issues has been the bane of my existence the last year or two :-(06:27
seongsoochooh.. ok. I see.06:28
*** psachin has quit IRC06:29
timburkewsgi_quote and wsgi_unquote work with what i've teken to calling "wsgi strings" -- normal strs on py2, and utf-8-pretending-to-be-latin-1 on py3. both of those functions expect the input to be a wsgi string, and will return a wsgi string06:30
seongsoocho:(  .... The unicode issue is always difficult to me..06:32
seongsoochoI'm relieved to find this issue before release to production.06:32
*** hoonetorg has quit IRC07:20
*** rpittau|afk is now known as rpittu07:44
*** rpittu is now known as rpittau07:44
*** threestrands has quit IRC08:08
*** psachin has joined #openstack-swift08:15
*** tkajinam has quit IRC08:16
openstackgerritThiago da Silva proposed openstack/swift master: New Object Versioning mode  https://review.opendev.org/68238208:18
openstackgerritThiago da Silva proposed openstack/swift master: Account listing for object versioning  https://review.opendev.org/70041110:24
*** mvkr has quit IRC10:43
claygtdasilva: yay for patch 700411!!!15:26
patchbothttps://review.opendev.org/#/c/700411/ - swift - Account listing for object versioning - 1 patch set15:26
claygtdasilva: yay for p 700114 too!!15:53
patchbothttps://review.opendev.org/#/c/700114/ - swift - s3api DELETE request return version-id and marker - 1 patch set15:53
*** rpittau is now known as rpittau|afk15:58
openstackgerritMerged openstack/swift master: sharding: Let swift-manage-shard-ranges accept a relative path  https://review.opendev.org/70024816:51
timburkegood morning17:02
timburkeclayg, thanks for the reviews! i think i'm'a rebase p 682382 and p 699892 in some order -- got any preference on which comes first?17:03
patchbothttps://review.opendev.org/#/c/682382/ - swift - New Object Versioning mode - 54 patch sets17:03
patchbothttps://review.opendev.org/#/c/699892/ - swift - sharding: Better-handle newlines in names - 2 patch sets17:03
claygno preference, either is fine, no conflicts from me17:03
claygtdasilva: had some hot fixups to s3api versioning that should be squashed in my opinon17:03
timburkeshould i try to set the old sysmeta in more cases?17:03
claygno that doesn't really "help"17:04
timburkeyeah, squashing seems entirely reasonable to me -- pretty much anytime someone's rebasing anyway17:04
claygI'm pretty much come around to we have to write it tho - but there's a future lesson for us about having code take action on implicit assumptions instead of explicit17:04
claygif it said something like 'if is root container do root update' instead of 'if can't find shard metadata assume root' I think that would have been better17:05
clayglacking a time machine I guess ... well, like I said I guess i'm coming around 🤷‍♂️17:06
timburke...should i try to set it in *fewer*? and include an upgrade note like "shut down your sharders until upgrade is complete, kthxbye"17:06
*** d34dh0r53 has quit IRC17:09
*** d34dh0r53 has joined #openstack-swift17:12
timburkewhat do we think about having a cluster-wide setting for https://review.opendev.org/#/c/700056/ ? that was my approach in https://review.opendev.org/#/c/695131/ but i think that was mainly out of laziness17:13
patchbotpatch 700056 - swift - Middleware that allow for a user to quote Etag - 2 patch sets17:13
patchbotpatch 695131 - swift - Add proxy-server option to quote-wrap all ETags - 5 patch sets17:13
timburkeclayg, idea! yes, set X-Container-Sysmeta-Shard-Root, but set it to something (anything!) without a slash! then _load_root_info() (and by extension, the root_account and root_container properties) will blow up on old code17:18
claygtake that old code!17:19
timburkei think i'd be ok with dropping X-Backend-Container-Path if we want. either way17:19
claygthat's the unquoted version - the one that the lack thereof will cause old code to send shard updates ... to themselves?  until the upgrade?17:20
claygmaybe I should try to understand the failure mode better - when I originally did the review I didn't quite understand the context of the code path...17:20
clayg... maybe after aother look I'd be ok dropping the dangerous unquoted ... oh what if we *always* included it and it was always unquoted?  it's safe to *store* right?  it's just incorrect to send it in headers without quoting?17:21
timburkeno -- that's the one that gets the object update to the right shard -- without it, we'll try the root, which will either (a) eat the update and get it to the right shard as part of misplaced-objects handling or (b) tell the updater where it *should* be sending that update17:21
claygIIRC the only thing I didn't like about the change was the metadata that was only there "sometimes"17:22
claygI write one-off scripts alot and if I look at the metadata on a container I'd like all of the metadata there to be obvious in what it is and what it means and also representative of the metadata I'd find on other containers 🤷‍♂️17:23
timburkethere were two (kinda three) spots where i do something like that -- in the proxy: https://review.opendev.org/#/c/699892/2/swift/proxy/controllers/obj.py17:24
patchbotpatch 699892 - swift - sharding: Better-handle newlines in names - 2 patch sets17:24
timburkeand in the sharder: https://review.opendev.org/#/c/699892/2/swift/container/sharder.py17:24
patchbotpatch 699892 - swift - sharding: Better-handle newlines in names - 2 patch sets17:24
claygI'm absolutely find with sending any transient information on the wire that helps with rolling upgrade - if it's not necessary I agree it's optional17:25
timburke(honestly, i don't entirely remember why the sharder is setting that meta in two places -- i'd have to look at it some more)17:25
claygbut it's really only the "writing down different things" that smelled to me - everything else seemed quite reasonable17:25
timburke👍17:25
claygtimburke: I would have swore it was because later when a sharder loads metadata the missing sysmeta made it be stupid17:25
claygbut if there was a way to use the stupid to our advantage where old code starts blowing up and skipping all sharding until it upgrade that would be great!17:26
claygi'd hate to have to say "shut down all sharders until you upgrade" just to avoid writing down some extra metadata...17:27
claygi guess it doesn't make sense to store sysmeta that's not safe to send in headers - there's to much code that wants to always send sysmeta... maybe we could setup a blacklist translation sort of filter i.e. `x-sysmeta-<unquoted-key>: <unquoted-value> <=> x-sysmeta-quoted-<key>: <quoted-value>`17:28
timburkeoh, right -- first we go issue a bunch of PUTs for all the shard ranges we found, then we *also* create local handoffs that need that info aas we're cleaving... i'm starting to remember now...17:28
timburkethe good news is, i'm *pretty sure* no one's actually been bitten by this bug yet. i feel like we would've gotten reports if they had17:30
timburkeso how about setting the old value to something like `root_path if root_path == quote(root_path) else 'see-bug-1856894'` -- and you only get the tracebacks if you've got "dangerous" container names17:33
DHEFound 15 ranges in 15.4685s (total object count 58509615)      # nice17:42
timburke\o/17:44
claygtimburke: how about always set it to see-bug-1856894 😬17:45
clayglike... even if we encounter old containers that had it set and it would have just happened to be safe 🤔17:45
timburkemy main worry would be that it'll be a little disruptive if you've got some (working! happy!) in-progress sharding going on when you upgrade17:46
*** baffle has quit IRC17:46
*** csmart has quit IRC17:46
*** psachin has quit IRC17:51
openstackgerritMerged openstack/swift master: sharding: Tolerate blank limits when listing  https://review.opendev.org/70011517:52
claygyeah i mean i guess it depends on how long your upgrades run18:02
claygbut settig the path to something invalid some of the time seems about as bad as it sometimes missing - maybe worse?18:02
timburkei can't help but wonder if we maybe should've been having a discussion like this for p 555245 and p 570436...18:12
patchbothttps://review.opendev.org/#/c/555245/ - swift - Fix versioned writes error with url-encoded object... (MERGED) - 3 patch sets18:12
patchbothttps://review.opendev.org/#/c/570436/ - swift - Clarify that archive location headers should be UR... (MERGED) - 1 patch set18:12
claygi mean maybe we missed something there - do either of them write down pieces of sysmeta that's only there *sometimes* ?18:16
claygotherwise it's probably not related to whatever unneasyness was feeling about p 699892 (which I guess I'll note I had +2'd once already) - so, it may not be such a big deal?18:18
patchbothttps://review.opendev.org/#/c/699892/ - swift - sharding: Better-handle newlines in names - 2 patch sets18:18
claygso I am getting null character names into the reconciler just fine - that's good, I guess the rows since row_id api doesn't ever filter reserved18:19
timburkeno, my thinking was more about adding a new header that unequivocally represents an unquoted name18:20
claygyeah the only issue seems to be the direct client queue pop to the container server: container-reconciler: STDERR: DirectClientException: Container server 127.0.0.1:6031 direct DELETE '/sdb3/17/.misplaced_objects/1577124000/0%3A/AUTH_test/%00container%005fc6fd02-bee0-4c49-8b00-8e1bbb731ce5/%00object%0071550385-8ef4-417e-bcbb-e8d4a9f97a10' gave status 400: 127.0.0.1:6031 400 Bad Request: device sdb318:22
timburkemakes sense18:23
claygall the container updates from the object requests themselves seem to propogate up just fine 🤔18:23
claygtimburke: does it?  I was sort of surprised a backend direct request got rejected - bad request device sdb3?18:24
timburkei don't think that's the actual error message or anything18:24
timburkeoh... and i bet it bombs out the whole reconcile() loop... ugh18:27
claygyeah you're right DirectClientException interacts oddly with the __str__ method for it's parent ClientException18:28
claygacctually, it all seems to work except the queue entry doesn't go away18:28
timburkeis this with just one object, or multiple objects? my read on it makes me think that the first queue entry will get moved over fine, then we bomb out trying to pop_queue(), so we never get to the next entry18:30
timburkei'd be happy to be proven wrong, though!18:30
claygwell, I think pop_queue supresses errors18:31
claygcontainer-reconciler: Reconciler Stats: {'cleanup_attempt': 1, 'cleanup_success': 1, 'pop_queue': 1, 'found_object': 1, 'success': 1} (txn: tx575c112f317544dd92fd4-005e0107d5)18:31
clayg^ but that's after a bunch of tracebacks - and it's going to keep doing that forever18:31
claygso, definately not making progress18:31
timburkei guess the GreenPool in direct_delete_container_entry quiets the exceptions? interesting18:33
timburke"quiets" -- it logs tracebacks (which is good); it just doesn't propogate errors18:34
clayganyway, the 400 is `Invalid reserved-namespace object` which *does* make sense - i was thinking the complaint was "includes null namespace" - but now I remember what was *actually* wrong with the reconciler queue 👍18:35
timburke:-( why does https://f20bec36e3f198a9ccf9-fa78c758d05065ae4af77013f9d746d5.ssl.cf2.rackcdn.com/682382/54/check/swift-tox-func-encryption-py27/059bfa9/job-output.txt have b"strings" in the failure message??18:48
timburkeso weird... it's got paths like "/home/zuul/src/opendev.org/openstack/swift/.tox/func-encryption/local/lib/python2.7/site-packages/unittest2/case.py" -- so *that's* good18:51
*** csmart has joined #openstack-swift18:58
*** baffle has joined #openstack-swift18:58
timburkeshoot -- just remembered https://github.com/openstack/swift/blob/2.23.0/swift/container/server.py#L296-L297 ... hmm...19:21
claygfor quoting?19:22
timburkeyup19:22
timburke...might be safe to just start quoting/unquoting? and rely on version skew causing 404s until upgrade completes...19:26
claygDec 23 20:41:51 saio proxy-server: While processing manifest /v1/AUTH_test/%00container%0095622d98-ecfd-4211-b4e1-e7fc867c5944/%00object%009540df1d-c3fb-49e5-bbcd-7f1233ae1d06-direct-test, got 412 while retrieving /v1/AUTH_test/%00container%0095622d98-ecfd-4211-b4e1-e7fc867c5944/%00manifest_part_00 (txn: tx62c44b77b24c4a93b0c18-005e01268f) (client_ip: 127.0.0.1)20:46
claygso dunno, maybe I shouldn't bother with the reconciler test that does manifests 🤔20:46
claygyeah I think the only other option is to make DLO reserved name aware - like if the *manifest* is in the reserved namespace *and* the request has a allow header 🤮20:53
timburkeSLO's happy tho?20:57
timburkehmm... i suppose it probably wouldn't be...20:58
timburkei kinda *want* it to be, though -- like, it'd be great (IMO) if creating an SLO whose segments are in a versioned container would translate the segment names *for me*... so even if they got deleted/replaced, the SLO still works until someone cleans up the underlying old versions21:00
timburkethough maybe it'd be better to jam version_id keys into the manifest instead -- so we don't expose the null namespace...21:00
timburkedkjasfkasd21:11
timburkehttps://github.com/openstack/swift/blob/2.23.0/test/probe/test_sharder.py#L567-L56921:11
timburkew21:11
timburket21:11
timburkef21:11
claygoh, yeah not DLO 🤦‍♂️ SLO21:23
claygit's the head requests21:23
claygI think we can save "MPUs that referenced versioned segments correctly" for ALO21:25
openstackgerritClay Gerrard proposed openstack/swift master: Allow reconciler to handle reserved names  https://review.opendev.org/70044921:30
*** mvkr has joined #openstack-swift21:39
timburkelol -- so trying to shard a container with unicode in the name gets me 400s -- "Metadata must be valid UTF-8"21:41
timburkei *think* that might be because i'm doing all this on py3, and the unicode that the testis using fits in latin-1...21:42
timburkeso then it gets mangled into non-utf8 crap21:42
openstackgerritTim Burke proposed openstack/swift master: sharding: Fix conainer_name typo in probe test  https://review.opendev.org/70045421:51
claygHAHAHHA conainer_name21:56
claygpoor py321:56
timburkei mena -- at least we were testing non-ascii *object names*, right?22:03
claygyes, i really like the idea of pulling auto_create_prefix into constraints!22:06
claygi'll try and think about a reasonable upgrade path for that maybe 🤮22:07
timburke:-( getting a quoted location and *not* unquoting doesn't mean you'll get a 404 when you do the update -- it means you'll pop some *other* container into existence...22:24
timburkelooks like i've gotta split *that*, too22:24
timburkewhooo! py2 fails, too! now, to sort out whether it's just because of https://bugs.python.org/issue30458 being fixed in new-enough python...22:31
mattoliveraumorning22:37
timburkemattoliverau, o/22:59
*** tkajinam has joined #openstack-swift23:07
*** hoonetorg has joined #openstack-swift23:08
seongsoochomorning23:56

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