=== sambetts|afk is now known as sambetts === rangerpbzzzz is now known as rangerpb [15:28] rharper, so i dont think this behavior has changed. [15:29] but in order to make ds-identify be strict on ec2, you have to set the cloud-init setting in either /etc/cloud/cloud.cfg or /etc/cloud/cloud.cfg.d/[Ee][Cc]2*.conf [15:29] datasource: [15:29] Ec2: [15:30] strict_id: true [15:31] basically, its not a ds-identify setting, its a cloud-init setting that ds-identify respects, (and attempts to read more quickly by being specific on which files are read) [15:36] so, I know it's changed; I built the image and tested explicitly in the core image that if you don't supply a datasource, it skips starting cloud-init; [15:36] when I rebuilt the core snap on Friday, it picked up cloud-init from xenial-updates and it ran cloud-init and tried to hit ec2 [15:38] how would we have gotten to ec2 datasource anyhow if I have found=first,maybe=all,notfound=disabled ? maybe can't have network datasources, and if we didn't find ec2, then we should have disabled cloud-init [15:39] smoser: ^ [15:40] ec2 returns maybe unless strict is set [15:40] it has to. as "maybe there is an ec2 metadata service here" [15:40] on my local system ? [15:40] possibly you ran previously on non-intel ? [15:41] xenial laptop [15:41] how am i to knwo that there is not a ec2 metadata service there? [15:41] lol [15:42] I though if we don't see ec2 in UUID, then no network hit unless you have notfound=enabled ? [15:42] s/though/thought [15:42] maybe says that no network datasource can return a maybe [15:42] so, found=first would have had to have had a uuid of startswith('ec2') [15:43] that is what strict is [15:43] you're defining the behavior in strict [15:45] so, let me ask a different way; if I want to prevent cloud-init from running unless it's found a ds; I don't want maybes at all (even though they are supposedly non-network); what do I set ds-identify to ? [15:47] maybe isn't "no network", its just "there is no information available that says this is not a potential source". [15:49] "no network sources are allowed to return 'maybe'." [15:49] ^-- except ec2 [15:49] :-( [15:50] what ? [15:50] something changed [15:50] so maybe you fixed it to allow ec2 to retrun [15:50] I'm switching to maybe=none [15:50] which is also fine [15:50] however [15:50] I'm still seeing the generator run when I provide no user-data locally [15:51] so something is broken; I'm going to diff cloud-init from my image a few weeks ago vs what's in xenial-updates [15:51] to see if there are any ds-identify changes [15:54] i know what changed for you. [15:54] hm... or maybe i dont [15:55] but it is packaging that is only available in the ubuntu/xenial branch that changes the default behavior of strict_id on ec2 [15:55] of course the generator runs [15:56] smoser, do we need to worry about support of unit tests in dev environment for cloud-init on a fresh xenial system? [15:56] http://paste.ubuntu.com/24448558/ [15:56] or rharper [15:56] smoser: that's the change to ds-identify from 3/31 to friday [15:57] (what's in xenial-updates) [15:58] blackboxsw, unit tests as in running 'make' ? or as in running 'tox' [15:58] so s/search/report from ds-identify updates. /me is lurking/learning about ds-identify behavior [15:58] they wont "just work", you need python dependencies. you have to get python dependencies in some way [15:58] either [15:59] a.) install the runtime (and build-time) dependencies listed in the ubuntu/ branches debian/control [15:59] (or the trunk packages/debian/control.in) [15:59] b.) use tox to install the dependencies with virtual-env or pip or whatever. [15:59] smoser, both fall over on my xenial system missing various dependencies out of the box. tox runs on fresh yakkety no prob, but make test needs some updated system pkgs as you said [16:00] tox does not run on xenial "fresh" ? [16:00] how do you define "fresh". [16:00] a new xenial lxc without additional dev packages installed. [16:00] a new xenial lxc without additional dev packages installed == "fresh" [16:00] :) [16:01] rharper, where did you get your package from in the 'from' portion of that [16:01] probably master before the release, let me find it [16:01] blackboxsw, good. so i'm surprised that yakkety would work. [16:01] I would have done a package build from master and pushed to ppa [16:02] right. [16:02] which meant you didnt pick up xenial packaging modifications [16:02] the daily ppa will have xenial packaging modifictions [16:02] * blackboxsw isn't blocked. I'll just poke at a couple things to firm up this assessment and make sure I didn't try tox on an lxc I had already installed ome deps on. [16:02] as it builds from trunk + ubuntu/xenial branch [16:02] smoser: possible not [16:02] https://launchpad.net/~raharper/+archive/ubuntu/snapbuilds/+files/cloud-init_0.7.9-87-gd23543e.orig.tar.gz [16:03] rharper, i suspect that is what it is. that you built with ./tools/bddeb there, right ? [16:03] y [16:04] yeah, that is trunk's behavior. which is what you wanted. [16:04] I really hate tripping over this stuff though [16:04] xenial changes that behavior [16:04] for stable release reasons [16:04] surely I can configure it from ds-identify.cfg [16:05] no. because its not a ds-identify setting. its a cloud-init setting. that ds-identify respects. [16:05] =( [16:05] I don't want to have to hotpatch cloud-init in core but it looks like I have to [16:05] yeah, which sucks for you as you have no input into the cloud-inti settings. [16:06] rharper, https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily [16:07] that *does* have trunk + ubuntu packaging for each release. [16:07] sure, I know of it [16:07] so thats the recomended way of grabbing it. i knwo that doesnt really help. [16:07] I can't always rely on that since we've been testing before fixes/features have landed [16:07] for example the network-v2 stuff [16:07] I needed to stack the solution together; wait till it landed in truck and then use it [16:08] turns out the "patch when built on xenial" bit me (again) [16:08] yeah, then you need to do something else (or you could set up a recipe build from your branch). or do a recipe build itself. [16:08] I don't want to have a recipel I just want zesty cloud-init behavior in xenial [16:08] so, whatever we need to do to get it, I need to learn how ASAP [16:08] if it's hotpatching cloud-init, I'll do that in the core recipe [16:09] well, you can't do that on xenial right now without a config file change or a change to ds-identify [16:09] but ideally we control this with cfg files that core can lay down [16:09] I'm ok with the config file change [16:09] ? [16:09] we write out a ds-identify.cfg file in core recipe [16:09] not ds-identify config [16:09] clodu-init config. [16:09] sure [16:09] I'll take that too [16:09] then as i said above [16:09] the Datasource: [16:09] Ec2: [16:10] yes [16:10] hrm; so I'm still seeing the generator *start* cloud-init [16:10] that's not Datasource related (ec2) [16:11] so maybe I need that ds-identify change too (s,report,search) in addition to the ec2 datasource change too [16:18] smoser, you mentioned you were working on ds-identify unit tests. Where will that unit test live? Under lp:cloud-init/tests subdir or down in ./tools? I'm asking as I'm looking to add some simple unit tests for ./tools/read-dependencies [16:19] and I want to follow the same convention for other ./tools/ modules [16:20] blackboxsw, probalby tests/unittests/ let me see what i have [16:20] although, maybe read-dependencies doesn't need unit test coverage as it's just a facility to setup your environment that's not used in cloud-init proper [16:24] i think i agree with you. [16:25] smoser: I think my policy is getting ignored; http://paste.ubuntu.com/24448820/ [16:25] also OVF is always returning DS_MAYBE (it's local) ; but I suspect that's new [16:25] http://paste.ubuntu.com/24448826/ [16:25] so then we always think we might be OVF if you have a cdrom in the instance at all (which seems broken) but not harmful on xenial, but broken on zesty (AFAICT) [16:26] that is not new though [16:26] # FIXME: currently just return maybe if there is a cdrom [16:26] # ovf iso9660 transport does not specify an fs label. [16:26] # better would be to check if [16:26] return ${DS_MAYBE} [16:26] we're setting cloud-init to run if we have a maybe [16:27] I have in the policy file maybe=none [16:27] blackboxsw, that was agree that i owuldnt bother writing unit tests for read-dependencies. [16:27] and we still run cloud-init [16:27] hm. [16:27] can i see ? [16:27] see the paste, right ? [16:28] +1 dropping that test idea for tools/read-dependencies idea smoser [16:28] smoser: the most recent change was the ds-identify change to config drive path [16:29] git show 169a7105 [16:32] smoser: so, need policy: in the start of the file to get thing set; [16:38] smoser: I'll work up a patch to log that ds-identify looked at a ds-identify file but didn't file a policy; it would have helped poke me in the eye that I didn't format the policy config properly ; that sound OK ? [16:40] rharper, i'lm looking at this. you're right its busted. [16:44] rharper, i was wrong. [16:44] its your input that is busted. probably bcause there is no doc. [16:45] smoser: ack [16:46] hence the patch to log that it read a policy file but found none [16:46] that'd be a nice fat warning in the log file that you didn't format it properly [16:47] and I'll likely include a line like 'If you'd like strict behavior as in zesty, use the following line: XXX' [16:47] but you actually dont need that. [16:47] right ? [16:47] you dont need to set that there. [16:48] sure; but since I'm attempting to maintain "run xenial more strictly than default, use this config" [16:48] I wanted it documented (and ideally unittested) [16:48] so when I screw it up again (or change how I build the core snap, or whatever) we have a very clear doc on what it *should* look like [16:50] better doc of the config file format is fine. [16:50] unit tests are fine [16:50] logging that it found a policy file (ds-identify.cfg) but found no settings (missing ^policy: ) [16:50] fine ? [16:50] i'm not interested so much in documenting [16:50] ci.datasource.ec2.strict_id: true [16:52] if you want to warn that no policy was set, thats fine. but you can't warn in the following cases: [16:52] a.) empty ds-identify.cfg (thats perfectly fine) [16:52] b.) contains only : ci.datasource.ec2.strict_id: true [16:52] c.) contains only comments '# this is wehre i would put a setting' [16:52] I didn't want a warning [16:52] I just want to log it in ds-identify.log [16:53] ie, nothing printed outwardly [16:53] warning/logging, thats fine. but still same behavior. [16:53] but ack to a-c [16:54] I think (a) seems odd; b) is something we mention to do which is fine 3) ack to ignoring comments [16:54] what's OK about a) ? [16:54] thats pretty standard behavior. [16:54] to touch a file; yes; but what do we do differently with an empty policy file ? [16:54] the defaults? [16:54] yeah, that woudl take defaults. [16:54] seems like one would get that without the file though; [16:55] and thats perfectly fine. [16:55] and its fine to have an empty file. [16:55] well, depending on the core [16:55] code [16:55] in some cases the mere presence changes behavior [16:55] 'etc/cloud/cloud-init.disabled ' [17:10] strange, so we "want" to avoid duplication of dependencies outside of the control file in cloud-init by using a makefile target or dependency install script, but we basically have that duplication already in tools/bddeb which defines a package name lookup for any deb package dependency in STD_NAMED_PACKAGES / NONSTD_NAMED_PACKAGES [17:11] well, we declare python (pypi named) pythonn dependencies once [17:11] we have to translate those to ubuntu package names . thats unavoidable. [17:12] it seems it's only unavodable because our control file has parameterized test_requires [17:12] and the fact that names are not consistently mapped from pypi -> ubuntu is simply fact [17:12] right [17:12] if it were hardcoded in debian/control we wouldn't have to lookup/translate though [17:13] just write it in debian/control instead of a pkg name lookup in tools/bdeb. [17:13] I guess the lookup us something for pip names which conform to python- [17:13] well,, i guess we could just drop the STD_NAMED_PACKAGES, adn then use the standard naming confvention if not presnt in NONSTD_NAMED_PACKAGES [17:14] but if we write it in debian/control, then new adds need 2 touchees. [17:14] smoser, it kinda feels like that STD_NAMED_PACKAGES is superfluous. Do we run integration/install tests with the built deb? [17:14] yes. [17:15] and yeah, i sgree with std_named_packages being superflous. [17:15] ok, yeah so we could drop STD_NAMED_PACKAGES I guess as our install test should cover that aspect [17:15] +1 will work on that [17:15] as part of this small PR [17:15] (pull request0 [17:16] i guess the only value it has right now... [17:16] is that you get a nicer error message [17:16] in bddeb says [17:16] Do not know how to translate pypi " [17:16] "dependency %r to a known package" [17:17] where if you didnt have that , you wouldjust get a fail later . but maybe that is obvious enough [18:31] https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/323059 [18:31] rharper, ^ === sambetts is now known as sambetts|afk [21:22] Just posted a near trivial up for "make deb". Some cleanups in packages/bddeb. === rangerpb is now known as rangerpbzzzz