[01:58] <brunobronosky> I discovered that installing cloud-init on an Raspberry Pi running Raspbian (RPi Debian) has a fatal flaw. It trows stuff into `/etc/apt/sources.list` this is inappropriate for this architecture. Where does the problem lie? I don't know who to report the bug to.
[02:11] <larsks> brunobronosky: how did you install it?
[02:11] <brunobronosky> apt-get
[02:12] <larsks> brunobronosky: there's a cloud-init package in raspbian? Or was this a third-party repository?
[02:12] <brunobronosky> 0.7.9 is in Raspbian.
[02:12] <brunobronosky> I don't think anyone has ever used it, but it comes straight from debian.
[02:13] <larsks> If the raspbian package is installed the wrong things in sources.list, I would call that a raspbian bug.
[02:13] <larsks> Raspbian bug reporting info: https://www.raspbian.org/RaspbianBugs
[02:16] <brunobronosky> yeah, I found that, but it's the "Before You File a Bug" part that has me second guessing.
[02:17] <brunobronosky> I'm eventually going to ask them to have cloud-init installed by default. I'm trying not to be an annoyance to the maintainer.
[02:19] <larsks> What are you doing with cloud-init on the Pi?
[02:24] <brunobronosky> larsks https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=206034&sid=e154adc1892a1a0d3c32fda0a94f640c
[02:25] <brunobronosky> actually, I guess my followup to the thread is more to the point. https://www.raspberrypi.org/forums/viewtopic.php?p=1276583#p1276583
[02:25]  * larsks continues to read...
[02:27] <larsks> That's an interesting application.
[02:27] <brunobronosky> I thought so.
[02:27] <larsks> What was the particular feature that was undocumented until 17.2?
[02:28] <brunobronosky> but, now I'm doubting my decision to use a Standard™ vs. just roll my own systemd oneshot service.
[02:29] <brunobronosky> using `datasource: NoCloud: seedfrom: /path/`
[02:30] <brunobronosky> Everything I was hearing was insisting that you had to use a volume labeled `cidata`.
[02:31] <larsks> Huh. Pretture sure even earlier versions documented how to preconfigure a filesystem with metadata.
[02:31] <larsks> But re: using cloud-init vs rolling your own: I guess it depends on what you're trying to do. I mean, cloud-init already has a bunch of modules to handle common system configuration tasks, which is maybe useful.
[02:32] <brunobronosky> Even on this IRC channel at first I said "I need to have {user,meta}-data read from the partition mounted at /boot" and I was being told to change the label to cidata.
[02:32] <larsks> On the other hand, if you have access to the sdcard to install cloud-init metadata, you also are able to make most of your configuration changes at that point.  Using something like qemu-user, you can even run Pi binaries and install packages, etc.
[02:33] <brunobronosky> O_o "and then tell the kernel to boot from the cidata volume instead of the boot volume? Eh. No."
[02:34] <brunobronosky> But using qemu is WAY beyond your average Windows using school teacher.
[02:35] <larsks> E,g, here are the docs for 0.7.9 that describe pre-seeding: https://git.launchpad.net/cloud-init/tree/doc/examples/seed/README?id=0.7.9
[02:36] <brunobronosky> (editing anything other than /boot is virtually impossible for Mac and Windows users)
[02:40] <larsks> That's a good point.
[02:40] <brunobronosky> Even that example you posted would have helped me. But sadly... http://cloudinit.readthedocs.io/en/latest/search.html?q=nocloud-net&check_keywords=yes&area=default
[02:44] <larsks> Have you (or are you going to) put together a demo image with cloud-init installed?
[02:49] <brunobronosky> Going to. Just as soon as I can get cloud-init to stop destroying apt.
[02:54] <brunobronosky> I'm going to add cloud-init to my fork of https://github.com/RPi-Distro/pi-gen/blob/dev/stage2/01-sys-tweaks/00-packages and publish a cloud-init userdata file that can be used to compile the Raspbian image on an EC2 instance. (Since it is virtually impossible to build on Mac or Windows) How meta is that?
[02:54] <larsks> brunobronosky: what sort of problems are you seeing?  Just install cloud-init on rasbpian stretch, it doesn't appear to have added anything erroneous to /etc/apt.
[02:55] <brunobronosky> Hmmm. For me it overwrites /etc/apt/sources.list
[02:56] <larsks> Upon installation? Or execution?  I just installed the package (apt install cloud-init) and my sources.list is unmodified.
[02:56] <brunobronosky> do `sudo cloud-init init --local`
[02:56] <larsks> So that would be "upon execution" :). Let me give it a try.
[02:58] <brunobronosky> Keep this handy ;-) https://github.com/RPi-Distro/pi-gen/blob/dev/stage0/00-configure-apt/files/sources.list
[02:58] <larsks> Still unmodified.
[02:58] <larsks> /var/log/cloud-init.log looks like http://termbin.com/mgcs
[02:59] <brunobronosky> Really! Hmm. Let me grab a fresh image. I've installed 17.2 from source on this one. (You probably just saved me from embarrassing myself (elsewhere))
[03:00] <larsks> brunobronosky: note that this is 0.7.9!
[03:00] <larsks> It's entirely possible 17.2 is doing something different.
[03:01] <brunobronosky> I'd rather look like a fool here than on Raspbian. I'm not trying to get any PRs accepted to cloud-init.
[03:01] <brunobronosky> (0.7.9 understood)
[03:16] <brunobronosky> larsks do you have apt-configure in your /etc/cloud/cloud.cfg
[03:17] <larsks> brunobronosky: looks like it...but it's in cloud_config_modules, so 'cloud-init init --local' wouldn't run it.
[03:19] <brunobronosky> once you reboot, it will fill your sources.list with "## Note, this file is written by cloud-init on first boot of an instance"...
[03:22] <larsks> Let me drop a seed file in place and see what happens.
[03:22] <brunobronosky> I'd love some help coming up with a sane minimal /etc/cloud/cloud.cfg for this.
[03:27] <larsks> I see what you mean.   It looks like the comments there tell you what to do to make it configure sources.list appropriately.
[03:27] <larsks> ("if you wish to make changes you can...")
[03:32] <larsks> brunobronosky: I have to take off for the night.  Good luck!
[03:34] <brunobronosky> thanks!
[03:35] <brunobronosky> I just don't like that the cloud.cfg by default is full of all kinds of things I don't understand and don't need.