/srv/irclogs.ubuntu.com/2020/11/09/#cloud-init.txt

minimalHi folks. A merge vs rebase question - I have a PR that's out of date with Master, should I use the "Update branch" button in Github? - it will do a merge into the branch. Or should I manually do a rebase?11:59
meenai always just rebase12:19
meenai don't know enough what magic Update Branch does, and i feel a rebase that i control is cleaner12:20
meenaplus, smoser has asked me a few times now to squash my own 302934 million commits and add the extra fluff that github has added there (like, Co-Authored-By: )12:23
meenaminimal: so, your choice, you can try and see if the button is satisfactory to you12:24
smosermeena: i dont think it really matters. since the project has decided "rebase and squash", it seems that it has made a decision to choose rebase over merge as a development decision (they do both have + and -).13:43
smoseri constantly am doing 'git fetch upstream && git rebase -i upstream/master && git push smoser HEAD'13:43
smoserbut i think the button is fine. all it really does (i think) is just 'git merge && git commit'13:43
tirexHello, I'm in the process of reading a cloud-init documentation and I'm wonder if it's possible to do network configuration of ipv6 with `post-up ip route add local ipv6/ipv6_prefix dev lo`.14:07
tirexyou help me?14:07
Odd_BlokeYeah, as we squash-merge all the commits, it doesn't matter whether you rebase or "Update branch"; the merge commit will be squashed away anyway.14:27
minimalmeena:, smoser:, Odd_Bloke: ok, was just cautious of a merge in case it affected/messed up commit history.15:06
Odd_BlokeYep, very reasonable; I would like to get to a point where we aren't squash-merging everything, but that's unlikely to get any of my time in the foreseeable future, unfortunately.15:08
minimaltirex: in the network-config YAML you can add static routes15:08
minimal@Odd_Bloke, for PR #626 everything done but it appears to be blocked on your last review - I closed off each of your individual comments but GitHub seems to think there's 1 change your requested still open.15:46
minimals/@Odd_Bloke/Odd_Bloke:/15:47
tirexminimal, but how? any examples with that?15:52
Odd_Blokeminimal: Cool, thanks!  Re-reviewing that is second on my list today, I should get to it. :)15:52
minimaltirex: are you using v1 or v2 network config?15:55
tirexv215:57
minimalok, as an example:16:03
minimalversion: 216:04
minimalethernets:16:04
minimal  eth0:16:04
minimal    routes:16:04
minimal      - to: abcd:de12:3456::/6416:04
minimal        via: ::116:04
minimalNever tried it for lo interface but think that should work16:04
minimalmight need to quote the ::1 bit, i.e. '::1'16:05
tirexminimal: this configuration will generate me a interface like this:16:29
tirex```iface ens3 inet6 static16:30
tirex`iface ens3 inet6 static16:30
tirex    address abcd:4f8:1c17:6da6::1/6416:30
tirex    gateway fe80::116:30
tirex    post-up route add -A inet6 ::1/64 gw abcd:4f8:1c17:6da6::/64 || true16:30
tirex    pre-down route del -A inet6 ::1/64 gw abcd:4f8:1c17:6da6::/64 || true`16:30
tirexbut I need `post-up route ip add`, "ip" is important16:30
minimaltirex: did you swap the "to:" and "via:" values?16:31
minimal"via" == "gw" (the gateway), whereas your /e/n/i file has them swapped around16:32
tirexyes16:32
minimalis this Debian or Alpine?16:38
tirexdebian 1016:39
minimalis there a problem with the route command not working?16:39
minimaltirex: is there something that you want "ip route" for that the usual "route" command cannot do?16:53
tirexminimal: I want to apply `ip route add local ipv6/ipv6_prefix dev lo` but I don't know how to replace this with `route`17:04
minimalI don't understand, the generated /e/n/i above basically looks ok (once you correct the "to:" and "via:" in the network YAML)17:06
tirexI tried different combination with `route` and neither worked like the ʻip route` shown above17:12
tirexeven when I type command from command line instead of cloud-init17:13
minimaldoes this work manually? "route add -A inet6 abcd:4f8:1c17:6da6::/64 gw ::1"17:16
Odd_Blokesmoser: rharper: Your thoughts on https://github.com/canonical/cloud-init/pull/659 would be much appreciated, as it's a new upgrade framework/approach.  (It's a clean resubmission of https://github.com/canonical/cloud-init/pull/609, for context.)17:21
Odd_Blokeminimal: #626 landed, thank you!17:25
minimal@Odd_Bloke, thanks!17:31
minimalGeneral question about the /etc/hosts templates in cloud-init - they all have FQDN forms of localhost/localhost4/localhost6 before the short form. This has the side effect that any time you run a "netstat" or "ss" you'll see the long-form name of the loopback IPs. Wondering whether to submit a PR to swap this around17:33
minimalsame question applies for the short-form and long-form hostname entries as well17:35
=== MAbeeTT_ is now known as MAbeeTT
tirexminimal: sadly, this isn't work manually: `SIOCADDRT: Invalid argument`17:53
minimaltimex: yeah, was testing it here - seems to be an issue that the "route add" command is doing a dns lookup on the "::1/128" value. Looking at the Debian route source code currently17:55
minimal"ip" is a more modern tool that does the same as the older ifconfig/route/etc but currently the cloud-init eni.py uses only "route" and not "ip route".17:56
minimaltimex: if you are just trying to blackhole some traffic then you could run the "ip route" command via either bootcmd or runcmd in your user-data instead18:10
smoserOdd_Bloke: i think 659 is probalby more than i have time to think about right now. sorry.18:31
meenai feel like the best way to fix resizefs, would be to fix growfs.c to exit with something other than 1 all the time.18:40
meenahow do y'all feel about exceptions based flow-control…?19:23
Odd_Blokesmoser: Ack, no worries; just wanted to make sure you had the opportunity. :)19:47
plujonI have a digitalocean droplet running Ubuntu 20.04 LTS (just upgraded) that takes 2 minutes to set up the network after boot.  I think something is amiss in its cloud-init.  'cloud-id' reports 'none' instead of 'digitalocean'.20:05
Odd_Blokeplujon: Can you pastebin /var/log/cloud-init.log somewhere for us?20:06
plujonOdd_Bloke: That file is 10+ MB.  Shall I paste only since the most recent boot?20:07
plujonhttps://cloudinit.readthedocs.io/en/latest/topics/faq.html#faq has some useful looking commands...20:08
plujonOh dear; I just blew away the old server ssh identity.  Ugh.20:12
plujonhttps://cloudinit.readthedocs.io/en/latest/topics/faq.html#how-can-i-re-run-datasource-detection-and-cloud-init # ran these commands, :-(20:13
Odd_BlokeAh, yeah, you don't want to do that on anything but an ephemeral system.20:14
plujonOdd_Bloke: http://ix.io/2DAM grep 2020-11-09 /var/log/cloud-init.log20:18
plujonOh, wait, that file was also recreated.20:19
Odd_Blokeplujon: Hmm, less helpful than I was hoping; could you paste /var/log/cloud-init-output.log?20:20
Odd_Blokeplujon: Yeah `clean --logs` wipes away cloud-init's cached state and its logs.20:20
plujonhttp://ix.io/2DAO # /var/log/cloud-init-output.log20:21
plujonLooks like an interesting error in there: "Getting data from <class 'cloudinit.sources.DataSourceDigitalOcean.DataSourceDigitalOcean'> failed"20:21
meenahow do i tell side_effect that… no Exception is raised?20:27
plujonAh, ssh keys restored.20:31
plujonOdd_Bloke: Would logs be more useful if I were to reboot..?  I suspect not...20:34
Odd_Blokemeena: In what context?20:40
plujon/etc/cloud/cloud.cfg.d/93-digitalocean-cloud-config.cfg was last modified in 2016 .  Hmm.20:40
Odd_Blokeplujon: Yeah, I suspect you're running into problems because of something to do with that: cc_ubuntu_init_switch hasn't been shipped by cloud-init since 2017, for example.20:42
Odd_Blokeplujon: (As an aside: https://github.com/canonical/cloud-init/pull/661 :)20:42
plujonAre files in /etc/cloud/cloud.cfg.d supposed to be updated by digitalocean, or me, or something else?20:42
Odd_Blokeplujon: Those files are used to configure cloud-init's behaviour: the cloud-init package ships defaults, but those defaults can be overriden or modified by other files in there.20:44
Odd_BlokeIn this case, DO must have some specific configuration in there, for whatever reason.20:44
plujonOdd_Bloke: Thanks; maybe I'll try copying a digitalocean cfg from another machine.  It seems like DO writes the files at image creation time (and never again?).20:45
Odd_Blokeplujon: I'd suggest going to DO and asking them for assistance: I'm sure you won't be the first DO user to hit this, so hopefully they have specific, known-good advice for remediation.20:45
plujonOdd_Bloke: Thanks; I'll try DO...20:50
Odd_Blokeplujon: Cool, thanks!  Let us know how you get on. :)20:52
plujonWill do, thanks.20:56
plujonFTR, is cloud-init kind of like chef or puppet?20:56
meenaplujon: neither.21:03
Odd_Blokeplujon: It has some overlap in what it can do to individual systems, but it's ultimately very different: it's baked into (most) cloud images, and takes care of discovering and processing the cloud's metadata.21:03
Odd_BlokeYou can specify to the cloud (via user-data) that cloud-init should perform some actions to the system when it's launched (https://cloudinit.readthedocs.io/en/latest/topics/modules.html is a list of the modules which you can specify config for), but it's substantially more limited (intentionally!) than config management systems.21:05
meenai have https://github.com/canonical/cloud-init/pull/655 now ready for actual review.21:07
meenaGoneri: give it another test, if you have time / resources21:07
meenafalcojr: ^^^^^21:14
meenawith #655 merged, i'll have all current(ly known) FreeBSD bugs and feature requests fixed, and can get back to refactoring21:16
meenaand, this excursion was quite educational in terms of testing, so i hope to have #588 in shape soon!21:17
meenabut, now, i sleep.21:17
meena(or read about sheep, https://uncpress.org/book/9781469634661/the-herds-shot-round-the-world/ )21:18
meenafalcojr: i will propose a patch to growfs, to use https://man.freebsd.org/sysexits but not tonight22:26
meenaand even if i do, it'll be a while before that hits a -RELEASE22:26

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