/srv/irclogs.ubuntu.com/2018/01/17/#cloud-init.txt

=== cpaelzer_ is now known as cpaelzer
=== shardy is now known as shardy_afk
=== shardy_afk is now known as shardy
=== shardy is now known as shardy_lunch
=== shardy_lunch is now known as shardy
=== shardy is now known as shardy_afk
smoserpowersj: c-i is busted for cloud-init . did you look at that ? sorry if i just missed you saying so.17:47
powersjhmm I wasn't aware till now17:47
powersjah it is the same thing as with curtin, our lxd config wasn't handing out network addresses17:48
smoserok. fixed ?17:48
* powersj kicks a nightly run17:48
powersjlooks good17:57
dojordanhey guys, would someone be able to take a quick look at my failed CI run? https://jenkins.ubuntu.com/server/job/cloud-init-ci/696/console It is failing with this: 2018-01-17 02:37:12,902 - tests.cloud_tests - ERROR - stage part: setup func for --deb, install deb encountered error: timeout: after 120s system not started18:28
blackboxswhrm peeking18:29
smoserdojordan: i'll push 'build again'18:29
smoserdojordan: c-i was busted due to local lxd issue on those sytems18:30
smoserpowersj fixed, so 'Rebuild' is in https://jenkins.ubuntu.com/server/job/cloud-init-ci/699/18:30
smoserso cross your fingers18:30
blackboxswthx smoser18:30
dojordanthx all18:31
dojordan@smoser, finally got a pass. Can you take a peek at the changes?18:44
smoserdojordan: doing so19:02
smoserdojordan: does it work ?19:35
dojordanI've confirmed xenial does, still need to run an artful pass19:36
tribaalHi folks. I have a bit of a weird issue that I suspect might be cloud-init related, and would love some pointers to investigate:20:10
tribaalthe kubernetes test suite has a test that simulates a network split/problem by killing the main network interface on the host (a VM using ubuntu cloud images, with its networking set by cloud-init).20:11
tribaalthe test fails because the network doesn't come back up. Rebooting the machine however brings the network back up as normal20:12
tribaalthe specific method the test uses to kill the network for 120 seconds is ssh'ing in and doing "nohup sh -c 'sleep 10 && sudo ip link set eth0 down && sleep 120 && sudo ip link set eth0 up' >/dev/null 2>&1 &"20:13
tribaalrather crude, but it *should* work in theory20:13
tribaalI tried running that on GCE and AWS and both fail (with ubuntu xenial images at least)20:15
blackboxswhrm.... that command also permanently brings down my network on the laptop (which didn't come back)20:18
blackboxswand isn't deployed w/ cloud-init20:18
blackboxsw12320:21
blackboxswn/m I didn't wait long enough20:21
blackboxswwonder if it's networkmanager vs networkd related?20:23
smosertribaal: i'd suggest you can simplify greatly by using screen or tmux20:24
smoserrather than  nohup20:24
smoserand sh -xc20:24
smoserand sending output to a file (and stder)20:25
smoserthen you can see what happened if you have to go back in20:25
smosertribaal: i cannot reproduce such a failure in lxc though.20:28
smoseractually, i might be able to20:29
smoseryeah... doing what you're doing is not going to restore any routes20:29
rharperhttp://linux-ip.net/html/tools-ip-link.html20:30
rharperthere's a section on side-effects of dropping link20:31
rharperNow when we down the link layer on eth0, we'll see that there is now no longer a flag UP in the link layer output of ip address. More interesting, though, all of our IP routes to destinations via eth0 are now missing.20:31
rharperI suspect the routing is busted20:31
* rharper has to head out20:31
rharperbbiab20:31
jgomo3Given ruby as a package in the pakages list, and a commad like `gem install bundler`, How to be sure the command would run after the ruby package had been insalled?20:56
smoseri expect that is guaranteed20:56
smoserscripts with '#!' or runcmd will run after packages are isntalled20:56
jgomo3Thank you @smoser.20:59
jgomo3How can I learn about the order of excecution?21:00
jgomo3I don't find anything in the documentation... maybe I didn't see well.21:00
smoserjgomo3: well, not easily. it is in the modules order21:11
smoserin /etc/cloud/cloud.cfg21:12
jgomo3@smoser: Oh, I see. TY for the info.21:12
smoserin cloud_final_modules21:12
smoser package-update-upgrade-install21:12
smoserruns before21:12
smoserscripts-user21:13
jgomo3@smoser: When you refer to "cloud_final_modules" are you talking about the sourcecode?21:14
jgomo3Oh, no, I see now. Thank you.21:15
jgomo3I'm trying to do `wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -` but in the `apt` -> `sources` section. What I think could work is to define a Source with `keyserver: https://www.postgresql.org/media/keys/` and `keyid: ACCC4CF8`. But seing the example at "additional-apt-configuration" at line 237, where there is an alternative keyserver, and analyzing the MIT keyserver, looks like there 21:55
jgomo3I'll try it, but I bet I'm going to waste a lot of time trying many combinations of  ways to write the `keyserver` and `keyid` values... So: Is there a way to define the URL of the key we want to add by apt-key somewhere in the `apt` section? Or should I write that command with wget in the bootcmd?21:57
jgomo3Antoher way I'm thinking is to modify `/etc/ssh/ssh_import_id` to add the postgres key webserver, and use ssh_import_id instead22:06
jgomo3Is it possible to modify that file (`/etc/ssh/ssh_import_id`) before ssh_import_id would run?22:11
jgomo3`write_files` would do it.22:12
jgomo3So, the real question would be: How to add the official Postgres repository via cloud init? -- https://wiki.postgresql.org/wiki/Apt22:24
rharperjgomo3: it appears that  for now, you'll need to download the key itself and include that in the 'key' field;  this will call apt-key add <contents of the key>22:27
jgomo3@rharper: That's right. Thank you!22:29
rharperI wonder why postgresql doesn't publish their key to known servers though22:29
jgomo3@rharper: They don't have to do it. And as they, there are many repositories who's keys are published not on "keyservers" but in a simple URL. ssh-import-key is aware of this, and allows to configure it with an URL pattern.22:53
rharperI know not everyone publishes; I'm just wondering why not; what's the downside of not publishing the gpg key you use to sign your packages22:53
rharperjgomo3: ssh-import-key ?22:55
rharperssh-import-id ; interesting22:56
jgomo3ssh-import-id22:57
jgomo3No, is not that they don't publish it... they publish it in their own web servers, but not in a keyserver. Maybe Postgres don't trust that launchpad would be eternal, or they think is their responsability to maintain their keys in the Internet.22:59
rharperI meant publish the gpg key to the gpg keyservers; there are many gpg keyservers not hosted by canonical; you mentioned the MIT one, debian has one, etc;  I was just wondering why someone wouldn't23:00
jgomo3But, the whole point of a PKI is the distributed trust... so, people should change their minds and at least, publish in many trusted keyservers their keys, not only in one place. But, who am I to say anything :D23:01
rharpergpg --search-keys ACCC4CF823:01
rharpergpg: searching for "ACCC4CF8" from hkp server keys.gnupg.net23:01
rharper(1)PostgreSQL Debian Repository23:01
rharper  4096 bit RSA key ACCC4CF8, created: 2011-10-13, expires: 2019-07-0223:01
rharperlooks like it's there23:01
rharperpublished23:01
rharperso maybe you can use keyserver: keys.gnupg.net and keyid: ACCC4CF823:02
rharperhttps://paste.ubuntu.com/26407200/23:03
jgomo3Oh, that is great! Thank you!23:03
rharperyeah, maybe that postgresql APT faq can get an update that it publishes the key to gnupg.net23:04
jgomo3I was thinking exactly in that. I'll try to make it happen.23:08
rharpercool23:10

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