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

=== cpaelzer__ is now known as cpaelzer
PandemiKHEllo09:13
PandemiKSomone there to help me understand how datasource priority is working on cloud-init ?09:13
Odd_BlokePandemiK: There are a few people who may be able to help; go ahead and ask your question and you'll find out. :)12:47
PandemiKOk, I just don't want to bother you with some noob question13:12
PandemiKThanks ;-)13:12
PandemiKI'm using CI with Proxmox VE. In PVE, we cannot alter meta-data and user-data generated by PVE has iso9660 nocloud source13:13
PandemiKI'm trying to add another user-data source and merge it with PVE's one13:13
PandemiKSo I thought I could go ahead with smabios settings13:14
PandemiKSo I thought I could go ahead with smbios settings13:14
PandemiKBut where settings something like "ds=nocloud-net;s=https://dev.altinea.fr/"13:14
PandemiKThe files on the iso9660 are not used anymore. Any idea howto to 'merge' them without touching the PVE user-data file ?13:15
PandemiKAccess to the user data file is public : https://dev.altinea.fr/user-data13:16
PandemiKI tried to setup merge_how on top a the file13:16
PandemiKperhaps could I add some #include ? Is that possible with a iso9660 file (cidata) ?13:17
MICROburstHow to set an interface to promisc mode?13:26
Odd_BlokePandemiK: So the best way to do this would be to use multi-part user-data with an include, but that would require the user-data provided by Proxmox VE to be modified.13:35
PandemiKthat's my fear13:36
PandemiKI also wrote a little patch for PVE that add support for vendor-data13:36
PandemiKThat does the job (installing ssh keys and a few packages) but need to integrate a patch to PVE13:36
PandemiKAnd having a patch into mainstream PVE would be ... long13:37
Odd_BlokePandemiK: If that is immutable, then it becomes substantially more complicated; cloud-init expects to fetch its NoCloud configuration from a single source (e.g. an ISO, or a remote URL), so changing the configuration of the instance away from PVE's ISO will mean that you no longer get the metadata which PVE provides, which is likely to cause problems.13:37
PandemiKwithout PVE's iso9660 source, we don't have fqdn for example13:38
PandemiKwhich means creating a file for each VM, not wanted13:38
Odd_BlokeI'm not sure I follow; why would that imply "creating a file for each VM"?13:38
PandemiKIs there a way to provide only vendor-data from a URL with smbios version setting ?13:39
PandemiKPVE generate some interesting config inside it's 'own' user-data : fqdn and hostname parameter, derived directly from the VM's name13:40
PandemiKeverything else seems to be vm-agnostic so I could set it in another file (from a url for example)13:41
Odd_BlokeAh right, so you're saying you'd need to have a separate file on dev.altinea.fr for each server (and specify which one of those files to use in SMBIOS config at launch time)?13:41
PandemiKexactly !13:42
Odd_BlokeYeah, I can see why you want to avoid that. :)13:42
Odd_BlokeDo you create your own images, or do you using stock images provided by distros/OSes?13:43
PandemiKdistro's one (Ubuntu in my test case)13:43
PandemiKAll datasource are available, perhaps could I mix two ?13:43
Odd_BlokeNope, each boot uses a single DS, I'm afraid.13:44
PandemiKI only need to have some kind of vendor-data merged with user-data to add node to puppet and install a few packages13:45
PandemiKsad :-( So It would necessary go for a code change in Proxmox13:45
Odd_BlokeYeah, PVE not allowing you as a user to provide user data is breaking cloud-init's assumptions, unfortunately; maybe I'm not thinking of another way around it, but it does sound like a platform issue that's difficult for us to find a way around.13:46
PandemiKok, many thanks for your help and confirmation13:47
PandemiKTime to annoy PVE devs so ;-)13:47
Odd_Bloke^_^13:47
Odd_BlokeSorry I couldn't help more!13:47
PandemiKno problem, at least, I'll stop wasting time with something not possible13:48
PandemiKAnd a little remark if there's cloud-init dev here : CI seems to NOT support ssh certificates13:50
PandemiKI've been able to hack around this with 'disable_root_opts' of the ssh plugin but supporting it officially would be great13:51
PandemiKdespite this, the possibilities with cloud-init are almost endless, it's really exciting !13:51
PandemiK(if I could provide my own datas :-)13:52
Odd_BlokePandemiK: It's funny you should mention SSH certificates, someone opened this PR related to them yesterday: https://github.com/canonical/cloud-init/pull/487 :)13:57
smoserPandemiK: "having a patch into mainstream PVE would be ... long".  I'd recommend starting that process.  As the old saying goes, "the best time to plant a tree is 30 years ago.  The second best time is now".14:05
PandemiKnice quote ;-)14:05
smoserPandemiK: one thing that maybe could help you... i dont know if we ever did this or not. i dont think so.14:08
smoserbut we could make cloud-init able to put the instance id into the header of a seed request14:08
PandemiK@smoser : as said, this would need to generate a user-data 'on the fly' per VM, right ?14:11
smoseryeah... you're going to have to do that. i think. as yeah..14:11
smoseras you don't have a way to put any differenciationg information into the url. (if i understand correctly)14:12
PandemiKMy goal is to let PVE generated all vm-specific datas and add only vm-agnostics datas14:12
smosersome other cloud-init-like things put mac addresses of the NICs available in the headers14:12
PandemiKI won't try to create a script that get the instance-id from proxmox, correlate with VM fqdn and return a specific user-data file14:12
smoserso pve just does not provide any user-data ?14:13
PandemiKdid I mention I'm not a developer ;-)14:13
smoserah. i see. i think.14:14
smoseryou dont' want to provide launch-time input ?14:14
smoseri guess https://pve.proxmox.com/wiki/Cloud-Init_Support is what you're using ?14:19
PandemiKyup14:19
PandemiKIt seems there's an effort in what I'm looking for :14:19
PandemiKhttps://lists.proxmox.com/pipermail/pve-devel/2020-July/044241.html14:19
PandemiKreally new but promising14:19
smoseryeah... it seems that that is what you're after.14:23
smoserand you'd just put in as ciuserdata base64("#include your.url.here\n")14:23
smoserit is pretty crazy... it looks from their patch that proxmox is writing yaml with strings and indents.14:24
smoserie 'content .= "... mtu "14:25
PandemiKI'm trying to understand their idea but yeah ... strange14:25
smoserrather than creating some dict and yaml.dump()14:25
PandemiKremember it's Perl ;-)14:33
smoseryaml is a strict super set of json14:37
smosercloud-init reads yaml, but they could just write json14:38
smoserand i'm sure there is a json for perl14:38
smoser(there probably yaml too)14:38
=== ddstreet_away is now known as ddstreet
MICROburstHow to set an interface to promiscuous mode?17:11
Odd_BlokeMICROburst: I don't believe that we have platform-independent configuration to express promiscuous mode, so I think you'll have to configure the system to apply it yourself.  You may want to look at networkd-dispatcher which is recommended by the netplan docs (https://netplan.io/faq#use-pre-up-post-up-etc-hook-scripts) but this is not my area of expertise so I can't speak categorically.19:57
MICROburst<Odd_Bloke>: So you suggest to put the stuff in write_files: ?19:59
Odd_BlokeMICROburst: That's what I'd try first, yeah.20:02
=== apollo13_ is now known as apollo13

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