/srv/irclogs.ubuntu.com/2017/04/24/#cloud-init.txt

=== sambetts|afk is now known as sambetts
=== rangerpbzzzz is now known as rangerpb
smoserrharper, so i dont think this behavior has changed.15:28
smoserbut 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*.conf15:29
smoserdatasource:15:29
smoser Ec2:15:29
smoser  strict_id: true15:30
smoserbasically, 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:31
rharperso, 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
rharperwhen I rebuilt the core snap on Friday, it picked up cloud-init from xenial-updates and it ran cloud-init and tried to hit ec215:36
rharperhow 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-init15:38
rharpersmoser: ^15:39
smoserec2 returns maybe unless strict is set15:40
smoserit has to. as "maybe there is an ec2 metadata service here"15:40
rharperon my local system ?15:40
smoserpossibly you ran previously on non-intel ?15:40
rharperxenial laptop15:41
smoserhow am i to knwo that there is not a ec2 metadata service there?15:41
rharperlol15:41
rharperI though if we don't see ec2 in UUID, then no network hit unless you have notfound=enabled ?15:42
rharpers/though/thought15:42
rharpermaybe says that no network datasource can return a  maybe15:42
rharperso, found=first would have had to have had a uuid of startswith('ec2')15:42
smoserthat is what strict is15:43
smoseryou're defining the behavior in strict15:43
rharperso, 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:45
smosermaybe isn't "no  network", its just "there is no information available that says this is not a potential source".15:47
smoser"no network sources are allowed to return 'maybe'."15:49
smoser ^-- except ec215:49
smoser:-(15:49
rharperwhat ?15:50
rharpersomething changed15:50
rharperso maybe you fixed it to allow ec2 to retrun15:50
rharperI'm switching to maybe=none15:50
rharperwhich is also fine15:50
rharperhowever15:50
rharperI'm still seeing the generator run when I provide no user-data locally15:50
rharperso something is broken;  I'm going to diff cloud-init from my image a few weeks ago vs what's in xenial-updates15:51
rharperto see if there are any ds-identify changes15:51
smoseri know what changed for you.15:54
smoserhm... or maybe i dont15:54
smoserbut it is packaging that is only available in the ubuntu/xenial branch that changes the default behavior of strict_id on ec215:55
smoserof course the generator runs15:55
blackboxswsmoser, do we need to worry about support of unit tests in dev environment for cloud-init on a fresh xenial system?15:56
rharperhttp://paste.ubuntu.com/24448558/15:56
blackboxswor rharper15:56
rharpersmoser: that's the change to ds-identify from 3/31 to friday15:56
rharper(what's in xenial-updates)15:57
smoserblackboxsw, unit tests as in running 'make' ? or as in running 'tox'15:58
blackboxswso s/search/report from ds-identify updates. /me is lurking/learning about ds-identify behavior15:58
smoserthey wont "just work", you need python dependencies. you have to get python dependencies in some way15:58
smosereither15:58
smosera.) install the runtime (and build-time) dependencies listed in the ubuntu/ branches debian/control15:59
smoser  (or the trunk packages/debian/control.in)15:59
smoserb.) use tox to install the dependencies with virtual-env or pip or whatever.15:59
blackboxswsmoser, 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 said15:59
smosertox does not run on xenial "fresh" ?16:00
smoserhow do you define "fresh".16:00
blackboxsw a new xenial lxc without additional dev packages installed.16:00
blackboxsw a new xenial lxc without additional dev packages installed == "fresh"16:00
blackboxsw:)16:00
smoserrharper, where did you get your package from in the 'from' portion of that16:01
rharperprobably master before the release, let me find it16:01
smoserblackboxsw, good. so i'm surprised that yakkety would work.16:01
rharperI would have done a package build from master and pushed to ppa16:01
smoserright.16:02
smoserwhich meant you didnt pick up xenial packaging modifications16:02
smoserthe daily ppa will have xenial packaging modifictions16: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
smoseras it builds from trunk + ubuntu/xenial branch16:02
rharpersmoser: possible not16:02
rharperhttps://launchpad.net/~raharper/+archive/ubuntu/snapbuilds/+files/cloud-init_0.7.9-87-gd23543e.orig.tar.gz16:02
smoserrharper, i suspect that is what it is. that you built with ./tools/bddeb there, right ?16:03
rharpery16:03
smoseryeah, that is trunk's behavior. which is what you wanted.16:04
rharperI really hate tripping over this stuff though16:04
smoserxenial changes that behavior16:04
smoserfor stable release reasons16:04
rharpersurely I can configure it from ds-identify.cfg16:04
smoserno. because its not a ds-identify setting. its a cloud-init setting. that ds-identify respects.16:05
rharper=(16:05
rharperI don't want to have to hotpatch cloud-init in core but it looks like I have to16:05
smoseryeah, which sucks for you as you have no input into the cloud-inti settings.16:05
smoserrharper, https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily16:06
smoserthat *does* have trunk + ubuntu packaging for each release.16:07
rharpersure, I know of it16:07
smoserso thats the recomended way of grabbing it. i knwo that doesnt really help.16:07
rharperI can't always rely on that since we've been testing before fixes/features have landed16:07
rharperfor example the network-v2 stuff16:07
rharperI needed to stack the solution together;  wait till it landed in truck and then use it16:07
rharperturns out the "patch when built on xenial" bit me (again)16:08
smoseryeah, 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
rharperI don't want to have a recipel I just want zesty cloud-init behavior in xenial16:08
rharperso, whatever we need to do to get it, I need to learn how ASAP16:08
rharperif it's hotpatching cloud-init, I'll do that in the core recipe16:08
smoserwell, you can't do that on xenial right now without a config file change or a change to ds-identify16:09
rharperbut ideally we control this with cfg files that core can lay down16:09
rharperI'm ok with the config file change16:09
smoser?16:09
rharperwe write out a ds-identify.cfg file in core recipe16:09
smosernot ds-identify config16:09
smoserclodu-init config.16:09
rharpersure16:09
rharperI'll take that too16:09
smoserthen as i said above16:09
rharperthe Datasource:16:09
rharperEc2:16:09
smoseryes16:10
rharperhrm; so I'm still seeing the generator *start* cloud-init16:10
rharperthat's not Datasource related (ec2)16:10
rharperso maybe I need that ds-identify change too (s,report,search) in addition to the ec2 datasource change too16:11
blackboxswsmoser, 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-dependencies16:18
blackboxswand I want to follow the same convention for other ./tools/ modules16:19
smoserblackboxsw, probalby tests/unittests/ let me see what i have16:20
blackboxswalthough, 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 proper16:20
smoseri think i agree with you.16:24
rharpersmoser: I think my policy is getting ignored;  http://paste.ubuntu.com/24448820/16:25
rharperalso OVF is always returning DS_MAYBE (it's local) ; but I suspect that's new16:25
smoserhttp://paste.ubuntu.com/24448826/16:25
rharperso 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:25
smoserthat is not new though16:26
smoser    # FIXME: currently just return maybe if there is a cdrom16:26
smoser    # ovf iso9660 transport does not specify an fs label.16:26
smoser    # better would be to check if16:26
smoser    return ${DS_MAYBE}16:26
rharperwe're setting cloud-init to run if we have a maybe16:26
rharperI have in the policy file maybe=none16:27
smoserblackboxsw, that was agree that i owuldnt bother writing unit tests for read-dependencies.16:27
rharperand we still run cloud-init16:27
smoserhm.16:27
smosercan i see ?16:27
rharpersee the paste, right ?16:27
blackboxsw+1 dropping that test idea for tools/read-dependencies idea smoser16:28
rharpersmoser: the most recent change was the ds-identify change to config drive path16:28
rharper git show 169a710516:29
rharpersmoser: so, need policy: in the start of the file to get thing set;16:32
rharpersmoser: 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:38
smoserrharper, i'lm looking at this. you're right its busted.16:40
smoserrharper, i was wrong.16:44
smoserits your input that is busted. probably bcause there is no doc.16:44
rharpersmoser: ack16:45
rharperhence the patch to log that it read a policy file but found none16:46
rharperthat'd be a nice fat warning in the log file that you didn't format it properly16:46
rharperand I'll likely include a line like 'If you'd like strict behavior as in zesty, use the following line: XXX'16:47
smoserbut you actually dont need that.16:47
smoserright ?16:47
smoseryou dont need to set that there.16:47
rharpersure;  but since I'm attempting to maintain "run xenial more strictly than default, use this config"16:48
rharperI wanted it documented (and ideally unittested)16:48
rharperso 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 like16:48
smoserbetter doc of the config file format is fine.16:50
smoserunit tests are fine16:50
rharperlogging that it found a policy file (ds-identify.cfg) but found no settings (missing ^policy: )16:50
rharperfine ?16:50
smoseri'm not interested so much in documenting16:50
smoser ci.datasource.ec2.strict_id: true16:50
smoserif you want to warn that no policy was set, thats fine. but you can't warn in the following cases:16:52
smosera.) empty ds-identify.cfg (thats perfectly fine)16:52
smoserb.) contains only : ci.datasource.ec2.strict_id: true16:52
smoserc.) contains only comments '# this is wehre i would put a setting'16:52
rharperI didn't want a warning16:52
rharperI just want to log it in ds-identify.log16:52
rharperie, nothing printed outwardly16:53
smoserwarning/logging, thats fine. but still same behavior.16:53
rharperbut ack to a-c16:53
rharperI think (a) seems odd;  b) is something we mention to do  which is fine  3) ack to ignoring comments16:54
rharperwhat's OK about a) ?16:54
smoserthats pretty standard behavior.16:54
rharperto touch a file; yes; but what do we do differently with an empty policy file ?16:54
rharperthe defaults?16:54
smoseryeah, that woudl take defaults.16:54
rharperseems like one would get that without the file though;16:54
smoserand thats perfectly fine.16:55
smoserand its fine to have an empty file.16:55
rharperwell, depending on the core16:55
rharpercode16:55
rharperin some cases the mere presence changes behavior16:55
rharper'etc/cloud/cloud-init.disabled '16:55
blackboxswstrange, 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_PACKAGES17:10
smoserwell, we declare python (pypi named) pythonn dependencies once17:11
smoserwe have to translate those to ubuntu package names . thats unavoidable.17:11
blackboxswit seems it's only unavodable because our control file has parameterized test_requires17:12
smoserand the fact that names are not consistently mapped from pypi -> ubuntu is simply fact17:12
blackboxswright17:12
blackboxswif it were hardcoded in debian/control we wouldn't have to lookup/translate though17:12
blackboxswjust write it in debian/control instead of a pkg name lookup in tools/bdeb.17:13
blackboxswI guess the lookup us something for pip names which conform to python-<packagename>17:13
smoserwell,, i guess we could just drop the STD_NAMED_PACKAGES, adn then use the standard naming confvention if not presnt in NONSTD_NAMED_PACKAGES17:13
smoserbut if we write it in debian/control, then new adds need 2 touchees.17:14
blackboxswsmoser, it kinda feels like that STD_NAMED_PACKAGES is superfluous. Do we run integration/install tests with the built deb?17:14
smoseryes.17:14
smoserand yeah, i sgree with std_named_packages being superflous.17:15
blackboxswok, yeah so we could drop STD_NAMED_PACKAGES I guess as our install test should cover that aspect17:15
blackboxsw+1  will work on that17:15
blackboxswas part of this small PR17:15
blackboxsw(pull request017:15
smoseri guess the only value it has right now...17:16
smoseris that you get a nicer error message17:16
smoserin bddeb says17:16
smoserDo not know how to translate pypi "17:16
smoser                                    "dependency %r to a known package"17:16
smoserwhere if you didnt have that , you wouldjust get a fail later . but maybe that is obvious enough17:17
smoser https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32305918:31
smoserrharper, ^18:31
=== sambetts is now known as sambetts|afk
blackboxswJust posted a near trivial up for "make deb".  Some cleanups in packages/bddeb.21:22
=== rangerpb is now known as rangerpbzzzz

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