[06:42] How can I update cloud-init in AWS? [08:58] https://github.com/canonical/cloud-init/pull/42#discussion_r353283759 [08:58] duh. [11:23] i've started a patch here: https://github.com/canonical/cloud-init/pull/621 hope i can get it into the next releaseā€¦ along with my /other patch/ [11:26] this needs a better title than the title of the first commit [13:22] cxdeviit: cloud-init generally comes from your distro vendor as part of the images you launch, and is generally updated via standard upgrade mechanisms or via new distro images being generated. What distro are you using, and what's the motivation for needing cloud-init upgraded? [14:17] One of my AWS instance has Amazon Linux 1 and Cloud-init version 0.7.6 which doesn't seem to support devel analyze etc , that's where I am stuck. If there was a way to patch it . [14:23] cxdeviit: Aha, right. I would be hesitant to recommend upgrading cloud-init in any way other than distro packages: that could break your machine in ways that are difficult to recover from. So I don't know if you have a good path to a newer cloud-init. That said, if you're looking to use `analyze`, it has a `--infile` parameter, so you could pull your log files to a newer cloud-init installation [14:23] (locally or in a different distro instance in the cloud) and perform your analysis that way. [14:25] Aha, will try that. Another issue is regarding requests dependency of urllib3 to be 1.21.1 , not sure if pip/python is messing here [14:33] Odd_Bloke: Hi. Re: Mac Addreses, as Netplan files are YAML also then they should also have all-numeric MAC addresses quoted, right? [14:41] minimal: Presumably, yeah. [14:42] so then I've found a bug in the netplan renderer - when I fixed an all-numeric MAC address in a testcase then it failed due to the macaddress in the generated netconf file having no quotes [14:43] Can you pastebin the error? [14:53] Odd_Bloke: https://gist.github.com/dermotbradley/bb7353c00bf505bbf2f1ce0eb2b56c17 [14:54] its the 5th MAC address [15:13] minimal: That's test_render_output_supports_both_grat_arp_spelling? (I'm heading into a meeting, will look more after.) [15:14] Odd_Bloke: yupe, that's the one [15:54] smoser: that sure is one way to say, focus on the other PR [15:54] meena: ? sorry... didnt' mean to be a pita. [16:00] oh. funny. [16:00] wow. total fail [16:01] meena: updated that comment https://aci-github.cisco.com/atom/atomix/pull/1269 [16:04] smoser, nah, it's cool. what you're doing is useful and important [16:15] smoser, I'm getting address not found for that link [16:15] man. i totally cannot paste [16:16] https://github.com/canonical/cloud-init/pull/622 [16:16] yeah, that other is my iternal github [16:32] minimal: So I think that MAC address _doesn't_ need quoting because it has values that exclude it from being a timestamp (99 > 59, in the seconds and hour fields): https://paste.ubuntu.com/p/tddYNXWrbk/ [16:37] Odd_Bloke: hmm, the YAML "timestamp" is actually whether something is treated as a base 60 number and according to https://yaml.org/type/int.html the definition for this is |[-+]?[1-9][0-9_]*(:[0-5]?[0-9])+ [16:40] so you're right, I'll have to rewrite my PR docs change to be even more specific about when quoting is required ;-) [16:57] minimal: OK, right, I was trying to figure out why I couldn't find reference to it in the spec; didn't occur to me that it was a base 60 number! Good find, and I agree that more specificity is needed. [16:58] (At least we know that anyone running cloud-init in ancient Sumeria will experience no problems. :p) [17:05] Odd_Bloke: search YAML docs to find that ref gave me a headache, lol [17:25] Hi, we would like to land this PR (https://github.com/canonical/cloud-init/pull/614) before the code cutoff for the next SRU, Can someone help taking a look at it? [17:34] Odd_Bloke: PR created for the MAC address docs. Any chance you could review it and PR 618 as well? [17:35] for PR 618 the question of how to test it is still open - /etc/shadow is normally only readable by root user, so guess it would need to be mocked [18:48] wait, wait wait [18:48] YAML, which is a superset of JSON knows integers, but JSON does not [18:49] that's hilarious, i didn't realise how lossy the conversion between the two could be [18:56] meena: with JSON strings are quoted so there's no room for confusion, with YAML you don't have to quote (most) strings and magically the app reading the YAML works out if a value is a number or a string... [18:58] except in this case in YAML a MAC value of 11:22:33:44:55:66 (without quotes) will be treated as a Base 60 number whereas a value of 11:22:33:44:55:6a (without quotes) will be treated as a string [19:07] does anyone on here from Canonical look after cloud-utils? Am confused that https://launchpad.net/cloud-utils has 0.31 dated 10/12/2018 as latest release but that https://github.com/canonical/cloud-utils/ has no 0.31 and has 0.30 dated 10/07/2019 (i.e. dated far newer than 0.31 on the other site) [19:09] minimal: It's getting even better: the YAML 1.2 spec doesn't include base 60 (which is why I couldn't find it!) but PyYAML only supports YAML 1.1 which _does_. [19:10] minimal: any cloud-init's network config uses with YAML schema? (Also didn't notice mention of YAML version on netplan's website) [19:10] s/minimal/Odd_Bloke/ [19:11] We (implicitly) use YAML 1.1, because we use PyYAML. [19:12] Odd_Bloke: any idea on what I pointed out about cloud-utils above? [19:13] minimal, yeah, we've seen this issue in puppet / hiera [19:13] minimal: I believe the tag in GitHub was created on that much later date, but if you look at the commit it points to it's older. [19:14] (In fact, there are a whole bunch of version tags that were created on that same day, so that was presumably an import to GH?) [19:15] ok. I maintain the Alpine package for cloud-utils and 0.31 is downloaded from Launchpad........just wondered if I was using out of date code. Any idea if a 0.32 is going to happen any time soon? The last release has been out a while [19:17] I know some cloud-utils things have been happening, but I haven't kept on top of them. [19:19] for example in "master" there a growpart LVM commit from July that's obviously significant for cloud-init users [19:23] minimal: I'll look into it. [19:24] Thanks [19:24] heh smoser released 0.31 end of 2018 when he moved it to git [19:25] powersj: yeah found the 0.31 tag hidden on the 2nd (or 3rd?) Releases page in git. Have just downloaded from both Launchpad and Github and compared to verify both 0.31 files are identical [19:26] * meena quotes herself quoting someone else she heard saying it: release early release often [19:26] also: why y'all afraid of 1.0 [19:26] what's up? why the 0.? [19:26] meena: as its a prime number? They're scary! [19:35] you can skip primes [19:40] Every number is prime if you define division the right way: https://paste.ubuntu.com/p/rcHw2M5pVf/ [19:43] Odd_Bloke: na na na. that means we're then skipping all numbers, which brings us back to where we started [19:47] Odd_Bloke: for the Ansible/Jinja2 templates I'm using to create network-config-v2.yaml adding "| to_yaml" to the macaddress variables sorts the automagic YAML string quoting for me [19:57] OK, good, that's what I'm hoping will be the case for most generated YAML: the libraries will DTRT. And most networking YAML will be generated in some way, because it's handled by the platform (which launches many instances) rather than the user (who may only launch a few and not bother investing in automation). [19:57] That said, I wonder if YAML 1.2 libraries do the correct quoting for values which are strings in 1.2 but ints in 1.1. [19:58] To be honest I think YAML is trying to be too smart - they should have just required strings to always be quoted and been done with it [19:59] Agreed. [20:02] wait_for_physdevs_netcfg() is a terrible name for a function that's no longer in that class [20:02] but it looks generally useful [20:05] Odd_Bloke: your command about ".. include:", does this support including from another part of the same document? or only from a separate file? [20:05] s/command/comment/ [20:06] minimal: I think we'd need a separate file with just that snippet. [20:06] Which is perhaps overkill, but I also wouldn't be surprised if we find this info needs updating again in future. [20:06] So I could go either way. [20:10] I come bearing bad news: ruamel.yaml supports YAML 1.2, and `yaml.load(ruamel.yaml.dump({"x": "11:22:33:44:55:59"}))` gives `{'x': 8846009759}` (whereas dumping with PyYAML round-trips correctly). [20:14] where is ruamel.yaml used? A quick grep doesn't show in anywhere in cloud-init [20:14] It isn't, but it's a library that could be used to generate the networking YAML that is fed to cloud-init. [20:15] And as it is a YAML 1.2 library, it does not quote base60 ints properly (because in YAML 1.2 base60 ints aren't a thing, so their unquoted form is unambiguously a string). [20:16] This is in reference to "That said, I wonder if YAML 1.2 libraries do the correct quoting for values which are strings in 1.2 but ints in 1.1." [20:16] It describes itself as a YAML 1.2 loader/dumper, whereas you'd indicated earlier that network-config-v1.yaml and network-config-v2.yaml are YAML 1.1 [20:17] though I guess that's just because c-i uses PyYAML and not stated anywhere in the c-i "specification" for those YAML files [20:18] Yeah, that's the gap I'm worried about. [20:18] Until today, I hadn't really thought too much about YAML 1.1 vs 1.2, and I strongly suspect I'm not alone in that. [20:18] same applies to Netplan - did'nt see any YAML version mentioned there either [20:20] now you'll have the fun of determining what each of the DataSources vendors (AWS, GCE, etc) do and try and get them to agree on YAML 1.1, doh! [20:22] Practically speaking, if any of the large platforms could generate incorrect YAML in this way, we'd have heard about it, I think: this isn't a recently introduced "bug", we've always used PyYAML and therefore YAML 1.1. [20:22] (And they obviously get through a lot of MAC addresses. :p) [20:24] Time to hurriedly insert "These files are in YAML 1.1 format" into the docs in big flashing letters eh? ;-) (damn, Mozilla decommissioned the HTML blink tag) [20:24] I'm sure we can bring it back with some custom JS. [20:25] But yeah, I think we do want to document this. [20:25] I'm guessing a all-numeric MAC address where all of the component part is 00-59 is statistically unusual [20:26] Yeah, and it is possible they might be using a prefix (that's a MAC address thing, right, vendor prefixes?) that excludes all of their MACs from triggering this. [20:32] minimal: https://bugs.launchpad.net/netplan/+bug/1901084 [20:32] Ubuntu bug 1901084 in netplan "netplan should specify the version of YAML that it takes as input" [Undecided,New] [20:35] I'd already noticed that the page https://netplan.io/reference/ has at least 1 unquoted MAC address that needs to be quoted [20:36] Odd_Bloke: If you search online for OUI each hardware vendor that registers get a prefix to use for network cards they manufacture. Likewise a MAC beginning "52:54" is KVM (from memory). There's a OUI.txt file online managed by IETF that is regularily updated [20:39] in my case as I'm testing on KVM I'm using made up MACs within the KVM prefix and happened to use all numeric addresses. [20:40] The other PR I raised a few days ago about user-data YAML for user settings - I'd noticed that expirydate was being misinterpreted without quotes and what was being put into the field in /etc/shadow was incorrect [20:41] so potentially the impact is on more than just MAC addresses [20:58] https://github.com/canonical/cloud-init/pull/617#issuecomment-714758289 ds-identify is a trash fire [21:08] maybe reading disk labels doesn't work for bsd [22:05] Odd_Bloke: FYI https://en.wikipedia.org/wiki/Sexagesimal#YAML