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

smosercatphish: most of the time "dhcp on eth0"13:21
smoserat least for the initial connection to the metadata service.13:22
catphishsmoser: thanks, i thought that might be the case, unfortuinately in my environment i don't want to rely on being able to run a dhcp and web server on all networks a vm might be connected so, so i'm looking at using a config disk instead13:22
smosercatphish: hardware ?14:01
catphishi don't understand14:07
catphishx86-64 qemu/kvm VMs14:08
catphishin a "public cloud" environment, but where some VMs might be on a private network14:08
smosercatphish: so no... not hardware ;)14:17
smoser"physical" is what i meant.14:17
catphishoh right nope :)14:17
smoseryou're looking to create a public cloud ? or your wanting to use/ammend an existing one?14:18
catphishi'm making one14:26
catphishor rather, just adding cloud-init to one with the hope of replacing a proprietary postinstall mechanism14:27
smoserif you just wanted to "ammend" an existing one.14:58
smoseri think config disk (config drive) is a reasonable solution. You can put it on any partition (it doesn't have to be a separate disk... with gpt, you've got 128 partitions and spending 10MiB on a config location sin't really costing you anything)15:00
smoserbut if you wanted to ammend a network solution, then one way you could do it would be to provide the MAC of the nic where the metadata servcie lived in dmi info15:00
smosersomehow just tell cloud-init "this is the mac to dhcp on" and then it can go on as it does15:01
catphishwhat options can i provide in smbios?15:01
catphishbecause that would be idea if i can force it to use a link-local IP15:01
catphishi'm puzzled because the default address seems to be APIPA, but it doesn't seem to assign an APIPA IP15:02
catphishie by default it appears to try to download a config from 169.254.169.254 but never assigns an IP15:03
catphishi can't see any way to use network config without ipv4 dhcp15:20
smosercatphish: yeah.. i think you're prbably looking at amazon15:43
smoseror at least, yes. that is how ec2 works.15:43
smoserbut one thing crazy about ec2... they run their server on a ipv4 link local address, as you've found15:43
smoserbut if you configure ipv4 link local, you wont get a response from them.15:43
catphishsmoser: same with digitalocean15:43
smoserdigital ocean i think *does* do ipv4ll15:43
catphishyeah, it does, it assigns a random address15:44
smoserbut on ec2, if you don't request from the ipv4 address that the dhcp request would give you, then you can't talk to the metadata service15:44
smoser:)15:44
smoserdigital ocean's is better.15:44
catphishyeah, that was my interpretation too15:44
smoseras it is right now, what you're wanting to do is not implemented fully.15:44
catphishi'm tempted to write my own to do one of 2 things: 1) fetch the data from a virtual serial port or block device 2) use ipv6 link local properly15:45
smoserconfig-disk (I'd suggest NoCloud) is the only real option.15:45
smoseroh...15:45
catphishyeah nocloud (config-disk) basically works15:45
smoserserial... one of the datasources does that15:45
smoserjoyent's15:45
catphishyeah i was just looking that that joyent thing15:45
smoserit does a metadata service over serial15:45
smoseryeah15:45
catphishannoyingly they use a proprietary format15:45
catphishbut it could work15:45
smoserand then you avhe to serialize requests over serial15:46
catphishyeah, that's not *too* painful15:46
smoserif i were going to design a new datasource now, i htink i would15:47
smosera.) provide instance-id and mac address of "the right" nic in dmi data (or possibly some other "local" manner)15:47
smoserb.) use ipv6 link local to hit a well known address (or maybe provide the ipv6 address in 'a' also)15:48
smoserc.) get the rest of the network configuration from the metadata service there.15:48
smoseri think joyent actually did a reasonable job.15:49
smoseroh... other "local" transports are available.  hypervisor <-> guest sockets .15:49
smoservsock i think is the thing15:50
catphisha local (unixy) socket would be absolutely amazing15:51
catphishbasically i'm down to 2 options: 1) write a datasource that pulls data from the hypervisor by some kind of virtual socket 2) use an ISO datasource (basic nocloud)15:52
catphishi'm currently going with option (2) because it doesn't require somehow getting my data source into every OS image i want to use, i'm running into trouble with caching though, qemu doesn't seem to refetch the iso for subsequent requests, and i'd like to to able to change the contents15:53
catphishsince cloud-init unmounts the iso, it should be safe to change it, then reprovision later, but something is caching it, hopefully i can address this15:53
catphishone specific question - can i use an ISO to configure the network, but ALSO configure a network data source to run at the next stage?16:17
catphishsmoser: after much internal discussion, we're going to write a datasource :) it's going to 1) get an instance-id and security key from DMI 2) get an interface MAC from DMI 3) bring up the appropriate interface and fetch the remaining config from a well-known ipv6 link-local IP16:32
catphishand of cource we're going to be dickheads and make sure our config is slightly nonstandard, and name the module after our platform, so that nobody else can use it ;)16:33
catphishthank you for your assistance16:34
=== lachesis_ is now known as lachesis
smosercatphish: unattaching the iso will be a pain.17:19
smosercloud-init will look for the instance-id on each boot17:19
smoserso you have to disable cloud-init on subsequent boots or set 'manual_cache_clean'17:19
smoserand, fwiw, it doesn't have to be an ISO17:19
smoseras in iso9660. it has to be a filesystem with a label.17:20
smosercatphish: what would be neat... and faster development cycle17:22
smoseris if  you also made it able to take instance-id, security-key and interface from environment .17:22
smoserthen you can iterate on lxd containers quite quickly17:22
smoseractually, now remembering ... there was a pan to do a more advanced datasource for lxd17:23
smoserusing /dev/lxd which is a socket17:24
catphishsmoser: yeah, i'm not a fan of the iso (or ext2 or whatever) filesytstem idea, seems kinda messy having an extra filesystem dangling around, so yeah, going to have a proper stab at the IPv6 LL approach, the only downside is that i'll have to modify every OS image to include it17:38

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