/srv/irclogs.ubuntu.com/2022/04/28/#cloud-init.txt

=== gschanuel6 is now known as gschanuel
=== hsi is now known as hanno
=== hanno is now known as hsi43
hsi43Hi12:01
hsi43I've ran into a small glitch with deploying Ubuntu 20 on AWS. when secondary private IP address is in use.12:01
hsi43Perhaps someone from here has ran into similar or can comment on the behaviour change between Ubuntu 18 LTS and 20 LTS.12:01
hsi43Ubuntu 18 does not spin up the secondary private IP by default. It does not appear in /etc/netplan/50-cloud-init.yaml.12:01
hsi43However in Ubuntu 20, 50-cloud-init.yaml contains the secondary address and result is that this IP is brought up on the instance as primary. And primary address is attached also, but appears as secondary.12:01
hsi43Can be worked around by disabling cloud-init's network config but a more desired outcome would be to have the instance spin up with correct config without additional steps.12:01
hsi43Thanks for help :)12:01
chilukso falcojr and holmanb thanks for the help the day before yesterday.  I figured out what was going on.  I had assumed that the cloud-init was actually processing the network section and actually making changes.  I was unaware that it was just copy and pasting it into /etc/netplan/50-* ... Once I figured that out it was simply a matter of copy and pasting the section myself and then running netplan try.  Netplan was erroring out on 13:43
chilukhaving a set-name  section without a match key.13:43
amessyroomis there a way with layout to specify the size of partitions in GB or MB rather than percentage of disk ? i.e. layout: [[66, 83], [33, 82]]15:26
blackboxswamessyroom: not to date. currently just percentages as you mentioning. That might be an interesting feature to add. cc_disk_setup would have to to a bunch more validation on total size allocated, but we do have a cloudinit.util human2bytes function that could parse and handle converting typical definitions on human-readable strings and units. 18:24
=== Guest44454 is now known as ice10001
ice10001Good morning all.19:17
ice10001blackboxsw I made some great advancement yesterday, with my code. I have run into a snag now with adding and updating repositories19:18
ice10001Where do I past my code again?19:19
ice10001*paste19:19
holmanbice10001: paste.ubuntu.com, GitHub gist, pastebin, etc are reasonable ways to share19:28
ice10001Thnx holmanb19:29
holmanbAnytime :)19:29
holmanbNewbie: can't say I've used gzip encoded userdata _or_ alicloud, have you tried isolating the issue (getting a success with either 1. unencoded data on alicloud or 2. gzipped data on a different datasource or in a countainer/vm?) 19:34
ice10001Here is my code, I want to add repositories for postgresql & docker. Does anyone know if this yaml would work?19:35
ice10001https://pastebin.com/a58bWXrp19:35
holmanbNewbie: also, were you able to check the logs for warnings/errors?19:35
ice10001Everything up to apt:    works19:35
ice10001I just need to add the remaining code for repositories and install19:35
ice10001** Add repositories, update them and install the latest19:36
holmanbice10001: I don't think the dpkg --printarchitecture will work there19:37
ice10001Should I be specific? AMD64 ?19:37
ice10001We will only ever always run amd6419:38
ice10001x86_6419:39
holmanbsame with $(lsb_release -cs)19:39
ice10001How would I script that to use the current version?19:41
holmanbthere are a few different replacement variables that the apt module automatically does replacements for: https://cloudinit.readthedocs.io/en/latest/topics/modules.html#apt-configure19:42
holmanb$RELEASE, $MIRROR, $KEY_FILE, etc19:42
ice10001:)19:43
holmanbice10001: so $(lsb_release -cs) => $RELEASE, and I suspect you could probably drop the arch= altogether or just hardcode that one, since you said it will only run on amd6419:46
ice10001Ok, let me try that :)19:47
ice10001Any idea on updating those repos's before installing with the same yaml?19:47
holmanbnot sure what you're asking19:48
ice10001If I add those repositories, during my ubuntu server install (this is a user-data file for my custom iso) how do I install the latest postgresql from my added repo. Do I have the put the command 'package_upgrade: true' anywhere before calling for the package installs at the end?19:50
holmanboh I see, I assume you'd want package_update: true so apt learns of the new repo19:52
ice10001Yep19:53
ice10001I have added it here:19:54
ice10001https://pastebin.com/V7MCA3Yn19:54
ice10001vscode has not complained...19:55
ice10001My test Vbox machine with the custom iso did not succeed, there was an error19:57
ice10001On the current yaml19:57
holmanbice10001: did you check the yaml using cloud-init devel schema? what error?20:40
blackboxswalso "packages:" key is incorrectly nested under package_update. due to that leading whitespace before "   packages:" that's invalid yaml20:42
blackboxsw"yaml.scanner.ScannerError: mapping values are not allowed here.. line 2, column 11"  which we can also see from cloudinit devel schema --annotate -c <yourfile> https://paste.ubuntu.com/p/mXzPsGMZTh/20:46
=== Guest44454 is now known as ice10001

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