/srv/irclogs.ubuntu.com/2017/08/15/#cloud-init.txt

blackboxswrharper: I think we are good on https://code.launchpad.net/~msaikia/cloud-init/+git/cloud-init/+merge/322991 now. I was likely going to land this later today unless you have objections. smoser did initial review there I had a couple of followups minor changes have come back per review comments15:23
rharperblackboxsw: cool15:24
blackboxswyou know, gotta get content for our cloud-init weekly summary15:25
blackboxsw:)15:25
rharperlol15:25
rharperblackboxsw: let me know when you push, and I'll rebase my two branches (doc change and v2 network passthrough)15:25
blackboxswwaiting on tox15:36
blackboxswrharper: pushed15:39
rharperblackboxsw: cool, thanks15:39
rharperTemporalBeing: ok, looked again at the code;  the runcmd items get written out to a scripts file in the instance and then aren't executed until the scripts_user module runs, which happens very late (and after package install);  that explains why we could do package installs and interact with them in the runcmd (like your ufw changes, and pip);  What remains is the dictionary merging;  I'm going to look at that next15:41
TemporalBeingok15:41
rharperblackboxsw: ok, pushed my two branches15:58
blackboxswnice rharper. ok I'm seeing a 6 hour offset in my unit tests on analyze branch (the only thing I think that is blocking that branch from landing). Strange thing in test_dump is that I use static SAMPLE_LOGS, so I'm not quite sure how our jenkins environment is parsing that differently. digging a bit16:00
rharperblackboxsw: so, I've not updated to your latest branch changes yet, but it looked like we might need to mock out the timestamp value16:01
rharperlocally, tox -e py3 was failing, maybe you've already fixed that and your offset is different16:01
rharperblackboxsw: do you have a link to the failure on jenkins ?16:01
blackboxswrharper: https://jenkins.ubuntu.com/server/job/cloud-init-ci/144/console16:02
rharperblackboxsw: yeah, that's what I see locally on my xenial dev box16:03
rharpertox -e py3 shows it each time16:03
* rharper will take a closer look since he can reproduce 16:03
* blackboxsw makes sure I've pushed latest16:03
blackboxswI get no errors xenial tox -e py3 on 2fdfab7..9e8fc8516:04
blackboxswjust pushed16:04
* rharper refreshes16:12
rharperblackboxsw: why does that work?16:13
rharperI think we should debug the parse_timestamp with that value16:13
blackboxswI don't know if that works. but I definitely feel the same way16:13
blackboxswtimeshifting -6hours just sheds light on something busticated16:14
blackboxswI only pushed that offset -6 hours to let jenkins run and see if it still fell over16:14
blackboxswI didn't intend you to get the latest work in progress branch16:14
blackboxsws/branch/commit16:15
blackboxswgood timeshift -6hours didn't work. it's still broken by a 6 hour offset https://jenkins.ubuntu.com/server/job/cloud-init-ci/146/console16:15
blackboxswreverting that last commit16:15
rharperI think this is a utc thingy;  when I manually convert the value via date, I get what the unittest gets as well;  so I'm wondering where you got the expected value ?16:25
rharperah16:26
rharperit's in MDT16:26
blackboxswhahah16:27
rharper% date  +%s.%3N -d "2017-08-08 20:05:07,147 MDT"16:27
rharper1502244307.14716:27
blackboxswyeah16:27
blackboxswmy bad16:27
rharperwell, not really16:27
rharperI feel like we need something else in here re: TZ16:27
rharperthe timestamp value written to the record is including the TZ offset in the timestamp value16:28
rharperthat feels like a bug, it should be in UTC (or at least we need to record the TZ)16:28
blackboxswright an tz explicit format16:28
rharperwell, I have a branch to force logging timestamps into UTC16:29
rharperwhich should help here16:29
blackboxswright would avoid the issue16:29
blackboxswbut for old logs...16:29
rharperI think it's OK, if you're parsing a cloud-init.log file for events, you'r "generating" events from the log file, and you get the +TZ offset in the records16:30
rharperI don't think that's an issue per-se16:30
rharperthat is, the delta between events is still correct independent of the TZ offset16:31
rharperok, I've got to grab some lunch, will think on this, bbl16:32
blackboxswreset my tz to repro the failure.. ok working it16:45
=== shardy is now known as shardy_afk
jhodappdpb1, I'm curious if there is already a way of adding a user via cloud-init/cloud-config for Ubuntu Core?18:11
dpb1jhodapp: hey, not everything has landed, a couple of MPs are still in review for snappy.  But it's kind of testable right now18:16
dpb1with effort18:16
dpb1rharper: if all that was available in uc16, would adding users work?18:16
rharperthe users configuration dictionary works18:16
jhodappdpb1, oh nice18:16
jhodapprharper, so that's a full on uc16 system user right?18:17
rharperif you want to add snappy users, then you use the snap_user format,18:17
rharperit's a normal user, if you want a snappy system user, with store privs, you need to supply the email or system_user assertion18:17
rharperlemme get the link to docs18:17
rharperhttp://cloudinit.readthedocs.io/en/latest/topics/modules.html#snap-config18:19
rharperso snappy: {'email': <addr>}  will trigger the 'snap create-user' which will do the user lookup via store and import ssh keys from associated account if present, and that will be a snap user which can install without sudo18:20
rharperthe other users: keys will work, and users are added via the --extra-users path, they have sudo but are not authenticated to the store , so one would need to snap login, etc to access snap stuff with an account not created through snap create-user18:20
jhodapprharper, what if the device doesn't have internet access to lookup via the store?18:26
rharperit fails18:26
rharperthat's always the case for snap store interactions18:26
rharperif you think you cannot rely on the store18:26
rharperthen you need to use assertions18:26
rharperhttps://docs.ubuntu.com/core/en/reference/assertions/system-user18:26
jhodapprharper, manually applied assertions or can it be done with cloud-init still?18:27
rharperwith cloud-init18:27
rharperyou just inline the assertions in the config18:27
rharpersnappy: {'assertions': [assrt1, assert2, assser3']18:27
jhodapprharper, ah I see, I think that should work for the requirements I have in mind18:27
rharperand then you can do email: <foo> known: true18:27
jhodapprharper, and that'll work no matter if we've disabled console-conf?18:30
rharperno interaction directly with console-conf18:30
jhodapprharper, speaking of which, second question...can we disable console-conf via cloud-init?18:31
rharpercloud-init runs 'snap ack  <assertion>'18:31
jhodappok18:31
rharperand 'snap create-user --known <email>'18:31
jhodappso just a wrapper18:31
rharperwe don't have a config for disabling console-conf, but 1) if you create-user, snap disables console-conf for you18:31
rharper2) if you want to cheat, you can touch the files that the systemd units do to disable console-conf18:31
jhodapprharper, oh interesting18:32
jhodappyeah we knew we could do that manually18:32
jhodappthat'll work for us18:32
rharperconsole-conf does 'snap create-user '18:32
jhodappalthough you may consider adding that ability explicitly18:32
rharperso, it's either interactive via console-conf, or via cloud-init18:32
rharperI don't think that'll abide18:32
rharperin general, we don't want to disable console-conf18:32
rharperthose that really do want to have  custom image anyhow18:32
jhodapprharper, that's not a safe assumption18:33
rharperin which they can write out something to disable console-conf18:33
jhodappthe use case for this project breaks that assumption18:33
rharperand you're using the stock pc image? instead of customizing ?18:33
jhodapprharper, yes18:33
rharperto use system-assertions you need to have your own model18:34
rharperso you'll need a custom image anyhow18:34
jhodapprharper, you can't use the default one with assertions?18:35
rharperyou can't sign it since you're not canonical18:35
jhodapprharper, we are though :)18:35
rharperfrom everything I'm aware of, these should really be custom images; but I'll leave that to you;   you can always do a write_files to touch the console-conf disable, etc if you don't make one;18:36
rharperblackboxsw: I was thinking, we should grep for any other configobj + stringio19:44
rharpermight as well see if we can find any other ones like that19:44
blackboxswrobjo: good thought rharper we can fold that in with the cc_landscape change19:44
blackboxswoops sorry robjo.... rharper I mean19:44
* rharper just keeps handing out the work19:45
blackboxsw15 more mins on my existing unit tests, I'm trying to get coverage of failure paths up19:45
blackboxswrharper: I'm seeing various approaches to using logs in cc modules. some define them locally for the module LOG = logging.getlogger(__name__) other's use the log passed into the handle function (param # 3). What's the preferred long term?19:48
blackboxswsome cc modules use both19:49
rharperI believe all new ones use LOG = logging.getlogger(__name__)19:49
blackboxswok so we can be certain where the logs are coming from19:49
rharperack19:49
blackboxswrharper: I'll tweak cc_landcsape to use this approach then19:50
blackboxswsince I'm meddling19:50
rharpermaybe19:50
rharperthe log function isn't related to this bug; so my preference is not to touch it19:50
blackboxswmaybe a topic to discuss w/ smoser on friday19:50
rharperyes19:50
blackboxsw+119:50
rharperwe may want to file these as backlog bugs19:50
blackboxswfalls into the "style" category (like ' versus ")19:51
blackboxswalsmost19:51
rharperheh19:52
blackboxswok cc_landscape done. now onto cc_puppet.20:50
blackboxswwhich also has no unit tests20:51
blackboxswand looks to suffer from the same prob20:51
blackboxswthe other modules using StringIO seem to have handled things for py320:51
blackboxswand have coverage20:51
dpb1unittesting++21:00
blackboxswup to 61% coverage... slowly climbing out of the hole21:00
rharperblackboxsw: nice21:03
blackboxswfound more bogus docs for cloud-config options in  cc_puppet docstr22:33
blackboxswok fixing that too. yay unit tests22:33
blkadderHi all. I am trying to use write_file in order to write files on to an AWS instance and failing miserably. In two of the test cases the files themselves are being written but with no content and in the third nothing is written at all. Any suggestions as to what I should be looking for?23:01
blkadders/are being written/are being created/23:01

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