/srv/irclogs.ubuntu.com/2021/03/12/#cloud-init.txt

prologicStill trying to debug this VM01:35
prologicTrying to run my cloud-init user data manually (after rm -rf /var/lib/cloud and cloud-init clean) results in the same behavior, no userdata is run01:35
prologicI can see the userdata with the vmware-rpctool01:35
prologicit is syntactically correct YAML01:36
prologicthis is just weird01:36
prologicAnyone able to look at these logs?01:55
prologicNow I have tow VMs one with a failed cloud-init run and another with a successful one02:40
prologicNo changes whatsoever, just different VM name02:40
prologicanyone around?05:43
prologicsystemctl status cloud-init reports dead on the failed VM, "active" on the succcessful one05:54
prologicthis is totally nuts06:23
prologicbesides the failed cloud-init metdata crawler service06:23
prologicI cannot see any other obvious differences06:23
prologicor any obvious errors or failues in any cloud-init logs06:23
prologicthis is total nonsense06:23
johnsonshiI've created a small PR to fix a DataSourceAzure bug where the Azure http handler is not sleeping in between http retries. The PR is here: https://github.com/canonical/cloud-init/pull/84206:41
prologicman that's nice johnsonshi :)06:43
prologicI wish I could figure out this bug/issue I'm having and submit a PR to fix it !06:43
dam_Hi, I am new to cloud-init and I was able to create an image with a / and /home partitions with nosource using subiquity. I would like to do that with cloud-init directly if possible. There is "fs_setup" but for now I do not know how I can use it create an image with / and /home.08:07
meenadam_: how are you creating images?08:13
dam_From my understanding, cloud-init boots on base image and apply modification.08:15
dam_meena: With subiquity, I used ubuntu server iso.08:16
dam_meena: To use cloud-init directly I thought I could use ubuntu cloud image.08:17
meenadam_: you could ask in #ubuntu-server08:18
meenathere might be more folks awake there08:18
dam_Do I have to create an image myself?08:19
meenaI'm only a contributor, not one of the devs, and my main contributions are for FreeBSD08:19
meenadam_: i don't know, we've only recently gained the ability to resize LVM partitions, which to me would be the precondition to working with different partitions08:21
meenahttps://github.com/canonical/cloud-init/pull/72108:22
meenathe alternative is that you put your different partitions on different devices08:24
dam_Do you have an example of configuration file to put different partitions on different devices?08:55
meenadam_: 09:19 <meena> I'm only a contributor, not one of the devs, and my main contributions are for FreeBSD08:56
meenai haven't worked with Linux since the start of the first Lockdown08:56
dam_If I ask you to create a FreeBSD image with 2 partitions how will proceed?08:58
dam_will *you* proceed08:59
dam_Will you install it by hand?09:01
meenaright now, the automation of the installation of FreeBSD is a mess. you can script bsdinstall and bsdconfig, but usually what people do is to use zfs in these scenarios09:02
meenain that case /home is on its own dataset09:02
meenayou can increase the entire pool, for which we already have code in cloud-init09:03
meenabut that's like LVM but very different09:03
meenafrom what i gather, all Unices have very different storage management, and even between Linux distros the installers are very different09:05
meenaalso, in the past, I've only ever created images with packer09:07
meenaI've never worked with subiquity09:08
dam_My goal is to define a cloud-config that use "fs_setup" and other stuff to automatically create a VM that contains all I need.09:13
dam_The idea is to use the same cloud-config to create a VM based on Ubuntu, FreeBSD, Arch, whatever.09:16
dam_But, maybe this is not what cloud-init permits.09:17
meenaFreeBSD does not support fs_setup, so this https://github.com/canonical/cloud-init/blob/master/cloudinit/config/cc_disk_setup.py#L78 is a lie09:28
dam_What is the difference between focal-server-cloudimg-amd64-disk-kvm.img and focal-server-cloudimg-amd64.img?10:12
dam_With NoCloud datasource it is possible to specificy user-data and the example contains "password: xxx". Can this file contains all stanzas like the ones in https://cloudinit.readthedocs.io/en/latest/topics/examples.html or is it limited to specific ones?10:57
meenaNoCloud can have all the modules your config contains11:11
dam_I am confused then. When I use "focal-server-cloudimg-amd64.img" I have to specify "password: xxx" as in https://blog.dustinkirkland.com/2016/09/howto-launch-ubuntu-cloud-image-with.html not "users:…".11:20
meenaprobably because that's for the default user, and we still have a bunch of options that crowd the global namespace11:25
stevenmOdd_Bloke, hey only just seen your reply :)13:05
stevenmhttp://hackstack.org/x/blog/2014/08/17/openwrt-images-for-openstack/13:05
stevenmhttps://github.com/dtroyer/openwrt-packages/tree/master/rc.cloud13:05
stevenm"rc.cloud" seems to be another implementation of "cloud-init" but for OpenWRT13:05
stevenmas well as (as you also said) cloudbase-init13:05
stevenmso I guess if I'm working with a hypervisor (Proxmox VE) that supports configuring "cloud-init" strings on a per-VM basis... these would work regardless of "cloud-init"/"rc.cloud"/"cloudbase-init"/"etc..."13:06
stevenmperhaps it would be good for it to become a standard... rather than just a "defacto standard" (as I've often seen it referred to)... to stop any potential fracturing13:07
jadsh02I am using find and change permission of a file command under runcmd section but its not executing13:27
jadsh02"/usr/bin/find /var/log -type f -exec chmod g-w,o-wx {} +"13:32
Odd_Blokeprologic: Feel free to drop me a link to a log/tarball. :)14:23
Odd_Blokedam_: Did you figure out what you were trying to do, or are you still having issues?14:26
Odd_Blokestevenm: So we do have an ongoing strand of work to define a JSON schema for cloud-init's config format; perhaps that would meet some of what you're looking for?14:31
stevenmyeah that kind of thing14:33
stevenmbut I couldn't find any mention of such a thing - got a link?14:33
Odd_Blokehttps://bugs.launchpad.net/cloud-init/+bug/1917626 is the bug to actually publish it.14:34
ubot5Ubuntu bug 1917626 in cloud-init "Publish jsonschema with documention" [Undecided,Triaged]14:34
Odd_BlokeYou can use it to validate a config today with `cloud-init devel schema`.14:34
Odd_BlokeAnd you can get the full schema we generate internally for that with: python3 -c 'from cloudinit.config import schema; import json; print(json.dumps(schema.get_schema()))'14:37
Odd_Bloke(Which works with Python's jsonschema module at least: I don't think I can promise it's spec-compliant beyond that.)14:38
stevenmOdd_Bloke, part of what made me start this train of thought was this... https://cdimage.debian.org/cdimage/openstack/current/14:56
stevenmafaics those images have got absolutely nothing to do with openstack really14:56
stevenmbut OpenStack and EC2 and Amazon (as in the words) is all over them for a description14:57
stevenmwhen they're just (again... afaics) generic raw/qcow2 images meant for qemu/kvm usage - and happen to be 'cloud-init' compliant14:57
stevenmwhich apparently started due to Ubuntu's initial work with EC2?  apparently!?14:57
stevenmit's similar to when you're trying to set up 2 Factor Auth on something and it starts mentioning things like "Google Authenticator" at you - you translate that to RF6238 and know it'll work with many things actually :P14:58
stevenmthe language has got all confused14:58
stevenmthis especially is a confusing sentence "If your platform supports the EC2 style metadata server (which is contacted by cloud-init)"14:58
stevenmso is that saying "cloud-init" (the package) is an implementation of something which communicated in "EC2 style metadata" ?14:59
stevenmor is the "EC2 style metadata" a product of the cloud-init effort itself?!: d14:59
Odd_Blokestevenm: cloud-init started life as ec2-init, implemented in shell scripts; back when EC2 was the only cloud.15:08
Odd_Blokecloud-init fetches data from a variety of metadata sources, including the EC2 Instance MetaData Service (IMDS); it's common for clouds to provide an IMDS that behaves the same way, so that any software written to work on EC2 will also work on their platform.15:13
Odd_Bloke(This is part of where specifying cloud-init would fall down: we have to be bug-compatible with all the metadata sources with which we interact, else cloud-init won't work on those platforms.  If a cloud changes their platform in a way that breaks cloud-init, we can try and convince them to do something different (and given the number of cloud-init users, this does sometimes work), but ultimately we have15:17
Odd_Bloketo follow what they're doing to continue functioning on their platform; even if the spec says something else.)15:17
beantaxiOdd_Bloke: Have you ever read what Eric Raymond has written about creating ntpd?15:31
beantaxiIirc, early on they were getting killed by incoming data, because there would be a header specifying the version of the standard, and then what followed was, how-you-say, ah yes, not so compliant15:32
beantaxiAnd eventually they made a crucial decision: to completely ignore the header, completely ignore any claims the data made about itself, and simply infer them by inspecting the data15:33
beantaxiAnd now they're always right.15:34
beantaxi(and ntpd runs basically everywhere)15:55
beantaxiMy takeaway was that standards are great, but if you want Epic Adoption you better focus on the data that's actually out there ... and that data might not care about standards.15:55
beantaxifalcojr: I just added some quick questions on #475. If you cant look at them today no woories, just wanted to give a heads up. Thanks!16:16
stevenmOdd_Bloke, ok so when I see Proxmox VE (for example) has "cloud-init" support... and a config tab for "cloud-init" per each kvm/qemu VM that you can spin up... what we're actually talking about is how Proxmox have made a cloud-init-compatible IMDS?16:18
stevenmdoes the "cloud-init" project make an IMDS or just the thing inside the guest listening for an IMDS?16:18
stevenmbecause it kinda sounds like the closest things to a "reference" IMDS for cloud-init ready images... is actually still EC2?! which sounds horrible and not very vendor agnostic16:20
falcojrless so a cloud-init compatible IMDS, and more-so somebody adding the support for that particular IMDS into cloud-init17:05
falcojrhttps://github.com/canonical/cloud-init/tree/master/cloudinit/sources shows the list of current datasources17:05
falcojreach one has separate code used to fetch the correct data from the corresponding IMDS (or other data source)17:06
Odd_Blokestevenm: Right, what Proxmox are saying is that they will present your data to the system in a way that means cloud-init in the system will find the data that you provide.17:14
Odd_Blokecloud-init is solely concerned with running within the instance: the implementation of an IMDS is very cloud-specific, so I'm not sure what a reference implementation would look like.17:15
Odd_BlokeThe closest to a reference "IMDS" is likely what the NoCloud datasource does: it will use a variety of discovery methods but ultimately is looking to read 3-4 files (off the top of my head: meta-data, user-data, vendor-data, network-config) from whatever "IMDS" it discovers.17:19
Odd_BlokeWorth noting that an IMDS usually refers to a network Service: that's not the only way to get data into systems in a way cloud-init will find.17:20
Odd_BlokeThe other commonly used route is to mount an ISO containing those files (or a more complex set of files, for some clouds).17:20
=== vrubiolo1 is now known as vrubiolo
dam_Is it possible to use "Disk setup" module to change a base image with one partition ("/") to an image with 2 partitions ("/" and "/home")?22:47

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