Monday, 2016-12-05

*** myoung has quit IRC05:54
*** myoung has joined #ara05:55
*** another_larsks has joined #ara06:50
*** larsks has quit IRC06:53
*** myoung has quit IRC08:50
*** myoung|alt has joined #ara08:50
*** myoung|alt has quit IRC10:26
*** myoung has joined #ara10:28
*** myoung has quit IRC10:38
*** myoung has joined #ara10:40
*** another_larsks is now known as larsks15:26
dmsimardARA all the things https://twitter.com/pabelanger/status/80443377669670502615:41
dmsimardlarsks: user found an interesting bug I figured I'd ask you about16:19
dmsimardlarsks: tl;dr mysql is broken (I'll add it to integration testing once I figure this out..)16:19
dmsimardbasically have a uniqueconstraint here: https://github.com/openstack/ara/blob/master/ara/models.py#L163 and then the path column here: https://github.com/openstack/ara/blob/master/ara/models.py#L17516:20
dmsimardIt looks like mysql is not happy about varchar having a size of 3000: http://paste.openstack.org/raw/591445/16:21
dmsimardSo if I try to, say, set that to a Text instead (like playbooks.path) -- then it complains about the uniqueconstraint index not having a specified size: http://paste.openstack.org/raw/591446/16:22
dmsimardThis is because MySQL can only index the first N characters of a field so it needs to be provided a size16:22
larsksdmsimard, reading...16:37
larsksdmsimard, I guess N is actually 767.  Are we really encountering path names that are that long? One option would be to generate a has of the pathname, and use *that* for uniqueness testing.16:39
larskss/has/hash/16:39
dmsimardwell technically it's like 255*3 because each UTF-8 character can be up to 3 bytes16:40
larsksTrue.  Anyway, I think using a hash would solve all of this, right?16:40
dmsimardNot sure what you mean by hash16:40
larsksdmsimard, like a sha256 hash of the pathname.16:41
dmsimardThe other thing I had in mind was to remove playbook.path and instead refer to a file id, something like that16:41
dmsimardplaybook.path implementation predates the file table16:41
dmsimardnow that we have it, it might not make sense to store the path there.16:41
dmsimardespecially considering we have the is_playbook column16:42
larsksYes.  I recall looking into that once and deciding it was difficult because of the order in which we get events from ansible, but I'm not sure.16:42
larsksIt would be a good idea though, yes.16:42
larsksI think you could make the "use a hash of the path for uniqueness" work with only changes in the File class, and not need to worry about it anywhere else.16:42
dmsimardOkay, I'll check it out.16:43
dmsimardlarsks: so... https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits17:18
dmsimardlarsks: most reasonable filesystems have a max limit of 255 anyway17:18
larsksdmsimard, sure, but I though you were saying that we are actually hitting that limit?17:19
dmsimardI mean, "/home/jenkins/workspace/gate-tempest-dsvm-neutron-full-ubuntu-xenial/devstack-gate/playbooks/setup_host.yaml" is already pretty darn long and that's just 109 chars17:19
dmsimardWe're not, it was initially created at a ceiling of 3000 chars :P17:19
larsksOh, so you just want to bring down the size of the varchar field?17:19
dmsimardThat db.String(3000) gets translated in mysql as varchar(3000)17:19
larsksSorry, misunderstood.17:19
larsksSure, turn that sucker down.17:19
*** openstackgerrit has joined #ara17:23
openstackgerritDavid Moreau Simard proposed openstack/ara: Don't expect paths can be any longer than 255 characters  https://review.openstack.org/40709617:23
berendtdmsimard: is it possible to generate a static html file from a specific result set?17:29
berendtdmsimard: and it would be nice to be able to run the --help command for ara and ara-manage without initialising the default database file in $HOME/.ara17:30
dmsimardberendt: Not right now, no -- the static generation basically crawls the web application and generates a page for everything it sees. If there is more than one playbook in the database, it'll generate them.17:31
dmsimardberendt: heh, good point17:31
berendtdmsimard: this would be a nice feature. i want to save the generated static html files in a git repository, one file for one run17:31
dmsimardberendt: The workaround I'd see would be to export a different database for every run or something like that17:31
berendtdmsimard: yes, but i am a little bit lazy :)17:32
dmsimardAlso -- the static generation generates much more than "one file" so be wary of that17:32
dmsimardI'm not sure there'd be value in version-controlling the output of the static generation but curious to hear about your use case17:32
berendtsaving logs from customer sites, to be able to watch specific results in the future17:33
dmsimardAh, okay, thought you meant to diff between runs or something17:33
berendtno17:33
berendti want to save the logs generated by the first run of kolla-ansible somewhere17:34
berendtthis way i can check if everything worked like expected when the customer site has issues17:34
berendtwithout requesting the sqlite file or a dump of the database17:34
berendtthe feature is similiar to rally, there it is possible to generate on html file per task/result17:35
dmsimardyeah... I think your best bet, at least right now, would be to generate a temporary database and re-use it.. something like export ARA_DATABASE="sqlite:////tmp/$(uuidgen).sqlite" or something17:37
berendtYes, I will try this tomorrow. But would be nice to have a similar functionality in the future.17:39
dmsimardberendt: yup, I didn't say I wouldn't do it -- just confirmed the state of things as they are now :)17:41
berendt:-)17:42
dmsimardberendt: I've created two tasks already from your feedback: https://storyboard.openstack.org/#!/story/2000822 and https://storyboard.openstack.org/#!/story/200082117:42
berendtGreat, thank you!17:43
openstackgerritMerged openstack/ara: Don't expect paths can be any longer than 255 characters  https://review.openstack.org/40709617:58
*** openstackstatus has joined #ara18:53
*** ChanServ sets mode: +v openstackstatus18:53

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