/srv/irclogs.ubuntu.com/2020/04/29/#cloud-init.txt

blackboxswalso rharper, and Odd_Bloke I believe the args passed into the handle function is also supported via 'cloud-init single --name cc_ssh_import_id --frequency always ubuntu chad.smith'   so if we are deprecating use of providing 'args' directly to cloud-init config modules, we would be impacting that CLI call path as well.02:30
blackboxswyes just confirmed on a container02:30
socket-Hey all, im tryingo to set my hostname to the instanceId, and i put this in my config.  hostname: {{ v1.instance_id }}  however, it says Invalid format at line 4 column 11: "while constructing a mapping in "<unicode string>" any ideas what Im doing wrong?04:37
socket-https://apaste.info/VwYP04:38
socket-^ config and this is the error04:39
socket-https://apaste.info/Rjxn04:39
amansi26I have a question. Is multi NIC deployment is possible with cloud init. If so which part of code is responsible to make Multi NIC IPs up?10:21
Odd_Blokesocket-: You need `## template: jinja` as your first line for the substitution to happen: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html#using-instance-data13:44
sackrebutzHi. I use runcmd to do a git clone upon init. however, it seems that git is not using the private SSH key (placed in ~/.ssh/id_rsa), because when I log into the consle (TTY) and run the command, everything’s fine. Is there a “proper way” to run a git pull with cloud-init ?13:54
sackrebutzah - I get “Host verification failed” during cloud-init.13:55
rharpersackrebutz: cloud-init runcmd runs as root, so you'll need to specify a path to the key14:02
sackrebutzwell the key is placed in /root/.ssh/id_rsa14:02
sackrebutzwhich I’d expect to be used when root is running `git …`14:03
rharperI would as well;14:03
sackrebutzhow would i specify the key explicitly?14:03
rharperman git says, GIT_SSH or GIT_SSH_COMMAND can override the default git ssh command it uses14:04
rharperif nothing else, you could use ssh -vv  to see what's happening14:04
sackrebutzwell it works if I connect through TTY (as root) and execute the git clone. it does not work when i execute that very command through runcmd.14:05
sackrebutzI have verified that the files are all in place before the git command is executed14:06
sackrebutzas to the env variables, it looks like they’re not being set , as a runcmd `set > /tmp/set` file shows ..14:06
amansi26I have a question. Is multi NIC deployment is possible with cloud init. If so which part of code is responsible to make Multi NIC IPs up? Second thing is is the route files being cleaned up by cloud init itself?14:11
amansi26Third is: PER_INSTANCE basically means it will run just once even if we reboot or does it mean the file have frequency PER_INSTANCE means it will run on every boot14:13
rharpersackrebutz: right, we don't pass and env, you can wrap them like sh -c 'SSH_CMD=ssh -vv git clone https:....'14:14
sackrebutzah, good hint, I’ll try that!14:15
Odd_Blokeamansi26: We don't have support for user-provided network configuration in general.  What cloud/data source are you using?14:16
rharperamansi26: yes, https://cloudinit.readthedocs.io/en/latest/topics/network-config.html, the code for networking is cloudinit.net;     you say route files, so that sounds like sysconfig related, and cloud-init does not "clean-up sysconfig files" as good as it should, so re-using the same image in a new instance could have issues;14:16
rharperamansi26: per-instance means first time image has booted on a particular platform;  subsequent reboot of the same image will not re-run certain parts of cloud-init;  especially for network configuration, this depends on the platform,  on Azure for example, network configuration is rendered on every boot, not just the first time;14:17
rharpersackrebutz: https://stackoverflow.com/questions/4565700/how-to-specify-the-private-ssh-key-to-use-when-executing-shell-command-on-git14:19
rharperthis looks relevant14:19
amansi26so the issue I see is the ip was not coming up initially to I made a custom module and wrote code to make IP up and set frequency=PER_INSTANCE. but I see my module running evertime I reboot14:20
rharperamansi26: look in your cloud-init.log, you should see 'Calling handler <handler name> ... with frequency <once per-instance, always, ...>14:23
sackrebutz@rharper the solution was to do `ssh-keyscan github.com >> /root/.ssh/known_hosts`14:34
sackrebutzissue was bcs of HOST key not PRIVATE key - my bad.14:35
rharpersackrebutz: nice!14:35
rharperTIL ssh-keyscan14:36
sackrebutzme too :-D14:36
rharperhehe14:36
sackrebutzthanks for you support!14:36
rharpersure!14:37
Odd_Blokesackrebutz: As an aside, you might want to consider specifying the exact key you want in .ssh/known_hosts (using write_files).  Fetching the key at runtime means that an attacker could claim to be github.com without you realising, whereas specifying the key means that your git clones would fail in such an attack.14:43
Odd_Bloke(A caveat: I don't know how often GH rotate their host keys, so there may be an unwelcome maintenance burden there.)14:43
sackrebutzOdd_Bloke: Thanks - I guess I take that risk as I don’t plan to deploy often, too.14:45
amansi26rharper: As you mention on Azure for example, network configuration is rendered on every boot, not just the first time; is this the only case with Azure or with all other distros15:15
amansi26Second thing is once the vopt get removed, the n/w conf will set to dhcp (as designed) . so is there a way where we can make sure the n/w conf set only once(apart from network: disabled)15:17
rharperamansi26: unrelated to the distro, property of the Datasource, DataSourceAzure.py configures this.15:30
amansi26I am using ConfigDrive as Datasource15:30
rharperamansi26: I don't understand 'vopt get removed'15:30
rharperConfigDrive does not render every boot;  the default for datasources is once per instance;   Azure, EC2 (classic), SmartOS, and maybe one more Scaleway i think, are per-boot ...15:31
amansi26So what I mean is if the datasource is set to None and the system is rebooted , DHCP n/w will get configured right?15:32
=== blackboxsw changed the topic of #cloud-init to: pull-requests https://git.io/JeVed | Meeting minutes: https://goo.gl/mrHdaj | Next status meeting May 5 16:15 UTC | 20.1 (Feb 18) | 20.2 (Apr 28) | https://bugs.launchpad.net/cloud-init/+filebug
rharperif you don't have a datasource, cloud-init won't run15:35
rharperif you're previously booted  the default network config is to DHCP on one of the interfaces; that config will still be present on new boots;15:35
amansi26so is there a way where we can make sure the n/w conf set only once(apart from network: disabled)15:51
rharperfor configdrive, it's only once16:06
rharperbut generally we don't have a way to say, please generate network-config once and only once no matter what16:07
Odd_Blokeblackboxsw: So I've reviewed the process doc parts of https://github.com/canonical/uss-tableflip/pull/45, and I've just approved https://github.com/canonical/cloud-init/pull/312.  I'm going to go ahead and push your branch to ubuntu/daily/devel to save you from doing it as you're doing release work currently.19:27
blackboxswthanks Odd_Bloke please do. I've got the 20.2 release branch up for review rharper Odd_Bloke https://github.com/canonical/cloud-init/pull/33719:28
blackboxswI'm currently curating the 'hightlights for 20.1 -> 20.2'19:29
rharperOdd_Bloke: nice!19:30
rharperblackboxsw: excellent19:30
Odd_BlokeCool, merged, synced to Launchpad and daily build kicked off.19:37
Odd_BlokeBit of a backlog for builds, so it'll be a few before we can confirm it's fixed.19:37
blackboxswgood deal19:40
blackboxswSRU process bug created with 20.2 upstream release highlights  https://bugs.launchpad.net/cloud-init/+bug/187595119:47
ubot5Ubuntu bug 1875951 in cloud-init "Release 20.2" [Undecided,New]19:47
blackboxswOdd_Bloke: or rharper if either of you can review the 20.2 upstream release, I can send out email and discourse post about it21:09
blackboxswhttps://github.com/canonical/cloud-init/pull/33721:09
blackboxswand I can close out bugs, we can have any post-release bug management/milestone discussions separately if we need to tweak the process a bit21:10
rharperblackboxsw: hrm, do you have local changes to tableflip scripts?  I used the upstream-release script and my CHangelog is different than yours21:34
blackboxswrharper: checking. nope I'm on fresh master of uss-tableflip21:36
blackboxswI did have to enter the process bug number 187595121:37
blackboxswto the prompt21:37
rharperlemme try again21:37
blackboxswbut I ran cd /tmp; git clone cloud-init; cd cloud-inoit; upstream-release 20.2 20.121:37
blackboxswI'll try re-running as well to make sure I didn't do some other stuff.21:38
rharperblackboxsw: what i"m seeing is all of the cherry-pick/update changelog entries , did you manually redact those ?21:39
blackboxswrharper: makes me think you are working from non-master branch when you ran upstream-release21:41
blackboxswwe need to run that script from master to get the right changelog21:42
blackboxswlike you were in ubuntu/devel or daily/devel branch when upstream-release was run maybe?21:43
rharperoh21:44
rharperyes21:44
rharperyes i iwas21:44
rharperthank you21:44
rharperthere we go21:46
blackboxswschweet. I'll add that to the script so it warns21:46
blackboxswPR for uss-tableflip incoming21:46
rharpercool21:47
blackboxswrharper: https://github.com/canonical/uss-tableflip/pull/4621:54
blackboxswa quick pre-flight check on the branch we have checked out21:55
rharperk21:55
blackboxsws/ upstream-snapshot/upstream-release/ on the commit message and PR21:57
blackboxswdone and force-pushed21:57
rharperblackboxsw: can we get some comments added to the upstream_release doc mentioning that ubuntu/devel and release branches are going to produce incorrect output...21:57
blackboxswrharper: +1 will add that to the PR. and will also move the git pull outside of the if "master" check (as we always want to make sure master is at latest21:58
rharperblackboxsw: +122:05
rharperblackboxsw: looks good22:14
blackboxswthanks rharper22:14
blackboxswdone pushing to uss-tableflip PR as well22:14
blackboxswthanks22:15
* blackboxsw needs to setup my gorilla sbuild enbv22:15
blackboxswenv22:15
blackboxswAnother one for tomorrow for releasing 20.2 to gorilla https://github.com/canonical/cloud-init/pull/33922:39

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