=== shardy is now known as shardy_afk === shardy_afk is now known as shardy [11:11] hi [11:14] we are planning to provide a shared filesystem in our cloud, and the information how to mount is should be stored in the vendor data. but we want users to have more control over it, e.g. enable/disable mounting [11:14] is there a simple way to do this, or does it require an extension to cloud init itself? === asthasr_ is now known as asthasr [13:27] Be-El, who is "we" are you the cloud provider or the user? and what is the cloud ? [13:28] if cloud-init gets storage configuration that says to mount things, it will write those things into /etc/fstab. [13:28] user-data can be used to override any vendor-data provided. [13:28] 'we' are a group of several cloud providers working together and trying to provide a similar service to our users [13:29] the details for each site (e.g. filesystem, host names / ip address of fileservers) may and will vary [13:34] the cloud instances are all based on openstack, and using the package and mount modules works so far [13:35] so if the user wants to override the data you've provided they can provide 'mounts: []' [13:35] that should work, then they'll get none. user-data wins over vendor-data. [13:35] but I want to restrict the functionality to certain images (afaik there's no image metadata that can be accessed by cloudinit) and allow the user to disable it [13:36] so you want the vendor-data to only appear to certain images ? is that what you're saying ? [13:37] that would be my preferred solution [13:37] well, when i originally added vendor-data support on openstack i did so in a way that you could implement a python class on the host. [13:37] that class was given the instance-id and told to give vendor-data [13:38] the default class just read from the /etc/.../vendor_data.json [13:38] (this is from memory) [13:38] but then at some point openstack started ripping out things like that. so that extensible functionality might be gone now [13:40] I'm currently thinking about a helper script whose execution is triggered by runcmd in vendor-data [13:40] and the script checks for the existence of some touched file (-> user data) and skips the mount operation [13:40] script arguments will define the mount options etc. [13:41] doable, simple design, but feels wrong [13:42] well, if you want to provide different vendor-data to different instances based on some criteria, that was originally supported. [13:43] and i think that is what "would be [your] preferred solution". [13:45] so honestly that is what i would go for. [13:46] it looks like current openstack trunk has some mechanism to run a vendor-data service and have nova client plug into that. [13:46] i'm just looking at git logs [13:46] the clouds are all based on the newton release, and openstack version upgrades are not that easy... ;-) [13:47] heh [13:47] there's a vendordata_driver option, but it is marked as deprecated [13:47] well. 1f53bfcc7998f63f130a2cedaf15b41a4506c568 [13:47] is a good commit message [13:48] https://review.openstack.org/gitweb?p=openstack/nova.git;a=commitdiff;h=1f53bfcc7998f63f130a2cedaf15b41a4506c568 [13:48] "It is intended that this fix be backported to newton as well." [13:50] newton also has a mechanism for using external rest services instead of a simple file [13:51] not as easy as just providing the python class, but i'll have a closer look at it. thx for the hints [13:55] does cloud-init already use vendor-data.json and vendor-data2.json? [13:56] does not read vendor-data2.json only vendor-data.json [13:56] what is interesting to me is that they coudl have used the existing class functionality to implement the remote rest api stuff [13:56] and thus kept backward compatibility a [13:56] oh well [13:57] but i guess they wanted to be more strict on the extensibility portion [14:04] and backwards compatibility, data merging.... [14:07] blackboxsw, rharper i'm working on bug 1715128 [14:07] bug 1715128 in cloud-init (Ubuntu) "Crashes in convert_ec2_metadata_network_config on ScalingStack bos01 (ppc64el)" [Critical,Confirmed] https://launchpad.net/bugs/1715128 [14:07] Be-El, are you poking fun at me! [14:07] (its entirely acceptable) [14:08] i'm german, we don't know how to have fun [14:13] smoser: yeah; two things 1) we certainly should check that we have 'network' in the metadata dictionary safely 2) EC2Local runs before OpenStack datasource; that's generally a problem if local datasources are positively identified [14:13] for Azure, we confirm UUID; and I thought that EC2 in Artful was in strict mode, which should have forced the UUID check, no ? [14:17] rharper, well, yeah. [14:17] oh, right [14:17] well, even on non-intel, the system has a UUID, so unless they rolled unluckily and got ec2* for their UUID [14:24] https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330361 [14:25] rharper, systems only have uuid (from dmi) on intel [14:25] not sure what you were meaning [14:35] on intel, yes via dmi; in ppc64 though, they do set a uuid value from the hypervisor; they just don't send any product or other DMI related values (and it's not under the dmi path in sys) [14:36] that info won't identify it as OpenStack, but it can be used to check that it's not EC2 (which I think is the path you're taking w.r.t EC2Local); [14:36] as other platforms run in Local mode and hit network; I think we need to require the positive ID to run the local variant [14:40] well.. due to clones it can't identify "not ec2" [14:41] we could be more strict yes. but we are not, so that it generally still works but give the warning, so we can fix things later (on non-intel). [14:41] on intel, cloud-init would have disabled completely [14:44] do the clones report ec2 in UUID ? I didn't think any of them actually did that vs. just subclassing EC2 and providing something else to identify themselves [14:49] unknown clones is the concern. [14:49] as they do not identify themselves at all and rely upon the old default behavior of falling back to ec2 [14:50] ec2 in network mode though [14:50] if you said "uuid doesnt start with ec2, so exit", then they'd get no warning [15:29] smoser: rharper: can one of you respond to https://bugs.launchpad.net/cloud-init/+bug/1711963 Reporter is asking how to get vendor and user data working together. [15:29] Ubuntu bug 1711963 in cloud-init "unable to merge vendor-data and user-data" [Undecided,Incomplete] [15:36] this is wierd [15:36] 2017-09-07 06:03:25,838 - stages.py[INFO]: Skipping modules ['runcmd'] because they are not verified on distro 'ubuntu'. To run anyway, add them to 'unverified_modules' in config. [15:39] whoa [15:39] smoser: where's that from ? [15:45] that was in the log on https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1715128 [15:45] Ubuntu bug 1715128 in cloud-init (Ubuntu) "Crashes in convert_ec2_metadata_network_config on ScalingStack bos01 (ppc64el)" [Critical,Confirmed] [15:48] powersj: on that one maybe smoser; by my read there isn't anyway to "merge" keys from vendor data into user-data; it's an override situation only ; ie, if you set the same key in user-data; that's all you get; smoser do you expect that we could support a case where user-data wants to inspect/inherit vendor-data values ? [15:49] rharper: thx for looking - that's what I thought and tried to say in my response, so hopefully having someone else convey it [15:51] well it merges in some way. [15:51] powersj: I think you did; the submitter is right that "merging" config isn't clear about which sorts of configs get merged (and which dont) [15:51] it certainly *should* use the full merge support [15:52] I think the request is to merge conflicting keys between user-data and vendor-data; which I've always understand that to not be mergable w.r.t combining keys [15:52] that is, how would a user override vendor-data if it's always merged together ? [15:53] user-data always "wins". [15:54] right [15:54] in this case, I think the submitter wants to modify that [15:54] rharper, what is wierd in 'Skipping' above is that later in log [15:54] 2017-09-07 03:06:10,312 - helpers.py[DEBUG]: Running config-runcmd using lock () [15:55] smoser: I can't find any record of that "unverified" string in cloud-init ; where is that coming from ? [15:55] smoser: this is a proposed migration, right? so maybe it's being upgraded and rebooted ? [15:55] so same instance but different behavior due to reboot and upgrade ? [15:56] cloudinit/stages.py [15:56] if skipped: [15:56] LOG.info("Skipping modules %s because they are not verified " [15:56] "on distro '%s'. To run anyway, add them to " [15:56] "'unverified_modules' in config.", skipped, d_name) [15:56] i really can't come up with anything on that other than if they've added a cc_runcmd somewhere. [15:56] i dont know === shardy is now known as shardy_afk [15:57] commit cc9762a2d737ead386ffb9f067adc5e543224560 [15:57] Author: Chad Smith [15:57] Date: Tue Aug 22 20:06:20 2017 -0600 [15:57] schema cli: Add schema subcommand to cloud-init cli and cc_runcmd schema [15:57] that added the 'distros' tag to the module; possible they're on older artful image, booted, upgraded cloud-init, rebooted [15:57] and we don't handle that ? [15:58] reading backlog context now [15:58] smoser: AFAICT this is a separate issue (unrelated to ec2 local on non-intel) [15:58] we can file a separate bug for that I think [16:00] whoa, so if I add a distros attr to the module it requires some level of validation [16:00] ok looking at what we are doing there w/ the skip [16:00] strange as the module documentation claimed "all" was supported [16:01] (I think I also added a distros attr to cc_bootcmd too) [16:01] in a recent branch [16:02] blackboxsw, yeah, i didn't understand how 'all' was working [16:02] but it sure seems to be. otherwise runcmd would log that error everywhere. [16:07] yeah looks like we extrapolate mod.distros as worked_distros and check against the actual distro name. ok, so we need to expand 'all' to all known cloud init distros or define DISTROS_ALL = None [16:15] just filed #1715690 I'll get a branch together and I'm adding a unit test to https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330361 [16:16] https://bugs.launchpad.net/cloud-init/+bug/1715690 rather [16:16] Ubuntu bug 1715690 in cloud-init "Defining distros = 'all' in a module for documentation results in a module skip as 'all' doesn't match distro 'x'" [High,New] [16:21] ah. ok. so your chagne is new. [16:21] that is good. understood now. [16:21] smoser: yeah and it affects the existing bootcmd branch too. [16:22] too bad we do discovery on distro modules, I was thinking it would be nice to have a get_all_distro_names() method, but that'd be expensive as I need to find_modules and collect all the names [16:22] maybe that's an okay expense as we do it only once in stages [16:23] blackboxsw, i *think* runcmd is straight up busted then, right? [16:23] as in an integration test of: [16:23] runcmd: [16:23] - [touch, /run/foobar] [16:23] would show that failure [16:23] right? [16:23] yeah it'll skip it because it defines distros 'all' which doens't match actualy distro name [16:23] yeah I'll add an integration test [16:23] blackboxsw, thanks. [16:24] blackboxsw, so... on my networkign thing in ec2local [16:24] i was saying i wanted to raise NotImplemented [16:24] I like the branch, wanted a tiny unit test but yeah [16:24] but returning None is the same from the consumer's perspective [16:24] ie, if that property (its a @property) is None [16:24] then it is ignored [16:24] true, you mean from network_config [16:25] ? [16:25] so returning None on that (and logging HEY THIS IS BUSTED) [16:25] yes, network_config [16:25] so if we lgged fail on that and returned None (as it did not actually have it) then we'd be better off [16:25] but the issue with returning None is that it caches based on None [16:25] yes so network_config property in base could be smarter about 'network' KeyError and return None there [16:26] hm.. let me show you what i was thinking [16:26] smoser: where is the network-config cache check ? [16:27] was wondering about this http://pastebin.ubuntu.com/25484907/ [16:28] rharper: line 287 of DataSourceEc2.py if self._network_config is None [16:29] certainly checking post convert if the value is still none would be valid [16:31] but I guess I'm not getting the smoser is suggesting; I think it's reasonable for the EC2 local ds to crawl metadata, not find the 'network' key and raise NotImplemented; in stages, the _find_network_config would need a try: except NotImplemented and can log the NotImplemetnted exception (which ec2 could report that the metadata didn't have the 'network' key needed) [16:31] s/the smoser/what smoser; [16:32] http://paste.ubuntu.com/25484930/ [16:32] blackboxsw, ^ [16:32] None versus _unset ... not sure how you really are to do that. [16:32] but still want to cache the None result as work was done. [16:35] smoser: in landscape we did UNSET = objecT() [16:35] smoser: in landscape we did UNSET = object() [16:36] but yeah I get it [16:38] smoser: per rharper's comment, returning a None here on when we have an invalid datasource doesn't really cause cloudinit/stages.py to balk on the datasource, it proceeds with fallback nic right? [16:39] stages only cares if you have the attribute and assumes the network-config attr is valid [16:39] I think we still need a way to tell stages that the network-config may not be valid [16:46] right so it feels maybe like our best approach is for get_data() to return false then right? [16:46] ocessingrso we don't even get into the network_config p [16:46] so we don't even get into the network_config processing [16:48] well; whether or not we identify a datasource, and whether a datasource has network-config support are separate things that both need addressing [16:49] the latter has a bug w.r.t a datasource claiming it has network-config support (which may not be valid) and stages assuming the presence of the attribute as an indication that the configuration in the attr is valid; [16:52] doesn't testing the return value None from datasource.network_config tell us whether the config is valid or not? [16:53] in the case of None, we know there is no helpful valid content provided by the datasource so it can be ignored in that case [16:54] yes, you're right [16:54] I see that now in find_network_config [16:55] yeah per even the default dscfg = ('ds', None) [16:56] that works nicely with the attempted consuming of network metadata in smoser paste [16:57] to clarify for me: so if our ec2 local datasource is running in an openstack environment, get_data will still 'work' because it's a lookalike metadata service. but network_config would in this case not define network_config info. Won't the datasourceEc2Local still "match? [16:57] it'll just use fallback nic in this case [16:57] which is what we'd want for look-a-likes which may not implement network metadata [17:00] blackboxsw, i'd seen object() before too [17:00] I guess so, I wasn't sure if we'd want cloud-init to limp along using a sub-optimal datasource. [17:01] but i was afraid of that across un-pickling [17:01] smoser: fair point. /me can't wait to remove pickling [17:01] .... and break things in the process [17:01] it shouldl return None [17:01] network_config attr of None [17:01] means "this datasource has no network config" [17:02] which is what the base class has [17:02] yeah I think rharper and I are on the same page w/ that [17:02] and is what Ec2 had before it started to have that [17:02] then stages does the right thing [17:02] right [17:02] yeah. ok. [17:03] blackboxsw, so i'll commit the _unset thing ? [17:03] unless you have a better idea [17:03] so in a situation where Ec2 is run against openstack. get_data still 'works' and network_config returns None so LocalEc2 will still get detected or are you also leaving in the get_data check on Platform.AWS? [17:08] Ec2Local shouldn't run under non-intel openstack; https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330361 I think covers that; [17:09] blackboxsw, yes. still leaqving the local check for platform.aws [17:12] smoser: +1 on adding your pastebin to the existing patch, I only think network_md should be mandatory param to the convert_ function. and the change to accept network_md will probably affect unit tests http://pastebin.ubuntu.com/25485096/ [17:18] blackboxsw, right. i'll change it to take mandatory [17:18] and i have updated the test. [17:19] blackboxsw, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330361 [17:19] updated [17:19] grabbing [17:27] blackboxsw, i'm just going to grag stangatori's branch [17:28] sound fine ? just merge [17:28] smoser: +1 on that [17:29] we can sort long-term cards for consolidation of comon 'imc' logic into cloud-init's net functions in subsequent cycles [17:30] blackboxsw, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330242 [17:30] can you quick OK that ? i addressed your feedback. [17:30] approve and mark approved [17:31] smoser: approved [17:36] rharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/329811 [17:36] can you just mark 'approved' ? you 'Need Fixing'd and then approved in words, but not in changing your status [17:58] smoser: so... #1711963. legit bug? [18:01] at very least a bug on doc [18:01] smoser: ya, the doc could use an example [18:08] smoser: comments added here https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330361 +1 with the unit test [18:09] smoser: left it as approved assuming the changeset passes CI (I tested locally w/ tox -e py27( [18:14] blackboxsw, i'll grab your test. [18:15] thanks [18:24] blackboxsw, di dyou have a merge request that you wanted me to look at ? [18:25] for https://bugs.launchpad.net/cloud-init/+bug/1715690 i thought. [18:25] Ubuntu bug 1715690 in cloud-init "Defining distros = 'all' in a module for documentation results in a module skip as 'all' doesn't match distro 'x'" [High,New] [18:36] smoser: will put one up. I was sidetracked fiddling w/ unittests [18:37] I need about 20 mins [18:37] smoser: WDYT about a get_all_distros method in distros/__init__.py which calls importer.find_modules and returns a list of all discovered distro names supported [18:40] we'd only have to call that function once at line 823 of cloudinit.stages [18:41] I'll draw up a sample diff [18:41] w/out unit tests for feedback [18:43] smoser: done [18:43] side note, found a logic bug in stages [18:43] so for all modules we call distros.Distro.expand_osfamily [18:46] and we call expand_osfamilies(mod.osfamilies) and that'd raise a ValueError on undefined osfamilies. But an environment might have actually provided a pluggable Distro, which isn't tracked by expand_osfamilies. So they wouldn't actually be able to make use of that module [18:47] it's a corner case that impacts only non-std Distros which aren't already included in cloud-init/distros/OSFAMILIES [18:49] * blackboxsw really dislikes the magic of def fixup_module(mod, def_freq=PER_INSTANCE): [18:50] backwards compatibility [18:50] and originally crappy smoser code [18:50] make for crappy code [18:50] as it magically sets module attributes distros, osfamilies, frequency (due to the sideeffects & operations in stages.py) [18:50] hahaa [18:52] I'd much rather explicitly see osfamilies = [], distros = [], osfamilies = [] in all cc_*py . Then, at least it's more explicit in the module things that a module should care about defining [18:53] but yeah, not sure how that computes w/ backward compatibility [18:53] ok, for real, let me get a branch together. [19:13] blackboxsw, ... [19:13] if a: [19:13] print("this is fine") [19:13] elif b: [19:13] print('this is also fine") [19:13] else: [19:14] # i want to assert something here in a unit test... [19:14] what do i use .. ? [19:14] ah. maybe just raise assertionError [19:15] or just assert(something) [19:15] and it'll cause that assertion error to be raised in unit tests [19:15] I'm not sure that's what you meant [19:15] well, i just want the test to FAIL [19:16] i think [19:16] raise AssertionError("neither a nor b was true.") [19:18] I have seen that in unit tests before. it'll work [19:37] rharper, commented https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/330361 [19:37] please read. [19:38] basically.. .if we ds.network_config raises an exception, then cloud-init will generally fail. and such a failure will likely result in us seeing it. [19:39] i'm not entirelsy opposed to having convert_ec2_metadata_network_config try better to check and raise ValueError and then catching that one error and returning None and logging WARNING. [19:43] smoser: rharper a lot of our modules document that they are supported on distros: all. Do we want module docs to represent the actual distro names, or would 'all' suffice [19:43] now that I have a get_all_distros function we could make docs specify: ['ubuntu', 'gentoo', 'freebsd', 'debian', 'fedora', 'centos', 'sles', 'rhel', 'arch', 'opensuse'] [19:44] or just leave it at "distros: all" which could account for 3rd party distro modules added in another env [19:44] "it" being documentation on rtd [19:50] blackboxsw, i think 'all' should suffice [19:50] it means all distros supported by cloud-init [19:50] no ? [19:51] yes on all distros supported by cloud-init. And agreed, the generic 'all' feels better and doesn't preclude 3rd party distro addons if there were any [19:52] strange is we already have an integration test which exercises runcmd. [19:52] thrying to find out why that's not failing [19:52] hm. [19:55] blackboxsw: alternatively can we match any module if supported is 'all' ? [19:55] that would avoid a list expansion [20:03] rharper: smoser just pushed functional https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+ref/config-modules-allow-distros-all [20:03] it shows what I was thinking, I'm adding unit tests now [20:04] https://git.launchpad.net/~chad.smith/cloud-init/commit/?id=34297260006768be70904cecd2d66b2b5d97d2c4 [20:04] yeah rharper that agrees with your suggestion [20:04] kindof [20:05] actually it doesn't. heh. it expands if 'all' is listed [20:05] lemme see if we can avoid it [20:07] hah, maybe I'm reading this wrong, that Skipped log is only a log, it looks like we still actually run the module [20:08] stages.run_section doesn't do anything with the skipped modules it finds [20:08] it still blindly calls _run_modules(mostly_mods) [20:08] it doesn't pop the module off or anything [20:10] blackboxsw, that would explain integration test passing [20:10] and lowers the severity of this bug :) [20:10] yep indeed [20:10] :) [20:10] I was searching the logs of that bug you referenced to see if I can find a successfully ran runcmd too [20:10] rharper, what are you looking for on convert_ec2_... [20:11] it return None if it's not equivalent to fallback (ie, we have a subnet) [20:11] we should either have a subnet with dhcp, or a subnet with a static ip [20:11] otherwise, it's a busted network configuration [20:11] on the flip side of the "skipping " not really skipping, it also looks like forcing doesn't actually force the module to run either [20:11] blackboxsw: =/ [20:12] running unverified_modules: %s is just a log and has no bearing on whether the module is run [20:12] http://paste.ubuntu.com/25485882/ <-- [20:12] that has better validity checking. [20:13] i'll get one more check [20:13] man that's a lot of bulletproofing smoser [20:15] feels like it's leaning toward overkill, and that we would actually run into that ValueError or TypeError issue if we try to use the object as a dict [20:15] >>> a ='non-dict' [20:15] >>> a['interfaces'] [20:15] Traceback (most recent call last): [20:15] File "", line 1, in [20:15] TypeError: string indices must be integers, not str [20:15] >>> [20:15] I'm much more worried about the values and keys in the dictionary [20:15] why check isinstance dict everywhere and not just try to use the object and handle typeerrors instead [20:16] mac address may be mixed case, we might not have public-ipvX key; any case where we get back a network-config that doesn't apply dhcp or a static ip is going to result in uncaught badness; in which case it would be better to report busted ec2 network config and use fallback [20:16] note, this is for a ec2-clone path [20:18] heh, validated the case from the Skipping runcmd logs, I see it also runniing that runcmd log (and why our integration tests still pass) [20:18] 2017-09-07 06:03:26,068 - stages.py[DEBUG]: Running module runcmd () with frequency once-per-instance [20:18] updating the bug [20:19] blackboxsw, well, the individual checking gets you better error messages. is the only reason for that. [20:19] and KeyError being more vague [20:20] rharper, i dont necessarily agree that "better to report busted ec2 network config and use fallback" [20:20] because "reporting" means no one ever sees a problem because you "fixed" it for them. [20:20] that's fair [20:20] where as failing badly means you see errors [20:20] but see the bugs about non-intel identifying themselves in openstack for why to log and move forward [20:21] http://paste.ubuntu.com/25485922/ [20:21] and the bug we're fixing today that's "cloud-init" fault in artful on non-intel [20:21] rharper, wel... if we logged and moved forward there. [20:21] we'd have just kicked the can well down the path [20:21] and never known about the fact that these instances were now using the "mostly functional" ec2 datasource when it owuld have been better to use the openstack one [20:21] I know; there's no good answer if we're not going to go and fix it ourselves [20:22] which was the original design goal [20:22] the busted network config (And using fallback) can have a banner just like ds-identify did [20:23] well, one way or another we need to have this fixed today. the fix that is there irght now will solve the bug [20:23] and my today is running short [20:27] https://bugs.launchpad.net/cloud-init/+bug/1715738 filed [20:27] Ubuntu bug 1715738 in cloud-init "Cloud config modules are not skipped based on distro support" [Undecided,New] [20:27] I'm fine with a follow up [20:28] I'm+1 on your approach either way. will review what you have again smoser. I was just throwing peanuts at the testing if isdict, but not a true concern [20:28] if I work on this: https://bugs.launchpad.net/cloud-init/+bug/1708255 [20:28] Ubuntu bug 1708255 in cloud-init "empty or invalid network config dictionaries are not handled well" [Undecided,New] [20:28] that'll help [20:29] ok. [20:30] i'm going to add a unit test that trips the ValueError [20:30] and then push with that patch most recent above. [20:30] man though. [20:31] that really would just kick the can and we wouldnt even know about this problem [20:31] so maybe i convince myself to just leave it as it is [20:33] Good afternoon! Another question. I have put a script in /etc/cloud/scripts/per-boot (the pre-existing directory) while building an AMI. After standing up an EC2 instance based on this AMI, that script does not seem to run. Is there some config I have to set to make it happen? [20:39] asthasr, /var/lib/cloud/scripts/per-boot [20:39] oh. [20:39] what's the /etc one for? [20:40] the same thing as /etc/i/dont/know/why/you/have/that/directory [20:40] :) [20:40] oh, sorry, i misspoke. I'm actually putting them in /var/lib/cloud/scripts/per-instance. Long day :p [20:41] asthasr, the module 'scripts_per_instance' should run those [20:41] i'll do a quick test [20:42] my workflow is to use packer.io, which templates that script in, and then gives me an AMI. I then use terraform to build an instance based on that AMI [20:42] rharper, :-( [20:42] $ lxc init ubuntu-daily:xenial x2 [20:42] Creating x2 [20:42] my expectation would've been that the script runs and I see the resulting test file when I log into the new instance [20:43] $ mount-image-callback lxd:x2 mchroot /bin/bash [20:43] lxd:x2: no rootfs in /var/lib/lxd/containers/x2/rootfs. Not a container? [20:43] smoser: whoa [20:43] =( [20:43] i think the path now doesn't get created until 'start [20:43] boo [20:43] issue time [20:44] hrm, working for me on xenial [20:44] smoser: what lxd do you have ? [20:44] I'm on 2.0.10-0ubuntu1~16.04.2 [20:44] $ dpkg-query --show lxd [20:44] lxd 2.17-0ubuntu2 [20:45] i noticed it a while ago [20:45] i'll file an issue, but i dont have high hopes [20:45] well, it's pretty critical to our integration testing on lxd no ? [20:48] well, I'm dumb. It needs to be u+x or it won't run. [20:49] :) [20:49] asthasr: was there any log about it not being u+x ? [20:49] I think scripts-per are executed via cloud-init invoking subprocess on 'runparts' [20:50] run-parts; hopefully we caught some error there [20:50] rharper: not that I see. [20:51] saw, I should say; I didn't spot any errors. Unfortunately I already killed the instance. [20:51] if you recreate, would be good to get the cloud-init.log (and cloud-init-output.log) and file an issue; it'd be helpful to see an error in the logs for something like that I think [20:52] https://github.com/lxc/lxd/issues/3784 [20:52] rharper: Understood. Will try tomorrow. [20:53] rharper, we have a runparts function. does not use the utility [20:53] it does not log anything on non-executables [20:54] indeed [21:04] uploaded ubuntu/0.7.9-267-g922c3c5c-0ubuntu1 [21:16] smoser: are we SRUing that?