/srv/irclogs.ubuntu.com/2015/08/06/#cloud-init.txt

claudiupopasmoser, Odd_Bloke: any reason why cloudinit.logging is called `logging`?12:16
claudiupopaAre we expecting it to always replace the builtin logging module?12:16
openstackgerritScott Moser proposed stackforge/cloud-init: add unregister and reset to DictRegistry and use  https://review.openstack.org/20969615:16
smoserOdd_Bloke, https://review.openstack.org/#/c/209696/15:17
smoserit is nonobvious to me how to test the udpate_configuration15:17
smosercould you quickly add 2 ?15:18
Odd_Blokesmoser: 2?15:18
smoserid ont know why i said 215:18
smoseri guess 315:19
Odd_Blokesmoser: Oh, add some tests?15:19
claudiupopawhy isn't the reset separated?15:19
smoserone for reset, update and update_with_null15:19
smoserclaudiupopa, as in you want to reset with no config15:19
smoserright?15:19
claudiupopayeah.15:19
claudiupopaI tend to not like boolean flags that modifies something.15:20
claudiupopaI mean functions with boolean flags.15:20
claudiupopaJust a question, is expected from DictRegistry to be thread safe?15:21
Odd_Blokeclaudiupopa: No.15:27
Odd_Blokeclaudiupopa: But only because there was no reason to at this point, rather than from some deep opposition to thread-safe data structures. :p15:28
smoserclaudiupopa, i think i'd just drop the 'reset'15:33
smoserand if you want reset, you just instantiated_handler_registry.reset()15:34
claudiupopasmoser: yeah, that would be better imo.15:34
Odd_Blokesmoser: If you still want me to add tests after that, let me know when I can pull the change to play with it. :)15:41
smoserOdd_Bloke, if you could, i'd really appreciate it.15:42
Odd_Blokesmoser: Cool, give me a shout when it's ready.15:43
openstackgerritScott Moser proposed stackforge/cloud-init: add unregister and reset to DictRegistry and use  https://review.openstack.org/20969615:44
smoserOdd_Bloke, ^15:44
claudiupopaby the way.  any reason why cloudinit.logging is called `logging`?15:46
Odd_Blokesmoser: ^15:48
smoserto be like loggin15:50
smoserlogging15:50
claudiupopaSo we'll use that instead of the builtin logging module?15:50
smoseryeah. by name it is the same and the intent is it looks the same.15:51
claudiupopaBecause in that case, it should be made explicit in url_helper and templater.15:51
claudiupopaas in from cloudinit import logging instead of a plain `import logging`.15:51
claudiupopaSince absolute import is not activated in those modules.15:52
smoseryou're right. those should use tcloudinit.logging15:52
smoserat least that is the intent.15:52
smosergood catch claudiupopa15:52
Odd_Blokesmoser: Going in to a meeting now; will look at those tests in ~30 minutes.16:00
smoserk.16:05
openstackgerritClaudiu Popa proposed stackforge/cloud-init: Add an API for loading a data source  https://review.openstack.org/20952016:56
claudiupopaOdd_Bloke, smoser ^ still work in progress, but I'll appreciate a review regarding the direction.16:58
smoserso as you suggest4ed, https://review.openstack.org/#/c/209520/2/cloudinit/plugin_finder.py16:59
smosershoudl have16:59
smoser from . import logging16:59
smoserright ?16:59
claudiupopaYeah, I noticed right now that.17:00
claudiupopaThanks.17:00
smoserhttps://review.openstack.org/#/c/209520/2/cloudinit/sources/openstack/httpopenstack.py17:03
smosercan we jsut tlak here.. ?17:03
claudiupopayeah.17:03
openstackgerritClaudiu Popa proposed stackforge/cloud-init: Use an explicit absolute import for importing the logging module  https://review.openstack.org/21003517:03
openstackgerritDaniel Watkins proposed stackforge/cloud-init: Add unregister and reset to DictRegistry and use  https://review.openstack.org/20969617:04
smoserso there, data_sources() does not know if it should do network data sources or local ?17:05
Odd_Blokesmoser: I think it just needed the one test, which I've pushed up.17:05
claudiupopaNo, not at that point.17:05
claudiupopaThat was the intent of the strategies.17:05
claudiupopaWhich is a fancy word for implementing filters.17:06
claudiupopaThe idea is that if you want the network data sources only or any other kind of data source, you implement a strategy and you pass it to get_data_source.17:06
Odd_BlokeNow I'm EOD'ing. :)17:06
smoserOdd_Bloke, htanks17:06
claudiupopaI did it in this way since it really separates the concerns.17:07
claudiupopaEach data source will not be interested in how it will be chosen.17:07
smoserclaudiupopa, ok, i think thats probably fine, but the example strategy of 'serial' implied to me 'parallel'17:08
claudiupopayep.17:08
claudiupopaAt that point you can combine network + parallel.17:08
claudiupopaOr any other combination you like17:08
claudiupopahttps://review.openstack.org/#/c/209520/2/cloudinit/sources/base.py17:09
claudiupopacheck valid_data_sources.17:09
smoseri think that is ok. ... but i want to be clear somehow when loading the datasource to search17:09
smoserthat it does not have (or is not guaranteed) functional network17:09
smoserie, the network could be wrong at this poitn an dit shoudlnt consider using it17:09
claudiupopayep, I see your point. Probably the actual strategies that will be used will be specific per each step in the stages.17:10
smoserclaudiupopa, thats the real extent of my comemnts then i think17:28
claudiupopano other obvious issue?17:29
claudiupopathanks!17:31
claudiupopaI'll push the tests tomorrow.17:31
smoserclaudiupopa, can you https://review.openstack.org/#/c/209696/ ?17:32
smoserjust as it is mine, i think you agree with it at this point.17:32
smosercan you push yes for workflow ?17:32
claudiupopayep, looks nice.17:33
openstackgerritMerged stackforge/cloud-init: Add unregister and reset to DictRegistry and use  https://review.openstack.org/20969617:46

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