[00:26] smoser: thanks! that's exactly what I was considering. what are those key words with & in front of them? I've never seen that nomenclature [00:26] eg: write_launch_info [00:26] ahh, it's some kind of labels [00:28] ohh, this is nifty [00:30] smoser: what's the significance of 'sm_misc'? I can't find any reference to that in cloud-init's docs [01:34] nevermind, that was too obvious :) [01:59] ananke: they're called 'anchors' [01:59] sm_misc means nothing, just a namesapce. [01:59] it is hard to search for [13:46] smoser: thanks for the hints. I've been able to use similar approach and get it working. I do have one question: why are those labels/anchors sometimes referred as '*something' and sometimes as 'something'? [13:48] I'll try to read more about anchors & aliases, perhaps I'm missing something obvious [13:59] ananke: always need the & to refer to it. [13:59] err... sorry. the * to refer to it, the & to name it. [14:01] fwiw, 'sm_misc' is just 'smoser misc' [15:47] smoser: yeah, my 'too obvious' comment was related to figuring out what sm_misc stood for :) took me too long to figure that out. [15:48] smoser: as to the alias reference, I was just confused by some of the nomenclature where I saw the same things appear twice. eg: - [sh, -xc, *write_exe, write_apt_go_fast, apt-go-fast, *apt_go_fast] [15:49] I have a hard time figuring out how this maps out exactly, what is 'apt-go-fast' doing there as a list item [15:51] ananke: That's a `sh` thing. *write_exe is the command_string, write_apt_go_fast is the command_name, and then everything else (apt-go-fast, *apt_go_fast) are arguments to command_string. [15:52] ananke: (Those names come from the dash man page, I didn't just know them off the top of my head :p https://linux.die.net/man/1/dash) [15:52] The command name throws me almost every time. [15:54] ahh, thanks. the naming convention was throwing me off, and made me question what I thought was a YAML reference and what wasn't [15:58] on an unrelated note, is there a way to access the name of the cloud provider from within the user-data config? I'd like to have some conditional logic for when a given recipe is executed against 'nocloud' platform [15:59] I'm already writing the recipe as a jinja template [15:59] yeah, sh command thing is a pain. [16:00] with sh -c 'shell commands blob here' [16:00] the *next* argument will be the "command name". [16:00] if you don't give it one, '$*' and '$1' and the like aren't going to work as expected (they'll be off by one) [16:01] so i try to give it one that would make some sense in a 'ps' [16:01] other times you'll see people use '--' or '-' ... but those seem no more descriptive to me [16:01] maybe 'this-is-argument-zero-just-ignore-it' [16:06] ahh, that's good to know. thank you [17:15] lunch [17:55] back [19:27] hello, i'm alive; i'll be writing some patches / fix some of my prs [19:28] saving the world one PR at a time :) [19:55] cloning freebsd and freebsd-ports [19:56] at the same time. [19:56] my computer is unimpressed [20:12] so, import distro patches: https://github.com/canonical/cloud-init/pull/161 [20:13] rebase https://github.com/canonical/cloud-init/pull/53 and throw out the integration test. @skipUnlessFreebsd stays, however. in case it might be needed later. [20:18] soooooooooooooo… has anyone had any time to give my thoughts over at https://hackmd.io/3-YBj1t9TAeKhmfLBQUjXQ?view [20:38] the silence is deafening 😜 [20:44] meena: I left some comments on your hackmd doc, and reviewed your PR [20:46] uninstalled DejaVu and now my emoji are displayed now [20:52] rharper: i'm not sure i understand this: https://github.com/canonical/cloud-init/pull/53#pullrequestreview-340801051 [20:52] ah [20:53] Hey all, I'm running Cloud-init 18.5 from EPEL on a custom CentOS 7 box in DigitalOcean, and I don't appear to have access to the network interface information. [20:53] I'd expect it to be at ds.meta_data.interfaces or similar, but that key doesn't even exist [20:53] (but it does exist for an Ubuntu server) [20:53] Any ideas what might be causing this? [20:56] ProfFalken: Are they both using the same datasource? (`cloud-init status --long` will tell you the DS in use.) [20:58] ProfFalken: and `cloud-init query --all` will show all the instance metadata obtained. `cloud-init query --format '{{ds.meta_data.keys()}}'` will show all keys present by datasource's scraped metadata. [21:01] rharper: More fun with networking https://github.com/canonical/cloud-init/pull/162 [21:02] ProfFalken: from https://github.com/canonical/cloud-init/blob/master/cloudinit/sources/DataSourceDigitalOcean.py#L68L74 it looks to me like it attempts to pull that metadata content if present regardless of distribution type. [21:02] blackboxsw: If they aren't using the same data source, that doesn't matter. :) [21:03] right. good pt [21:03] This should get us to "clean" ifcfg-*" files, i.e. only options understood on the given distro RHEL or SUSE get written to the files, it solves the BOOTPROTO handling bug, and gets the SUSE ifcfg-* files closer to what they should look like for bonding, vlan and bridge configs [21:04] Odd_Bloke: also, if it didn't exist, and they were actually using the DO datasource, network_config would have died horribly: raise Exception("Unable to get meta-data from server....") [21:04] robjo: thanks [21:04] After we get this through I'll come back with a proposal for route writing and then DNS handling after that [21:04] Odd_Bloke / blackboxsw: sorry, got dumped out there for a minute, anyway, it looks like it's because I'm running my own custom images, not ones provided by DO, because a DO CentOS box is running the DO datasource [21:05] I'm talking to them now, if they manage to fix it then I'll let you know, but I'm going to assume it's a DO issue, not a Cloud-init one. Thanks for the pointers :) [21:05] rharper: fixed [21:06] meena: excellent [21:07] yeah ProfFalken, I think Odd_Bloke was coming to that conclusion per his suggestion about status --long. Your custom images should probably derive from latest DO CentOS images, or you could alternately try adding a /etc/cloud/cloud.cfg.d/99-mandate-digitalocean-datasource.cfg file which would provide "datasource_list: [DigitalOcean]" [21:07] that was cloud-init would default to DigitalOcean on your custom images (if you were rolling your own for digital ocean specifically) [21:07] I *think( [21:08] blackboxsw: oh, that's a neat trick, I'll have a look at that, thanks. And yes, we are rolling our own for DO (and will be for other cloud providers as well) - we need a specific disk layout amongst other things, so this could be awesome if it works, I'll try it now... [21:12] ProfFalken: generally cloud-init should be able to detect the right datasource, so you shouldn't have to 'pin' a specific one for each image you create. So something else may be going on there (check your /var/log/cloud-init.log and /run/cloud/ds-identify.log to see why detection of DigitalOcean datasource didn't work for cloudinit) [21:14] I'm being told it's something to do with the way DO have their networking configured, I'm trying to get more details now... [21:15] +1. may end up being a cloud-init bug/feature then [21:16] interestingly, curl http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address returns the expected data [21:17] so it's when I'm trying to use the YAML for Cloud-Config, or querying via the CLI that it's not being seen [21:22] ProfFalken: The cloud-config and `query` command use cloud-init's cached state. [21:22] So that suggests to me that it isn't using the DO datasource, so cloud-init never goes to fetch the DO-specific configuration (which is then, of course, not present in cloud-init's cache). [21:23] apparently the "solution" is to use a bash-script rather than the YAML, which makes the config more complicated, but if it works... :( [21:23] ah, ok [21:23] I don;t believe we expose the datasource network_config in the instance data; further; in insttance metadata that we persist, the datasource must have a 'network_json' value [21:24] rharper: The assertion is that it works on Ubuntu but not on CentOS. And it's under the meta_data key, so I think that's whatever the datasource wants to put in there? [21:24] well, Ubuntu vs Centos almost always works out to cloud-init version differences [21:24] (i.e. I believe that's DO network configuration, not v1 or v2 YAML) [21:26] Odd_Bloke: FWIW, DO appear to be in agreement with you [21:26] Odd_Bloke: I guess what I was getting at (which may not be ProfFalken issue) is we currently don't consitently persist network metadata from platforms in a consistent place; which would be a nice feature improvement to the instance-metadata.json [21:26] rharper: Agreed. [21:26] I'm trying a switch over to using bash instead of using cloud-config, I'll see how it goes [21:27] ProfFalken: If it's working on Ubuntu but not on CentOS, I don't believe you should have to switch, but if you'd prefer to stick with DO's advice then I'm happy to defer. [21:27] (AFAICT, the DO datasource hasn't changed since 18.5, which was the version you're using on CentOS, I believe?) [21:29] Odd_Bloke: https://github.com/canonical/cloud-init/pull/53 ; I'm happy with this branch, it has a "Request changes" from you; could you take a peek and see if you're happy as well ? [21:29] Sure thing. [21:30] Odd_Bloke: I'll give it a go and see what happens, but there does seem to be something "not quite right" on the DO side of things here [21:31] * rharper grumbles about "vendor-data" [21:41] meena: Sorry, one last request on #53. [21:42] Odd_Bloke: fair enough [21:44] Odd_Bloke: done [21:51] Thank you! [21:57] i've also re-reviewed goneri's netbsd branch, maybe someone with more python / cloudinit experience might wanna rein in my review [21:58] Odd_Bloke / blackboxsw: The bash-script approach has got me up and running again, thanks again for all your help, I'll take it up with DO and see if they can get it sorted on their end! :) [22:01] always good approach… [22:02] * meena has spent about a year or more to get FreeBSD running on Hetzner [22:06] somebody pls merge all my patches [22:07] This pull request can be automatically merged by project collaborators [22:10] anyway, bed time. === tds9 is now known as tds