*** myoung has quit IRC | 05:54 | |
*** myoung has joined #ara | 05:55 | |
*** another_larsks has joined #ara | 06:50 | |
*** larsks has quit IRC | 06:53 | |
*** myoung has quit IRC | 08:50 | |
*** myoung|alt has joined #ara | 08:50 | |
*** myoung|alt has quit IRC | 10:26 | |
*** myoung has joined #ara | 10:28 | |
*** myoung has quit IRC | 10:38 | |
*** myoung has joined #ara | 10:40 | |
*** another_larsks is now known as larsks | 15:26 | |
dmsimard | ARA all the things https://twitter.com/pabelanger/status/804433776696705026 | 15:41 |
---|---|---|
dmsimard | larsks: user found an interesting bug I figured I'd ask you about | 16:19 |
dmsimard | larsks: tl;dr mysql is broken (I'll add it to integration testing once I figure this out..) | 16:19 |
dmsimard | basically 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#L175 | 16:20 |
dmsimard | It looks like mysql is not happy about varchar having a size of 3000: http://paste.openstack.org/raw/591445/ | 16:21 |
dmsimard | So 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 |
dmsimard | This is because MySQL can only index the first N characters of a field so it needs to be provided a size | 16:22 |
larsks | dmsimard, reading... | 16:37 |
larsks | dmsimard, 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 |
larsks | s/has/hash/ | 16:39 |
dmsimard | well technically it's like 255*3 because each UTF-8 character can be up to 3 bytes | 16:40 |
larsks | True. Anyway, I think using a hash would solve all of this, right? | 16:40 |
dmsimard | Not sure what you mean by hash | 16:40 |
larsks | dmsimard, like a sha256 hash of the pathname. | 16:41 |
dmsimard | The other thing I had in mind was to remove playbook.path and instead refer to a file id, something like that | 16:41 |
dmsimard | playbook.path implementation predates the file table | 16:41 |
dmsimard | now that we have it, it might not make sense to store the path there. | 16:41 |
dmsimard | especially considering we have the is_playbook column | 16:42 |
larsks | Yes. 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 |
larsks | It would be a good idea though, yes. | 16:42 |
larsks | I 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 |
dmsimard | Okay, I'll check it out. | 16:43 |
dmsimard | larsks: so... https://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits | 17:18 |
dmsimard | larsks: most reasonable filesystems have a max limit of 255 anyway | 17:18 |
larsks | dmsimard, sure, but I though you were saying that we are actually hitting that limit? | 17:19 |
dmsimard | I 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 chars | 17:19 |
dmsimard | We're not, it was initially created at a ceiling of 3000 chars :P | 17:19 |
larsks | Oh, so you just want to bring down the size of the varchar field? | 17:19 |
dmsimard | That db.String(3000) gets translated in mysql as varchar(3000) | 17:19 |
larsks | Sorry, misunderstood. | 17:19 |
larsks | Sure, turn that sucker down. | 17:19 |
*** openstackgerrit has joined #ara | 17:23 | |
openstackgerrit | David Moreau Simard proposed openstack/ara: Don't expect paths can be any longer than 255 characters https://review.openstack.org/407096 | 17:23 |
berendt | dmsimard: is it possible to generate a static html file from a specific result set? | 17:29 |
berendt | dmsimard: 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/.ara | 17:30 |
dmsimard | berendt: 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 |
dmsimard | berendt: heh, good point | 17:31 |
berendt | dmsimard: this would be a nice feature. i want to save the generated static html files in a git repository, one file for one run | 17:31 |
dmsimard | berendt: The workaround I'd see would be to export a different database for every run or something like that | 17:31 |
berendt | dmsimard: yes, but i am a little bit lazy :) | 17:32 |
dmsimard | Also -- the static generation generates much more than "one file" so be wary of that | 17:32 |
dmsimard | I'm not sure there'd be value in version-controlling the output of the static generation but curious to hear about your use case | 17:32 |
berendt | saving logs from customer sites, to be able to watch specific results in the future | 17:33 |
dmsimard | Ah, okay, thought you meant to diff between runs or something | 17:33 |
berendt | no | 17:33 |
berendt | i want to save the logs generated by the first run of kolla-ansible somewhere | 17:34 |
berendt | this way i can check if everything worked like expected when the customer site has issues | 17:34 |
berendt | without requesting the sqlite file or a dump of the database | 17:34 |
berendt | the feature is similiar to rally, there it is possible to generate on html file per task/result | 17:35 |
dmsimard | yeah... 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 something | 17:37 |
berendt | Yes, I will try this tomorrow. But would be nice to have a similar functionality in the future. | 17:39 |
dmsimard | berendt: 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 |
dmsimard | berendt: I've created two tasks already from your feedback: https://storyboard.openstack.org/#!/story/2000822 and https://storyboard.openstack.org/#!/story/2000821 | 17:42 |
berendt | Great, thank you! | 17:43 |
openstackgerrit | Merged openstack/ara: Don't expect paths can be any longer than 255 characters https://review.openstack.org/407096 | 17:58 |
*** openstackstatus has joined #ara | 18:53 | |
*** ChanServ sets mode: +v openstackstatus | 18:53 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!