/srv/irclogs.ubuntu.com/2018/09/06/#ubuntu-server.txt

masonSuperLag: https://wiki.ubuntu.com/fai-in-ubuntu00:32
masonSuperLag: Ah, and https://landscape.canonical.com/00:32
mike802hey, so i have phpmyadmin up and i'm trying to connect to mysql database and i'm getting an error03:05
mike802mysqli_real_connect() connection refused03:06
mike802#2002 connection refused; the server is not responding03:06
mike802apache2 seems to be up and so does my mysql database03:07
mike802so, i checked and i can log on with mysql -u guest etc.....03:08
mike802while i can't log on with -u guest -wrong password03:08
mike802so, i think i added a guest account to my database correctly03:09
=== havenstance_ is now known as havenstance
cpaelzergood morning04:55
lordievaderGood morning06:06
xrandr_macHi there. I am having an issue connecting a gluster node on ubuntu to a gluster server running CentOS08:48
xrandr_macI keep getting PEER_CONNECT and PEER_DISCONNECT events in the logs08:49
jamespagecoreycb: errant /usr/etc/<project> directories in python{3}-project's are nice for upgrades09:25
jamespagefixed cinder09:25
coreycbjamespage: testing py2->py3?11:42
coreycbupgrades11:42
jamespagecoreycb: yeah13:29
kstenerudahasenack: It looks like app armor isn't enabled in the test environments for strongswan13:30
ahasenackkstenerud: "test environment" is just a vm you brought up, right? The test itself isn't messing with apparmor probably13:31
ahasenackkstenerud: have you tried enabling it before running the test?13:31
kstenerudahasenack: aa-enabled says yes, but then aa-status gives:13:35
kstenerud1 processes are unconfined but have a profile defined.                                          │13:35
kstenerud   /usr/lib/ipsec/charon (1769)                                                                 │13:35
sdezielkstenerud: sometimes there are races with systemd and apparmor profile loading13:35
sdezielkstenerud: have you tried "service strongswan restart" ?13:35
kstenerudthat did it :)13:38
ahasenackinteresting bug13:41
kstenerudwhich is why the regression tests didn't catch this I guess13:45
sdezielkstenerud: all my strongswan deployments have Apparmor enabled and I never ran into this missing /proc/$PID/fd/ read rule. I think this is very specific to the reporter's config13:49
sdezielahasenack: I think the way to avoid this race would be to either tell systemd to apply an Apparmor profile as part of the unit file (not really applicable for stronswan) or put a dependency so that apparmor loading is done before starting the strongswan service13:52
ahasenacksdeziel: can't an apparmor profile for a service be enabled without restarting the service? I would think that's possible13:55
ahasenackkstenerud: btw, you can update the postfix sru card, did you see the emails?13:57
kstenerudahasenack: Is that the bug tracker email?13:58
ahasenacklaunchpad email, yes. I got it, as I'm subscribed to that bug13:58
sdezielahasenack: according to man 7 apparmor, no: "Profiles are applied to a process at exec(3) time ; an already running process cannot be confined."13:58
sdezielkilling charon would probably have it started back by systemd but that's a bit intrusive too14:00
kstenerudhmm that's weird... When I try loading the testing env on cosmic, there's no aa-profile cmd14:14
kstenerudahasenack: I've run the tests on cosmic and they work, so the bug was fixed somewhere between 5.6.2 and 5.6.314:18
kstenerudso this would be a backport fix to bionic, right?14:19
ahasenackkstenerud: did you see the error before?14:19
kstenerudI saw the error when running a bionic vm14:19
ahasenackkstenerud: check /etc/apparmor* when installing 5.6.3 in cosmic to see if the changed profile line is in there14:19
ahasenackit might be in an abstraction directory14:19
kstenerudahasenack: I don't see it applied in /etc/apparmor.d14:22
ahasenackhm14:22
ahasenackwhat was the line again?14:22
ahasenackfrom the patch14:22
kstenerud+  @{PROC}/@{pid}/fd/        r,14:22
kstenerudright after    /var/lib/strongswan/*     r,14:22
kstenerudin usr.lib.ipsec.charon14:23
ahasenackdid you check the abstractions directory?14:24
kstenerudyes. Didn't see anything about charon in there14:24
ahasenackit doesn't have to be about charon, it could be a generic permission, for all services to use if needed14:25
ahasenackabstractions/bash:  @{PROC}/@{pid}/mounts            r, <-- example14:26
ahasenackwell, bad example14:27
kstenerudOK. I don't see anything about @{PROC}/@{pid}/fd/ except in ubuntu-browsers14:27
ahasenackabstractions/base:  @{PROC}/@{pid}/{maps,auxv,status} r, <- more interesting one (generic)14:27
ahasenackyeah14:28
ahasenackthen either it's not trying to read that, or apparmor isn't applied14:28
kstenerudwhen I aa-status, I see that /usr/lib/ipsec/charon is in enforce mode14:29
kstenerudoh hang on. that's just profile14:29
ahasenackyou can also use ps faxwZ14:30
kstenerudthere we go, the process is now in enforce mode14:30
ahasenackthe Z option will add a column about confinement to each row14:30
kstenerudOK, running in enforce mode the test succeeded14:31
ahasenackand you got a denied?14:31
kstenerudnope14:31
kstenerudI'll try a second run with bionic. The tests didn't even finish on that14:32
ahasenackok14:32
ahasenackvms or containers?14:32
kstenerudvms14:32
ahasenackgood14:32
ahasenackI prefer vms when dealing with apparmor14:33
sdezielwith IPsec, VMs are needed for 95% of the use cases anyway14:38
ahasenackyeah14:39
coreycbjamespage: hit the same thing with heat. fixing.14:40
jamespagecoreycb: hurrah14:40
kstenerudahasenack: Hmm strange it didn't fail this time14:40
jamespagecoreycb: I might run a quick non-charm test14:40
coreycbjamespage: that's what i'm doing. just looping through all the packages and upgrading.14:41
jamespagecoreycb: oh ok14:41
* jamespage stands backj14:41
kstenerudahasenack: I'm doing this to test: https://pastebin.ubuntu.com/p/w4HQchZVfH/14:42
ahasenackkstenerud: and do you see the denied message in bionic?14:48
ahasenackand the test failing?14:48
kstenerudNo, not this time14:48
kstenerudLast time I did get a failed test14:48
kstenerudoh wait wtf... charon isn't in enforce mode again14:49
kstenerudoh nm. The tests shut down strongswan14:50
kstenerudSo I can't trigger the bug from these tests. I might have triggered something else beause I was trying different ways to do it14:51
dpb1kstenerud: are you "taking over" that strongswan MP that we received?14:51
kstenerudyes14:51
dpb1k14:51
kstenerudBut I can't trigger the bug he had, so I can't verify the fix14:51
dpb1hrmph14:52
kstenerudI did see a similar looking fix in upstream strongswan, though14:52
dpb1was there a proper bug for it?14:52
dpb1lp bug14:53
kstenerudOur bug is https://bugs.launchpad.net/ubuntu/+source/strongswan/+bug/178625014:53
ubottuLaunchpad bug 1786250 in strongswan (Ubuntu) "strongswan (charon) is rejected by apparmor to read /proc/<PID>/fd" [Undecided,In progress]14:53
kstenerudNot sure if the upstream fix was from that or a private bug report to the authors14:53
ahasenackkstenerud: what is the upstream change that could be related?14:54
kstenerudoh wait no. I'm getting confused by logwatch stuff :P14:55
kstenerudSo no, there's no upstream fix. This is an apparmor and strongswan issue14:55
ahasenackok14:56
ahasenackwell, I don't have a handy strongswan config to check this out more carefully14:56
ahasenackif you think you could get to one with the hints from the test, go ahead, we could use it, as I'm sure this is not the last strongswan bug we will have to handle14:56
ahasenackbut beware the rabbit hole :)14:56
ahasenackand the reporter went MIA14:57
ahasenackmaybe what's needed is a service restart after the vpn is established, or a reload, or some other interaction with the daemons14:57
ahasenackor a logrotate to kick in14:58
ahasenacketc14:58
kstenerudok, I'll see what I can come up with14:58
sdezielI think the issue is somehow related to /etc/resolv.conf handling14:59
TJ-If it would help, I'm currently working on a strongswan deployment, and might be in a position to try to reproduce the issue, if it'd help15:07
TJ-I've been kicking a Cisco 860 series that doesn't want to play nicely with L2TP/IPsec too, due apparently to only offering IKE 3des-sha1-modp102415:08
kstenerudTJ-: Yes, I just need a setup that I can put in a repro case15:09
TJ-kstenerud: remind of the bug number again, I'm on a different PC than when it was mentioned yesterday15:10
kstenerudhttps://bugs.launchpad.net/ubuntu/+source/strongswan/+bug/178625015:11
ubottuLaunchpad bug 1786250 in strongswan (Ubuntu) "strongswan (charon) is rejected by apparmor to read /proc/<PID>/fd" [Undecided,In progress]15:11
TJ-kstenerud: I'll spend some time on it over the weekend whilst the office here is empty, see what I can come up with. It looks like the ipsec config hasn't been provided by the user, and the 16.04>18.04 d-r-u is likely the culprit15:18
kstenerudGreat! Thanks!15:27
TJ-kstenerud: so I don't waste time, in the bug and MP there's talk of not being sure when 'it' was introduced but to me it isn't entirely clear what 'it' is! Is that referring to the apparmor profile change/difference, or accessing /proc/self/fd/ ?15:32
kstenerudTJ-: It worked in xenial, broke in bionic, and the fix apparently is to add @{PROC}/@{pid}/fd/        r, to usr.lib.ipsec.charon15:36
kstenerudunder /etc/apparmor.d15:39
TJ-kstenerud: yes, I understood that bit, but the 'it' referred to - was it adding the apparmor profile, or strongswan reading /proc/self/fd/ ? From what I can see from the history, /proc/self/fd/ was added in 2015 before the xenial version was released so should be in that version, but the debian/usr.lib.ipsec.charon apparmor profile was added in 2016/2017 via an import from Debian.15:44
kstenerudI think it was strongswan attempting to read /proc/self/fd/15:54
TJ-Yes, that was introduced with commit b410d7f8ff16:11
TJ-the apparmor change was introduced into Debian 5.5.1-3 via commit 9e71a1082216:28
=== not_phunyguy is now known as phunyguy
kstenerudTJ-: Which repo is that?16:45
TJ-I added Ubuntu and Debian git repos to the upstream, as remotes, and tracked the changes from those16:53
TJ-9e71a10822 came in via Debian16:53
ahasenackI wonder why the samba apport hook doesn't offer to include /var/log/samba/log*17:33
ahasenackusually systemctl status doesn't have enough information17:33
=== cryptodan_mobile is now known as cryptodan
=== cryptodan is now known as cryptodan_mobile

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