/srv/irclogs.ubuntu.com/2020/01/07/#cloud-init.txt

powersjananke, https://github.com/hashicorp/packer/issues/263900:02
powersjworkaround in the last comment00:02
anankepowersj: indeed, that's exactly what I found earlier today and used in my implementation00:03
powersjthere's also this one https://www.packer.io/docs/other/debugging.html#issues-installing-ubuntu-packages00:03
anankenot as clean as I'd like, but it does give one ability to set a timeout if things go south00:03
anankemy eventual goal is to use gitlab CI to kick off an EC2 instance, deploy packer on it with cloud-init, then use packer and cloud-init to build an AMI based on a vanilla one + our add-ons00:06
anankeso I'm trying to debug why a very basic set of runcmd directives do not appear to be working. I've gone as far as cleaning out everything from a basic user data and using the example section from https://cloudinit.readthedocs.io/en/latest/topics/examples.html00:33
anankecloud-init analyze show indicates that it should have been executed: |`->config-runcmd ran successfully @17.71300s +00.00100s00:34
anankeyet the log file shows this: cloud-init.log:2020-01-07 00:27:04,770 - cc_runcmd.py[DEBUG]: Skipping module named runcmd, no 'runcmd' key in configuration00:34
powersjananke, common thing to do is to validate your YAML to ensure the syntax is good00:38
anankesorry, had to deal with a small emergency00:59
anankepowersj: YAML seems to be correct. multipass accepts it, and the running instance has said YAML in /var/lib/cloud/instances/test/user-data.txt01:01
anankehttp://dpaste.com/28XMSTQ shows the input YAML and the resulting YAML01:03
anankeI also tried running it explicitly such as:01:05
ananke$ sudo cloud-init single --name runcmd --frequency always01:05
anankethe CLI output appears without any issues: Cloud-init v. 19.3-41-gc4735dd3-0ubuntu1~18.04.1 running 'single' at Tue, 07 Jan 2020 01:04:43 +0000. Up 2283.14 seconds.01:06
anankebut the log still has: 2020-01-07 01:04:43,096 - cc_runcmd.py[DEBUG]: Skipping module named runcmd, no 'runcmd' key in configuration01:06
anankethis is output of tail -f in /var/log after said execution: http://dpaste.com/2H1NDZN01:07
=== hjensas|afk is now known as hjensas
anankepowersj: well, color me surprised. after testing the yaml with cloud-init devel schema I learned that the YAML was actually broken. seems double quotes were removed from one of the runcmd items, which meant the http:// URL was breaking YAML13:04
anankenow the question is, what removed said quotes. cloud-init or multipass. seems they were removed on one line, but not on another, wtf13:05
anankeso it appears to be due to yaml-cpp used by multipass, https://github.com/canonical/multipass/issues/109714:02
Odd_BlokeHuh, weird.14:16
Odd_BlokeLet me go and chat to the multipass folks and see if we can (in the long-term) improve that.14:16
meenaOdd_Bloke: hello, good morning14:36
Odd_Blokeo/15:31
anankek, I think I've given up. there seems to be no way to quote things with multipass for runcmd to function correctly. semi-related, I am surprised that cloud-init doesn't have a 'fetch file from url' module15:47
Odd_BlokeYou can do includes, let me find the docs.15:47
Odd_Blokeananke: https://cloudinit.readthedocs.io/en/latest/topics/format.html#include-file15:48
anankeOdd_Bloke: that appears to be only for fetching its own configs, not some random data15:49
Odd_BlokeOh, in that case I don't think I understand what you're looking for, could you expand?15:49
anankeyes, I'm trying to fetch a binary from URL, since it's not available in repos as a package. my hope was to use wget/curl, but that's mangled with the existing multipass problems15:51
blackboxswananke: some more complex runcmd examples (could use sh -xc "something" ) or single quote around the outside of the curl etc https://cloudinit.readthedocs.io/en/latest/topics/examples.html#run-commands-on-first-boot and https://www.digitalocean.com/community/questions/help-with-cloud-init-syntax-for-runcmd15:54
anankeblackboxsw: doesn't work, because yaml-cpp used by multipass mangles that. see https://github.com/canonical/multipass/issues/109715:55
anankeit's a bit ironic, considering cloud-init's documentation recommends multipass as means for validating YAML :) things were going too well for me with multipass & cloud-init, figures I'd have to run into something eventually15:57
roberto-sanchezHello guys, got a question, I'll try to make it short: can I format and mount an N number of EBS raw volumes (may be 1, may be 20, externally defined) with cloud-init? As in: it would need to check for unforrmatted disks (lsblk, fdisk, or parted), and if found, format them with mkfs.ext4 and mount them to /data[N] (/data01, /data02 and so on). If16:16
roberto-sanchezsomeone reads this and can help me, thank you.16:16
roberto-sanchezI know I can do this in the final stage, my question was thinking of the fs_setup and disk_setup modules.16:16
rharperroberto-sanchez: yes, those are the right modules16:17
roberto-sanchezbut how can I get it to iterate on the unformatted disks? That's what I don't get.16:17
roberto-sanchezand to dynamically act on the N amount of volumes, so it makes N amount of dirs (data01, data02).16:18
roberto-sanchezand then to mount them.16:18
rharperoh I understand, an instance may launch with variable mount of volumes but you want a consistent process16:20
rharperthose modules for now, require direct mapping in the config, it supports some abstraction (ephemeral0, 1, 2) and it will look up the name, but you really want a pattern matching ...16:20
roberto-sanchezright, sorry for my poor explanation, you got it clearly16:21
Odd_Blokeananke: Yeah, it's frustrating!16:22
roberto-sanchezso this is better resolved by standard bash scripting then, @rharper?16:22
blackboxswananke: hrm nice issue will peek a bit today to see if I can reproduce the issue today16:25
anankeblackboxsw: you can see some more attempts here: https://paste.ofcode.org/6vQAzp2LncyVRuh98Gf6qq16:28
rharperroberto-sanchez: likely;  we don't currently have support for a syntax that would pattern match N devices by some attribute; which is the first part.  if you know the number ahead of time, it's possible to generate a cloud-config using disk_setup + fs_setup and mount config to do what you're wanting to do; for now, it's likely more portable to write a program to do it and you can execute it early via bootcmd: or later in boot via run_cmd cloud-config16:38
roberto-sanchezthank you very much for your help and time rharper, logging off; have a nice day everyone!16:39
meenaOdd_Bloke: have you had any time to look at cloudinit/net?17:01
Odd_Blokemeena: Not yet, I'm afraid!17:03
usrdevhey all! curious, is it intended behavior that at reboot that cloud-init would reject/refuse to see particular partitions sizes and resize the boot partition?17:27
blackboxswlooks like i's that time again. +15 :)17:30
blackboxsw#startmeeting Cloud-init bi-weekly status17:30
meetingologyMeeting started Tue Jan  7 17:30:28 2020 UTC.  The chair is blackboxsw. Information about MeetBot at http://wiki.ubuntu.com/meetingology.17:30
meetingologyAvailable commands: action commands idea info link nick17:30
blackboxsw#chair Odd_Bloke17:30
meetingologyCurrent chairs: Odd_Bloke blackboxsw17:30
blackboxsw#chair rharper17:30
meetingologyCurrent chairs: Odd_Bloke blackboxsw rharper17:30
blackboxswWelcome to the first cloud-init community status meeting of 2020. cloud-init upstream uses this meeting as a platform for community updates, feature/bug discussions, and an opportunity to get some extra input on current development.17:31
Odd_Blokeusrdev: I'm not 100% sure from that description, could you file a bug using the link in the topic and attach the output of `cloud-init collect-logs` on an affected instance?17:31
blackboxswWe generally have this meeting ever 2 weeks (outside of intermittent holidays)... You can always find the next scheduled meeting in the topic of this channel17:31
blackboxswLet17:31
blackboxswLet17:31
blackboxswLet's schedule the next meeting now as well17:32
blackboxswAny objections to Jan 21 ?17:32
=== blackboxsw changed the topic of #cloud-init to: cloud-init pull-requests https://git.io/JeVed | Meeting minutes: https://goo.gl/mrHdaj | Next status meeting January 21 17:15 UTC | 19.4 (Dec 17) | 20.1 DROP py2.7 (Jan 2020) | https://bugs.launchpad.net/cloud-init/+filebug
robjoLook I'm not late ;)17:33
blackboxswok topic set for next meeting17:33
blackboxswnope, just me robjo :) welcome to the party17:33
blackboxswas always previous meeting minutes are here.17:33
blackboxsw#link https://cloud-init.github.io/status-2019-12-10.html#status-2019-12-1017:33
blackboxswtopics for this round: Feel free to interject/suggest other topics at any time. Our typical format is the following: Previous Actions, Recent Changes, In-progress Development, Community Charter, Upcoming Meetings, Office Hours (~30 mins).17:34
robjoThe move to Tuesday creates a conflict for me for the last 15 minutes of the meeting. Generally I don't think that's an issue as we are often done in less than 1 hour, just pointing out that usually I have to leave 15 minutes early17:34
robjonot today ;)17:34
blackboxsw+1 robjo. We'll try to keep it snappy :) and if others have conflicts we can certainly touch on shifting the schedule a bit. We generally have a conflict at 1 hr before this meeting, which is the only reason it isn't 1 hr earlier17:36
blackboxsw#topic Previous Actions17:36
blackboxswlast round: rharper to confirm https://github.com/canonical/cloud-init/pull/42 can land. COMPLETED17:37
blackboxswaction2:  upstream core-devs to decide about whether a PR can land if any upstream dev still has 'requested changes'17:37
blackboxswOdd_Bloke: started writing up a spec/procedure for PR review and he is currently working on adding a documentation addition PR to http://cloudinit.readthedocs.io that will describe the workflow for a PR to get from proposed -> merged.17:38
blackboxswthat PR should likely be up this week for review if folks are watching our review queue17:39
blackboxsw#link https://github.com/cloud-init/cloud-init/pulls17:39
blackboxswNo other actions from the previous meeting in December.17:39
blackboxsw#topic Recent Changes17:39
blackboxswrecent commits that made it into tip: found via git log --since 12-10-201917:40
blackboxswlet's see if I get throttled for spam17:41
blackboxsw    - freebsd: fix create_group() cmd (#146) [Gonéri Le Bouder]17:41
blackboxsw    - doc: make apt_update example consistent (#154)17:41
blackboxsw    - doc: add modules page toc with links (#153) (LP: #1852456)17:41
blackboxsw    - Add support for the amazon variant in cloud.cfg.tmpl (#119)17:41
blackboxsw      [Frederick Lefebvre]17:41
ubot5Launchpad bug 1852456 in cloud-init "doc: list of modules is no longer present" [Medium,Triaged] https://launchpad.net/bugs/185245617:41
blackboxswheh17:41
blackboxsw    - freebsd: fix create_group() cmd (#146) [Gonéri Le Bouder]17:41
blackboxsw10:41     - doc: make apt_update example consistent (#154)17:41
blackboxsw10:41     - doc: add modules page toc with links (#153) (LP: #1852456)17:41
blackboxsw10:41     - Add support for the amazon variant in cloud.cfg.tmpl (#119)17:41
blackboxsw10:41       [Frederick Lefebvre]17:41
blackboxsw10:41     - ci: remove Python 2.7 from CI runs (#137)17:41
blackboxsw10:41     - modules: drop cc_snap_config config module (#134)17:41
blackboxsw10:41     - migrate-lp-user-to-github: ensure Launchpad repo exists (#136)17:41
blackboxsw10:41     - docs: add initial troubleshooting to FAQ (#104) [Joshua Powers]17:41
blackboxsw10:41     - doc: update cc_set_hostname frequency and descrip (#109)17:41
blackboxsw10:41       [Joshua Powers] (LP: #1827021)17:41
ubot5Launchpad bug 1827021 in cloud-init "SSH Documentation should mention "Host Key"" [Medium,Triaged] https://launchpad.net/bugs/182702117:41
blackboxsw    - ci: emit names of tests run in Travis (#120)17:41
blackboxsw10:41     - Release 19.4 (LP: #1856761)17:41
ubot5Launchpad bug 1856761 in cloud-init "Release 19.4" [Undecided,Fix released] https://launchpad.net/bugs/185676117:41
blackboxsw10:41     - rbxcloud: fix dsname in RbxCloud [Adam Dobrawy] (LP: #1855196)17:41
blackboxsw10:41     - tests: Add tests for value of dsname in datasources [Adam Dobrawy]17:41
blackboxsw10:41     - apport: Add RbxCloud ds [Adam Dobrawy]17:41
blackboxsw10:41     - docs: Updating index of datasources [Adam Dobrawy]17:41
ubot5Launchpad bug 1855196 in cloud-init "RBXCloud has no dsname defined, so datasource cannot be properly detected." [Low,Triaged] https://launchpad.net/bugs/185519617:41
blackboxsw10:41     - docs: Fix anchor of datasource_rbx [Adam Dobrawy]17:41
blackboxsw10:41     - settings: Add RbxCloud [Adam Dobrawy]17:41
blackboxsw10:41     - doc: specify _ over - in cloud config modules17:41
blackboxsw10:41       [Joshua Powers] (LP: #1293254)17:41
ubot5Launchpad bug 1293254 in cloud-init "style guide on dashes vs underscores in cloud-init" [Low,Fix released] https://launchpad.net/bugs/129325417:41
blackboxsw   - tools: Detect python to use via env in migrate-lp-user-to-github17:42
blackboxsw      [Adam Dobrawy]17:42
blackboxsw    - Partially revert "fix unlocking method on FreeBSD" (#116)17:42
blackboxsw    - tests: mock uid when running as root (#113)17:42
blackboxsw      [Joshua Powers] (LP: #1856096)17:42
blackboxsw    - cloudinit/netinfo: remove unused getgateway (#111)17:42
blackboxsw    - docs: clear up apt config sections (#107) [Joshua Powers] (LP: #1832823)17:42
ubot5Launchpad bug 1856096 in cloud-init "unittest failure when running tests as root: no such file or dir: 'ud'" [High,Fix released] https://launchpad.net/bugs/185609617:42
blackboxsw    - doc: add kernel command line option to user data (#105)17:42
blackboxsw      [Joshua Powers] (LP: #1846524)17:42
ubot5Launchpad bug 1832823 in cloud-init "docs: confusing heading "Add apt repositories"" [Low,Fix released] https://launchpad.net/bugs/183282317:42
ubot5Launchpad bug 1846524 in cloud-init "docs: cloud-init user-data docs should mention kernel cmdline options" [Wishlist,Fix released] https://launchpad.net/bugs/184652417:42
blackboxsw    - config/cloud.cfg.d: update README [Joshua Powers] (LP: #1855006)17:42
blackboxsw    - azure: avoid re-running cloud-init when instance-id is byte-swapped17:42
blackboxsw      (#84) [AOhassan]17:42
blackboxsw    - fix unlocking method on FreeBSD [Igor Galić] (LP: #1854594)17:42
blackboxsw    - debian: add reference to the manpages [Joshua Powers]17:42
blackboxsw    - ds_identify: if /sys is not available use dmidecode (#42)17:42
blackboxsw      [Igor Galić] (LP: #1852442)17:42
ubot5Launchpad bug 1855006 in cloud-init "config/cloud.cfg.d/README says "All files" rather than "*.cfg"" [Low,Fix released] https://launchpad.net/bugs/185500617:42
blackboxsw    - docs: add cloud-id manpage [Joshua Powers]17:42
blackboxsw    - docs: add cloud-init-per manpage [Joshua Powers]17:42
ubot5Launchpad bug 1854594 in cloud-init "lock passwd implemented wrong on FreeBSD" [Medium,Fix released] https://launchpad.net/bugs/185459417:42
blackboxsw    - docs: add cloud-init manpage [Joshua Powers]17:42
blackboxsw    - docs: add additional details to per-instance/once [Joshua Powers]17:42
blackboxsw    - Merge pull request #96 from fred-lefebvre/master [Joshua Powers]17:42
blackboxsw    - Update doc-requirements.txt [Joshua Powers]17:42
ubot5Launchpad bug 1852442 in cloud-init "ds-identify uses the /sys filesystem which is linux specific and non-portable" [Undecided,Fix released] https://launchpad.net/bugs/185244217:42
blackboxsw    - doc-requirements: add missing dep [Joshua Powers]17:42
blackboxswOk that should do it.17:42
blackboxswmaybe best to just pastebin next time17:42
robjoyup17:43
blackboxswlots of doc changes as you can see. dropping python 2.7 automatic testing17:43
blackboxswsome additional FreeBSD enablement work landed too (thanks Goneri && meena )17:44
blackboxswtotal changelog since last meeting:17:44
blackboxsw#link https://paste.ubuntu.com/p/Cwnn3SbmWQ/17:44
blackboxswmuch better17:44
blackboxsw#topic In-progress Development17:44
blackboxswWe've dusted off our shoes and will get back into using our Trello board more frequently for the immediate updates for what we are currently working.17:45
blackboxswNew Year's resolution and all17:45
blackboxsw#link https://trello.com/b/hFtWKUn3/daily-cloud-init-curtin17:45
blackboxswexpect to see more cloud-init cards migrating through the lanes of the board. Expectation as well is that we'll drop the backlog and ideas lanes and keep the board a simple kanban of what is in progress, review and done17:46
blackboxswAlso note I'm going to drop the community charter lane and create bugs for each item, tagging them 'bitesize' so that quick drivebys of developers that want to contribute can search bugs for those straightforward tasks17:47
blackboxswthat said, some high level goals upstream is working:17:47
blackboxsw- cloud-init one-shot daemon work17:48
blackboxsw- cloud-init network hotplug handling17:48
blackboxsw - boot performance  improvements17:48
blackboxsw- github automation and tooling improvements for expedited reviews and process17:49
blackboxswI think that plus reviewing the PR active review queues will keep folks busy for the next 2 weeks :)17:50
blackboxswwe will likely be adding a cloud-init SRU into xenial, bionic, disco, eoan into the mix as well17:51
blackboxsw#topic Community Charter17:51
blackboxswSo generally I'd be pointing to the trello lane "Community low hanging fruit" but I hope to convert those cards to bugs today. So let's say community ongoing efforts fall into two camps"17:52
blackboxsw1. add json schema validation to missing cloudinit/config/cc_*py modules.  ( I think there are about 45 remaining modules that need json schema for syntax validation)17:53
blackboxsw2. doc scrub and update for datasources in read the docs17:53
blackboxswAll of these items can easily be worked in parallel, which is why they are a good set of tasks for the greater community17:54
blackboxswExpect to find them by searching cloud-init bugs for bitesize tag17:55
robjoWith bugs remaining in launchpad, would it be a good idea to have things like the schema validation not as bugs but issues in GitHub?17:55
robjothat would make them more visible IMHO17:55
robjoand those are not really bugs nor is it pressing17:55
blackboxsw#link https://bugs.launchpad.net/cloud-init/?field.tag=bitesize17:56
blackboxswrobjo: good suggestion.  I think we were trying to avoid the confusion of having two places for bugs (launchpad bugs and github issues) That is a good point though, and maybe it's worth a mailing list discussion to get others to weight in.17:57
Odd_BlokeI would be -1 on enabling issues, we would spend our entire lives telling people to report in Launchpad instead.17:58
Odd_BlokeI totally understand wanting to separate "bugs" and "development tasks", though.17:59
Odd_BlokeBut I don't think we have a _great_ way of doing that which doesn't end up with a confusing experience for bug reporters.18:00
robjoTrue that people will equate issues in GitHub with bugs and thus file problems there rather than launchpad, it's a two edged sword18:00
blackboxswright, I think designation is there. We could also add a link to community charter bugs to the top-level README.md for the github project. Just so there is a close breadcrumb in github to get to those items18:00
Odd_BlokeOur plan is to assess how this is working in a month or two, so if it's not working well then we can figure something else out.18:01
blackboxswI think the designation of "community development tasks" is there by using bitesize tag or some equivalent18:01
blackboxsw#ACTION bbsw seed initial community charter bitesize bugs18:02
meetingologyACTION: bbsw seed initial community charter bitesize bugs18:02
blackboxsw#topic Office Hours (next ~30 mins)18:02
robjoWell, "community development tasks" is a bit mis-leading, after all the core team should be part of the "community" right?18:02
robjoSo everything is really a  "community development tasks", just that some things are easier than others ;)18:03
blackboxswrobjo: yes absolutely. right... I've seen some projects use 'goodfirstbug' or something like that  too18:03
blackboxswjust something to reduce the barrier to involvement for anyone wanting to contribute18:04
blackboxswand yes, core team should be accountable to work on some of those community charter tasks when time permits18:05
robjoYes, I think it is important to label the "easy" stuff to help people find a place to get started18:05
blackboxswso that hopefully next cloud-init summit we can set a charter for something else18:05
robjojust based on experience there are a lot of people that are sensitive to wording and we don't really want to get into the bikeshedding that comes along with such situations18:06
blackboxswfor those reading, office hours is a time of open and unstructured discussion. core cloud-init devs will have eyes on the channel to field questions, concerns, feature or bug discussions. Participate at will. In the absence of any ongoing discussions, upstream will groom/review the active review queue @  https://git.io/JeVed |18:07
Odd_BlokeHonestly losing my mind over this bug: https://bugs.launchpad.net/cloud-init/+bug/185861518:09
ubot5Ubuntu bug 1858615 in cloud-init "Fail to boot when NoCloud datasource is included" [Undecided,New]18:09
Odd_BlokeThe board reboots if you use dmidecode!18:09
Odd_Blokesmoser: As you said, that's a regression.  Do you think it follows that the fix should be in cloud-init?18:10
Odd_BlokeBecause I don't know how you deal with something that broken from where we are in the stack. :/18:10
Odd_Bloke(Unless we think this is enough evidence that we can't reliably use dmidecode on aarch64, then I guess it is on us to stop doing that. :( )18:10
robjoThis was probably in the e-mail by rharper I have not yet read, but I'll ask anyway ;)18:10
robjoI think I had some pending merge proposals in launchpad and patches, did these "magically" make their way into GitHub? DO I need to sort out where hings were?18:11
smoseri've heard "board reboots if you use dmidecode" before.18:11
smoserand maybe even cloud-init skipped calling dmidecode on aarch64 to avoid that.18:12
smoserbut that is sheer non-sense18:12
Odd_BlokeVery glad that boards like this are going to be in the walls of every building in 5 years. ;)18:12
smoserumm..... fix your hardware ?18:12
blackboxswother dmidecode issues on other hardware here too https://bugs.launchpad.net/qemu/+bug/124328718:13
ubot5Ubuntu bug 1243287 in QEMU "[KVM/QEMU][ARM][SAUCY] fails to boot cloud-image due to host kvm fail" [Undecided,Fix released]18:13
smoserits more forgivable because dmidecode is priviledged but i swear that all it does is *read* /dev/mem18:13
blackboxswrobjo: for your pending merge proposals we'd like to see you propose against github if possible. Looking for a run of ./tools/migrate-lp-user-to-github robjo <your_GITHUB_USERNAME> to get your github user included as a CLA signer18:16
blackboxswthen we have Conributor License Agreement accountability and can start merging those branches on the github side18:17
robjoYesh I haven't migrated to the GitHub repo.... even in 2020 the 24 hour/day limitation remains, darn it ;)18:17
robjoI'll get at least my migration to GitHub done this week, possibly even this afternoon18:17
blackboxswheh, absolutely, and actually I mistyped your migrate cmd:  ./tools/migrate-lp-user-to-github rjschwei <YOUR_GITHUB_USERNAME>18:18
blackboxswok think that about wraps the meeting for today. Happy new year folks! Thanks for dropping in!18:39
blackboxsw#endmeeting18:39
meetingologyMeeting ended Tue Jan  7 18:39:55 2020 UTC.18:39
meetingologyMinutes:        http://ubottu.com/meetingology/logs/cloud-init/2020/cloud-init.2020-01-07-17.30.moin.txt18:39
meenasmoser: didn't we have an actual dmidecode fix that would be a better candidate for causing this? given how much care we have taken that my code never gets executed on Linux19:43
smosermeena: yeah, i incorrectly blamed you i think19:46
smoserb19:46
smoserbut on such a system ds-identify would probably run dmidecode19:47
meenadoes that System have /sys/class?19:47
meenathen, no19:47
meenawell, rather: then, no, it shouldn't19:48
meena        # if `/sys/class/dmi/id` exists, but not the object we're looking for,19:50
meena        # do *not* fallback to dmidecode!19:50
meena        return19:50
meenawe should ask the person if that path exists19:56
anarcathello!20:45
Odd_BlokeHi!20:45
anarcati'm trying to figure out if cloud-init is a good fit for improving our install processes here20:46
anarcatwe have an heterogenous environment, with machines distributed across "cloud" (Hetzner) and baremetal hosts, in different locations, usually without local network authority/trust20:47
anarcatwe have a common trunk of commands we run (by hand!!) on each machine when we set it up, and a set of hosting-specific setup procedures, of course20:48
anarcati'm thinking the common set might be done better by cloud-init than trying to write my own installer20:48
anarcati also looked at FAI, to give you an idea20:48
anarcatand i'm wondering if I shouldn't just write Ansible stuff instead20:48
Odd_BlokeHow do the bare metal hosts get provisioned?20:49
blackboxswIs this fai? https://fai-project.org/20:50
anarcatblackboxsw: yes20:50
anarcatOdd_Bloke: blood, sweat and tears20:50
anarcatit depends.20:50
anarcaton Hetzner "robot" (bare metal) it's https://help.torproject.org/tsa/howto/new-machine-hetzner-robot/20:51
anarcatit's horrendous20:51
anarcatcloud is https://help.torproject.org/tsa/howto/new-machine-hetzner-cloud/20:51
anarcatand the common trunk is in https://help.torproject.org/tsa/howto/new-machine/20:51
anarcatmy MVP is to replace the common trunk20:51
Odd_Blokeanarcat: Are you looking to configure Puppet as part of this, or remove Puppet entirely?20:53
anarcatOdd_Bloke: we keep puppet20:53
blackboxswmost of your https://help.torproject.org/tsa/howto/new-machine/  look like they could be replaced with existing cloud-config modules (puppet support, hostname setting package installation etc20:54
Odd_BlokeOK, cool.20:54
Odd_BlokeI figured, but just in case.20:54
anarcatblackboxsw: yeah, that's what i gathered as well20:54
anarcatblackboxsw: how about the partitionning stuff in https://help.torproject.org/tsa/howto/new-machine-hetzner-robot/ ?20:54
anarcatdoes cloud-init support LUKS and raid?20:54
anarcatand lvm? and btrfs and zfs and weirdofs? :)20:54
anarcatthe only compromise i'd be ready to do on puppet would be to run ansible to bootstrap puppet20:55
anarcatwe have too much puppet stuff written to switch away20:55
meenaOdd_Bloke: https://github.com/canonical/cloud-init/pull/143 merge merge merge20:55
Odd_BlokeYeah, I totally understand!20:55
blackboxswanarcat: some basic disk formatting and config https://cloudinit.readthedocs.io/en/latest/topics/modules.html#disk-setup20:56
Odd_Blokemeena: done done done20:56
meenaanarcat: if luks had documentation, we could consider supporting it20:57
blackboxswWith MAAS maas.io the curtin project also handles bare metal disk formatting and provisioning  and hands the configured machine over to cloud-init20:57
blackboxswanarcat: ^20:57
Odd_BlokeMAAS isn't really practical for Hetzner though?20:57
blackboxswgood pt.20:58
anarcatblackboxsw: this doesn't seem to say which filesystem types are supported...20:58
anarcati must say i find the documentation a bit confusing :/20:59
anarcatmeena: luks is definitely documented... i am not sure what you mean20:59
anarcati mean its documentation isn't great either20:59
anarcatbut it's documented20:59
Odd_BlokeSo I don't know specifics of LUKS and raid off the top of my head.21:00
anarcatmaas looks something like FAI that assume you control DHCP and have a PXE server, not our case21:00
anarcatright21:00
anarcatcloud-init is, after all, ... er... cloud :p21:00
anarcatRAID is abstracted away21:00
meenahttps://dev.glitch.social/@hirojin/10338217838199156621:00
anarcatmeena: heh21:01
anarcatmeena: then i think you meant "good" documentation :p21:01
blackboxswanarcat:  here are a couple of other contextual examples for disk setup filesystem type etc: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#create-partitions-and-filesystems  and  https://cloudinit.readthedocs.io/en/latest/topics/examples.html#create-partitions-and-filesystems21:01
anarcatmost documentation sucks, to be honest :p21:01
meenaanarcat: does that answer your question21:01
Odd_BlokeBut it has fairly decent support for multiple filesystems, and partitioning21:01
anarcatOdd_Bloke: yeah, i saw those thanks21:02
anarcatmeena: i guess it does21:02
meenaapparently not. go read some openbsd documentation21:02
anarcatmeena: sorry, say again?21:03
anarcatmeena: did you just RTFM me?21:03
* anarcat confused21:03
meenaalso, luks vs luks2 feels like a php function bad, use this new php function21:04
meenaanarcat: no, i meant just for comparison21:04
meenaopenbsd docs are really good21:04
anarcatfrom here on, you can assume i have read other documentation than the cryptsetup manpage21:04
anarcatmeena: actually, i find the FreeBSD docs much better than openbsd :p21:05
anarcatbut i agree openbsd has good docs :)21:05
Odd_Blokeanarcat: So I think cloud-init can do a chunk of what you want natively.21:05
anarcatOdd_Bloke: right :)21:05
anarcatit doesn't seem reasonable to expect it to do funky disk partitionning though21:05
Odd_BlokeAnd when it comes down to it, you can pass shell scripts as additional configuration.21:05
anarcatright21:05
Odd_BlokeSo hopefully it lets you structure some of the stuff, and only have to have scripting for the Complicated Bits.21:06
anarcatmaybe i could reuse FAI's setup-storage thing to do my funky stuff21:06
anarcati created those monstrosities already https://gitweb.torproject.org/admin/tsa-misc.git/tree/installer21:06
anarcatso maybe those could be hooked up21:06
meenaanarcat: yeah, like, you can read man make in freebsd top to bottom and actually understand it, and you can read gnu's make manual, and not understand anything21:07
anarcatbsd make is simpler than gnu make, though21:07
anarcatbut yeah, the info system might have been a mistake21:07
Odd_BlokeOh, I just recite the four software freedoms three times while thinking about a GNU make option, and the help text for it just enters my head.21:08
anarcatOdd_Bloke: that's surprisingly disturbing21:09
Odd_BlokeIs that not how it works for everyone else?21:09
anarcatno21:09
anarcati start by using make21:09
anarcatthen end up writing a shell script in make21:09
anarcatthen realize what the fuck am i doing21:09
anarcatand rewrite it in python21:09
meenai have never once successfully read anything in info21:09
Odd_Blokei always yell about variable assignment for a while21:09
anarcatgod that's insane21:09
Odd_Blokedefinitely some pacing up and down21:09
anarcatoh, i have another actual question :)21:10
anarcatso it seems cloud-init is designed to be automatically hooked up in cloud images21:10
meenai used to use make before i knew puppet, cuz it's idempotent!21:11
anarcatso it's kind of pre-installed or something... e.g. on the youtube video in the frontpage, you just copy-paste the config in a text field when you create an amazon instance21:11
Odd_BlokeYep, that's how it's expected to be installed.21:11
anarcatbut i'm a weirdo that hate clouds and love the sun21:11
anarcatso i'm bare bones21:11
anarcatif i'm lucky, i have a decent debian install to start from21:11
anarcathow does that work from there?21:11
anarcatapt install cloud-init?21:11
anarcatthen call cloud-init do-magic?21:11
Odd_BlokeThat's a good question.  We would _generally_ expect cloud-init to be included in the image mastering (or customisation) process, and cloud-init is generally invoked by systemd units in a few phases.21:13
Odd_BlokeI'm not 100% sure what happens when you install it on a system without it, because there are no such Ubuntu systems and I work on Ubuntu. :p21:13
anarcatuh!21:14
Odd_BlokeBut I see no reason why it wouldn't work, off the top of my head.21:14
anarcatso an Ubuntu desktop comes with cloud-init pre-installed?21:14
Odd_BlokeOh no, I meant servers, sorry.21:14
blackboxswanarcat: ubuntu cloud-images all come with cloud-init installed.21:14
anarcathow do you pass the config in that context? https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html ?21:15
anarcatblackboxsw: yeah i figured as much, but i meant more generically21:15
anarcatassume that i'm building a cloud21:15
anarcatcan cloud-init be used to setup the cloud? :)21:15
anarcatmaybe i'm just picking the wrong hammer here, that would be fine too :)21:15
Odd_Blokeanarcat: So the NoCloud data source looks for a CD drive/ISO with a particular label attached to the system, and reads data off of it.21:16
meenawhat *is* the cloud?21:16
* blackboxsw just tested in a debian stretch (9) lxc that didn't have cloud-init apt-get install cloud-init (0.7.9 waaay old) worked fine and ran automatically on reboot21:16
anarcatmeena: other people's computers21:16
Odd_BlokeThat data is the stuff that on, for example, EC2 would be fetched from the metadata service.21:16
anarcatOdd_Bloke: a *CD* drive?21:17
anarcatlike the plastic coasters you put your beer on? :)21:17
Odd_BlokeA virtual one!21:17
anarcatyuck!21:17
anarcatit must be all sticky! ;)21:17
anarcatokay, got it21:17
Odd_Bloke:)21:17
anarcatcan i get away with not doing that? :)21:17
Odd_BlokeThings like hostname, network configuration, and the user-data/custom data that you would type into a box.21:17
anarcatlike fetch over https://i-trust-this-domain-because-i-love-dnssec.com?21:17
Odd_BlokeThat's a good question, I believe you can.21:18
anarcatis that the "nocloud" data source?21:19
meenahttps://github.com/canonical/cloud-init/pull/144 merge merge merge21:19
Odd_BlokeThat would be the nocloud-net data source.21:19
rharperNo cloud also reads from /var/lib/cloud/seed/nocloud-net/{user-data,meta-data,network-config}21:19
rharperor from any filesystem with the label 'cidata'21:19
Odd_Blokeanarcat: So if you're going to be installing cloud-init yourself, you could consider having a simple script which populates /var/lib/cloud/seed/nocloud-net/... from https://its-not-paranoia-if-theyre-really-out-to-get.you/ before cloud-init runs.21:22
blackboxswrobjo: https://github.com/canonical/cloud-init/pull/158 will land when CI passes thanks21:23
Odd_BlokeOr you could write the appropriate configuration to /etc/cloud/cloud.cfg.d/... to point at your server.21:23
anarcati see21:24
anarcatyou can hook datasources in /etc/cloud?21:24
blackboxswanarcat: datasources can be set with something like this:21:25
blackboxswroot@dev-x:~# cat /etc/cloud/cloud.cfg.d/90_dpkg.cfg21:25
blackboxsw# to update this file, run dpkg-reconfigure cloud-init21:25
blackboxswdatasource_list: [ ConfigDrive, NoCloud, OpenNebula, DigitalOcean, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, SmartOS, Bigstep, Scaleway, AliYun, Ec2, CloudStack, Exoscale, None ]21:25
Odd_Blokeanarcat: Yeah, so you would just hard-code the specific datasource you want, and the config to kick it off.21:25
blackboxswif your image provides just one datasource type in the list, cloud-init will default to use that datasource. otherwise ds-identify script will try detecting the datasource21:25
Odd_BlokeThat long list is intended for images which will run across multiple platforms; cloud-init performs local-only discovery to find which of those data sources are applicable, and then uses that one.21:26
anarcatokay21:27
anarcati don't quite understand the details, but it seems i'll be able to do the magic i need21:27
anarcatdo i need to reboot for cloud-init to do its stuff, or can i run it interactively?21:27
Odd_BlokeI expect you can run it interactively (and depending on what the units do on installation, may have to do something to stop it happening :p), but a reboot might give you a more consistent experience with other cloud-init users.21:28
blackboxswanarcat: right and you can optionally provide other specific datasource config params with a /etc/cloud/cloud.cfg.d file that looks like  https://paste.ubuntu.com/p/kD4SgnMm7J/21:30
blackboxswI *think* though I haven't played with overriding NoCloud config in a while.(just looked over the ds_cfg reading in cloudinit/sources/DataSourceNoCloud.py21:31
blackboxswand yes you *could* run it directly without reboot during development with sudo cloud-init init --local; cloud-init init; sudo cloud-init modules --mode=config; sudo cloud-init modules --mode=final;21:33
anarcathow do you remember all that stuff :)21:34
anarcatthanks!21:34
blackboxswit's what the systemd units/jobs do for each cloud-init boot stage per https://cloudinit.readthedocs.io/en/latest/topics/boot.html21:34
blackboxswanarcat: I don't remember it. I fgrep -r cloud-init /lib/systemd/ | grep Exec21:34
blackboxswthat told me the individual cloud-init commands that are run by systemd during boot :)21:35
blackboxswfgrep -ir to save swap space in my head21:35
anarcataweome21:35
anarcatyou guys rock21:35
Odd_Blokerharper: I'd be interested to hear your thoughts on the LUKS/RAID storage configuration anarcat discussed above.21:37
blackboxswbtw anarcat if you are creating your own debian image, I'd recommend building/getting a more recent version of cloud-init than 0.7.9 it's about 4 years old.21:37
blackboxswubuntu 16.04 (Xenial) and later is currently running cloud-inig 19.3 (released late in 2019)21:38
anarcatversions in debian: https://tracker.debian.org/pkg/cloud-init21:39
blackboxswbuster & bullseye look good21:39
anarcatblackboxsw: yeah, don't worry, we're on stable and up for new machines, so 18.3 at least21:39
blackboxsw+121:39
anarcati'm trying to avoid building images, because i don't always control the initial setup21:39
anarcati am trying to avoid building an installer21:39
anarcatbuilding images mean writing an installer21:39
anarcatbuilding an image is like installing debian21:40
anarcati wish we would just converge21:40
rharperOdd_Bloke: right, anarcat : there is limited support in cloud-init for filesystem creation and partitioning;  for advanced storage; I would point toward  curtin, https://curtin.readthedocs.io/en/latest/index.html ; which has extensive support for creating customizing storage, include, bcache, raids, luks, zfs, filesystems, lvm, etc;21:41
anarcatcurtin, intersting thanks21:42
anarcatnot in debian though21:43
rharperit's an installer, and under the MAAS product, it runs curtin from cloud-init to install ubuntu or other OSes to physical (or virtual) systems;  its all command line based, so it can be incorporated into whatever workflow you have;  it's ubuntu centric, so on the debian path, there are some known issues where it doesn't quite match debian (like kernel package names and othee defaults)21:43
rharperno21:44
anarcatso MAAS does the basic PXE bootstrap, then calls cloud-init which calls curt?21:46
blackboxswMAAS does PXE bootstrap to call curtin which pre-provisions, then calls cloud-init21:46
anarcatoic21:48
rharperblackboxsw: not quite, PXE boot into a live image, which runs cloud-init, pulling cloud-config from MAAS, which invokes curtin with config provided by maas;21:55
rharperMAAS boots the cloud image ephemerally; and uses that environment to run curtin to deploy any target OS to the platform, curtin customizes the storage layout, unpacks the payload, then runs a "post-install" we call curthooks to enable additional packages, configurations, bootloader etc;21:57
anarcatsuch a mess21:58
rharperbare metal provisioning is overkill for customizing images; for sure.22:00
rharperthat said, re-using curtin to customize storage may be helpful depending on how much you want to do youself vs generating config for curtin to consume;22:01
meenacan we get cloud-init or something else sensible, like pxe for installing android phones?22:08
blackboxswharper: doesn't curtin's post-install step pass reporting #cloud-config to properly configure the node to talk to maas etc. Or is that earlier?22:11
* blackboxsw was thinkimg curthooks: handle_cloudconfig function22:12
blackboxswbut maybe that is only for during ephemeral provisioning  process as you stated22:13
rharperblackboxsw: right, so we configure the baremetal target machine to use cloud-init as well, it will contact maas for further configuration; this first boot on baremetal is just like a cloud instance; first time booting, finds  a datasource, fetches config etc22:15
rharperwe emit cloud-config to set the datasource to the MAAS controller with creds to talk to MAAS, etc22:15

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