/srv/irclogs.ubuntu.com/2015/04/21/#snappy.txt

asacChipaca: whats that?00:10
asac:)00:10
asacfrom the docs?00:10
sergiusensjust a commit message00:11
Chipacaasac: a card, a description of a task, a branch, and a commit message00:11
Chipacaasac: i was in a maze of so many deferreds for a moment i thought i was programming twisted again00:11
asacoha00:11
asacChipaca: was that your card :)?00:11
asachehe00:11
asacyou could have reworded it00:11
asacguess its hard to convey what that should do :)00:12
Chipacaasac: maybe :)00:12
Chipacaasac: maybe it was fun, also00:12
=== c74d is now known as Guest21388
kirklandlool: okay, wpasupplicant has always been primitive and tricky, in my experience02:41
dholbachgood morning07:08
=== erkules_ is now known as erkules
=== kickinz1|afk is now known as kickinz1
mhall119mvo: does the PPA listed on https://developer.ubuntu.com/en/snappy/start/ need to be changed?08:42
mhall119didrocks tells me the beta PPA actually has an old version of snappy08:42
mvomhall119: indeed, utopic and trusty are outdated, I updated them now, so that shold be fine. we may still want to use a different one when snappy gets released (i.e. the beta name sounds wrong then). asac has the final say here08:45
dpmdholbach, ^08:47
dholbachasac, lool, slangasek: ^08:48
dholbachI asked at least 5-10 times which PPA to use :)08:48
dholbachwhich are we going to use? :)08:48
dholbachI'm obviously happy to change it, but I'm a bit confused08:48
dholbachmvo, ^ were there any discussions about changing the ppa setup and nomenclature?08:51
asacgood question08:57
asaci think we will be using a new ppa :)08:57
asaclol08:57
mvodholbach: only asac knows that :) I think it should be staging -> beta -> tools and we use tools for the final and stable PPA, but iirc asac wnated a different ordering. I personally don't mind either way is fine as long as its documented08:58
mvobut if I would decide, that how I would do it08:58
dholbachwe should just use the archive if you ask me personally :-P09:01
mvogood point, we could use the backports archive09:05
JamesTaitGood morning all; happy Kindergarten Day! :-D09:07
mvokickinz1: whats a good way to test docker? your tdocker snap?09:10
kickinz1mvo: For now I would say either direct command line or tdocker, yes. I need to finish owncloud snap package.09:11
mvokickinz1: where is the docker snap? I think I need to add some caps for the seccomp stuff or make it unrestricted there (thats probably the best option for now until jdstrand is around)09:14
kickinz1mvo: launchpad.net/~snappy-dev/snappy-hub/docker/09:15
mvota09:16
mvokickinz1, jdstrand: please pardon if this diff is stupid, it seems with seccomp enable I need to do at least http://paste.ubuntu.com/10860613/ in the docker-client or it won't even talk to docker (i.e. the docker command will just hang)09:24
kickinz1mvo: is it with new seccomp code in the image? (it was working yesterday)09:30
mvokickinz1: it landed during the night09:31
kickinz1mvo: ok, I'm downloading it right now.09:31
mvokickinz1: you will need to apply the pasted patch  to make it work at all, dmesg will indicate if something goes wrong, the kernel message starts with "audit:"09:34
kickinz1mvo thanks09:36
mvoChipaca: hm, hm, this should not be possible, right? http://paste.ubuntu.com/10860659/ - note the two pastebinit packages I managed to install first I installed it via the store and then sideloaded it and that worked :/09:38
Chipacamvo: sideload always works09:39
Chipacaoh09:40
Chipacaoooh09:40
Chipacaouch09:40
Chipacamvo: i thought it was going to be about versions, not about namespaces09:40
Chipacaouch09:40
Chipacamvo: i'll look into it as soon as i get this branch up09:40
mvoChipaca: thanks ,you rock!09:41
mvomuch much appreciated09:41
* mvo dives back into seccomp land09:41
Chipacamvo: before you're in too deep09:42
Chipacamvo: sideload install of an already installed package is ok, yes?09:42
Chipacathat is, we don't want to force devs to bump revno or uninstall to test their packages09:42
Chipaca?09:42
beunoFWIW, I sort of think that what distinguishes sideloading from not is whether it's signed by the store09:42
mvoChipaca: oh, sideload again a already sideloaded one? yeah, I guess, but we will probably run into the textfile-busy problem we had earlier when we allowed reinstall. its a problem worth fixing and maybe its ok for sideload09:43
Chipacamvo: textfile busy should be sorted now that we stop things properly, mehtinks09:44
mvoyay09:46
mvothen go for it09:46
mvoexcellent news09:46
mhall119dholbach: so are we waiting to hear from asac about which PPA to use in our docs?09:47
asacmhall119: we are talking :)09:47
asacabout that09:47
asacmhall119: if you want to participate join the call on my calendar right now09:47
mhall119ok, cool, I'll leave that in your hands then09:47
mhall119asac: as long as I can tell didrocks it's being done, I'm happy :)09:48
asacmhall119: why is didrocks so worried?09:50
asacis he depending on us?09:50
mhall119asac: because he saw that it was wrong and he's sitting across the table from me09:50
mhall119asac: he's working on a prototype with it this week I think09:51
mhall119I don't think he's blocked, just noticed an error in our docs09:51
=== c74d is now known as Guest61567
asacmhall119: is he willing to join this channel :)?10:06
=== kickinz1 is now known as kickinz1|afk
didrockshey10:12
robert_ancellasac, oh, the PPA was via me. I was reading the docs and assumed it was wrong. You guys were all asleep when I was asking from .nz :)10:13
didrocksasac: so not blocked on that, but we just posted an email to snappy-devel ML with a simple example (even if we have way more questions/wonderings), so as soon as you get some time to look at it… that would be appreciated!10:14
asachey didrocks :)10:15
asacwelcome to the snappy world10:15
* beuno hands didrocks the standard-issue goggles10:17
didrocks:)10:17
=== kickinz1|afk is now known as kickinz1
Chipacamvo: fix for sideload & namespaces messing things up: https://code.launchpad.net/~chipaca/snappy/check-namespaces-on-sideload/+merge/25690410:27
asacjodh: how is self test going?10:44
jodhasac: we're now blocked on a store issue.10:44
asacbeuno: ^10:44
asacjodh: whats the issue in one line?10:44
jodhasac: installing a framework breaks 'snappy search'10:45
asacthats a store problem>10:46
asachmm10:46
asacnessita: ^^10:46
asacJamesTait: ^10:46
jodhasac: Chipaca has raised a MP which is now approved, but needs to be merged + included in an image.10:46
beunoasac, mvo and Chipaca know about it, not a store issue, really10:46
asacjodh: an MP against the store?10:46
beuno:)10:46
asacjodh: ok, please be more precise :)10:46
asacso its a snappy bug10:47
asacChipaca: mvo: i guess you are on it?10:47
jodhasac: it's a store issue or a snappy issue :)10:47
Chipacait's a bug in the system, which includes the client and the store. We've decided to fix it on the client.10:47
Chipacait keeps the parts consistent10:48
asacok10:48
Chipacathat is: the store is self-consistent on this matter, the client is not10:48
Chipacaso it made sense to fix it in the client10:48
asacyeah10:48
Chipacaeven if we could have also fixed it from the store10:48
* JamesTait grabs popcorn10:48
asacmakes sense10:48
asacthanks10:48
ChipacaJamesTait: sorry to disappoint :)10:49
* ogra_ steals JamesTait's popcorn bucket10:50
JamesTaitNot at all, Chipaca, happy to help if it's needed, happy to stand aside otherwise.10:50
ChipacaJamesTait: i meant wrt popcorn :)10:50
* JamesTait throws unpopped kernels at ogra_ and Chipaca.10:51
* JamesTait whistles innocently, points at beuno.10:51
* Chipaca feels he's already thrown enough mock abuse at beuno for a few more minutes still10:53
davmor2Chipaca: you mean there is a limit to the mock abuse you can throw at beuno, why am I the last to learn of this?10:55
Chipacadavmor2: that depends on the acerbity of your abuse10:56
Chipacadavmor2: with me having slept so little, i don't trust myself10:56
davmor2Chipaca: hahahaha10:56
Chipacadavmor2: also, beuno is within range for a lot more weapons than normally10:56
ChipacaI don't think he's within the record sniper 'confirmed kill' range, but it's close10:57
robert_ancellTrying to build a lightdm snap here. First blocker - LightDM needs PAM configuration to work. This requires installing files into /etc/pam.d. How do we do this? Does ubuntu-core need some sort of hook to pull PAM configuration from frameworks that require it?11:16
asacdidrocks: you have to subscribe using your @canonical.com11:36
asacthe other will be unsubscribed11:36
ogra_carzy annoyances :P11:42
dholbachdavidcalle, dpm: I'll look into amending the snappy internal docs for use as guides next11:43
dholbachdavidcalle, dpm: feel free to take any of the other work items11:43
davidcalledholbach, dpm, I'm on the architecure page + diagram11:43
dholbachdavidcalle, excellent - are you going to import any content for that?11:44
didrocksasac: hum, ok :)11:44
davidcalledholbach, from the slides?11:44
dholbachok cool11:44
dholbachthanks a lot11:45
didrocksasac: done11:45
ogra_didrocks, i was pondering to set up a petition to get the (10 years well working) old scheme back for MLs :)11:45
* ogra_ is seriously annoyed by getting half his mails back because he forgets to swithc to the other account11:45
asacmterry: will you be in standup today?11:49
dpmdavidcalle, I was going to pick the WI of modifying the diagram to add the enablement bit. Are you planning on taking that one too? If so, I'll leave it up to you :)11:49
davidcalledpm, I've just finished :)11:49
dpm\o/11:49
* dholbach relocates to the office, brb11:57
davidcalledpm, what do you think? (to me, it works well) https://developer.ubuntu.com/en/snappy/guides/architecture/11:58
dpmdavidcalle, good work. Seems like the "How does it work" row is both on the landing page and the architecture one. Would it not make sense to have it only in one place?12:02
davidcalledpm, right, removing it from architecture12:03
sergiusensdpm: davidcalle you can have an app directly on top of ubuntu core too12:05
dpmdavidcalle, I think after release it might be work redrawing the  "Stack examples" diagrams so that they are more inline with the rest of the site, and have a <h2> section for each one of them12:05
dpmsergiusens, davidcalle, then perhaps we can say "an optional layer of frameworks" in the text?12:07
dholbachdavidcalle, dpm, I'll drop the snappy internals for now12:25
dholbachasac said it'd be good to look at the image channels and stuff first12:25
dpmdholbach, ok12:25
dholbachand the ./start page12:25
dholbachI'll look into writing the content for the channels page12:26
dholbachand then we can take it from there12:26
dpmdholbach, what's there to do in the start page?12:26
dholbach?12:26
dholbachah ok12:26
dholbachwell, the start page contains all the links to all kinds of images12:26
dholbachthere will have to be links or at least mentions of other releases/channels12:26
asacslangasek: would be great if we could get the first prebuilt images done early today so davidcalle and dholbach can put together our nice page to find the right bits and pieces12:28
dpmdholbach, ah, got it now, I wasn't thinking to it in relationship with the image channel links12:31
dpmdholbach, if you need the diagram, here's where I created it back in the day for the devices page: https://docs.google.com/drawings/d/1CxoxNsWGA3r5IS9ZavfSR_QbhlAKE2D9KaCtvL-zM88/edit12:34
dholbachthanks - that's greta12:36
dholbachgreat12:36
mterryasac, I can make sure to be, yeah12:38
asacmterry: great. woudl be nice to get an update and coordinate what and how to bring stuff togethher for release12:39
asacthanks12:39
jdstrandmvo: re docker-- yeah, that's fine, though I'm starting to feel like network-service isn't a useful group-- docker client is not a server yet it needs bind12:42
asacjdstrand: mvo: apps can depend on multiple frameworks right now, correct?12:44
jdstrandthey should be allowed to, yes12:44
mvoyes12:45
dholbachdavidcalle, do you know why there are no margins on https://developer.ubuntu.com/en/snappy/guides/channels/?13:16
* dholbach surely broke something :-P13:17
dholbachdo we have something like -proposed in terms of image creation?14:02
dholbachor is that just 'edge'?14:02
dholbachslangasek, ^14:02
slangasekdholbach: edge, was previously called -proposed14:02
dholbachthanks14:03
sergiusensslangasek: can you look at my man generation mp?14:04
slangaseksergiusens: otp, will be able to later14:05
sergiusensstgraber: btw, if I'm on trusty, is there a ppa for lxc where the download template would have vivid images?14:05
sergiusensty steve14:05
asacsergiusens: what still needs landing before we can featuure freeze?14:06
asacmvo: ?14:06
sergiusensasac: I need some u-d-f stuff; just finished the oem bug work and now moving to autopilot autoreboot14:06
sergiusensasac: the security stuff is still in the works14:06
stgrabersergiusens: ppa:ubuntu-lxc/stable should get you a recent enough lxc for that14:06
sergiusensasac: blocking sideloaded updates14:06
sergiusensstgraber: thanks!14:06
sergiusensasac: and some fixes from Chipaca14:07
asacsergiusens: ok you think we can get those in before EOD and still have a good image to start freeze?14:09
sergiusensasac: well, the security stuff doesn't depend on the team14:10
asacdholbach: so i assume those stack pics will not stay on the channels guides?14:10
asaci think i can use them in the appliance guide ... and maybe we can improve the thing on the architecture inspired by these14:11
mvoasac: we are mostly good, two unapproved branches left, not critical IMO, the launcher needs some further work and discussion with the security team, some real concerns here. worst case is that we need to disable the hardware: assign: feature if there is no solution found14:12
dholbachasac, sure... it's not done yet14:12
dholbachasac, once it is, I'll let you know :)14:12
mvoasac: we also don't hvae a image with the latest ubuntu-snappy, I don't know why, there should be at least one since 418, I wonder if its because of arm64 :/14:13
asacslangasek: ^^14:15
dholbachdpm, davidcalle, can you help me with the styling of https://developer.ubuntu.com/en/snappy/guides/channels/?14:16
asacmvo: 418? i dont have that high numbers14:16
asaci am on 18 or something witjh the new channel names14:16
asacmvo: maybe you are leeching on the old channels?14:16
dpmdholbach, on it14:17
* dholbach hugs dpm14:17
asacjdstrand: can you please think hard how we can make it so that we dont need to disable the hwassign feature?14:17
mvoasac: this is the amd64 image number14:17
jdstrandI'll invite tyhicks to the standup, he did the review14:17
asaci really would prefer a solution than a discussion though.14:18
mvojdstrand: I'm happy to fix it, I just need some input what the best aproach is, maybe we need to brainstorm it from what we need instead of what we have right now14:18
dholbachdpm, nice work - how did you do it?14:20
dholbachdpm, davidcalle: does the text generally make sense to you? :)14:20
dpmdholbach, for Raw HTML, you need to enclose the whole page in <div class="row"></div>14:20
dholbachohoh ok!14:20
dpmdholbach, and then within that row, you can choose how many columns with <div class="eight-col"></div>14:21
dholbachgotcha14:21
tyhicksI'll attend the standup14:21
tyhicksunfortunately, I don't have a solution atm14:21
jdstrandmvo: are you planning another ubuntu-snappy upload? I'd like to drop the reference to apparmor-easyprof-ubuntu-snappy in debian/control. that is gone. easiest is to replace it with ubuntu-core-security-apparmor14:21
jdstrand(note, nothing is broken because ubuntu-core-security-apparmor Provides apparmor-easyprof-ubuntu-snappy)14:22
mvojdstrand: I think I did that already, let me check14:22
mvojdstrand: yep, trunk has no easyprof string anymore AFAICS14:23
jdstrandok, thanks14:23
dholbachmvo, asac: is http://paste.ubuntu.com/10861645/ what we want documented for the ppa?14:26
dholbachjust to be sure :)14:26
asacdholbach: so all tools will be available for trusty,vivid14:51
asac15.04/stable = {trusty,utopic,vivid}/tools14:51
asacas an example14:51
dholbachasac, ok - what is "tools" in this nomenclature - what kind of stability can be expected there - how often is it updated?14:52
dholbachasac, is the note on the right hand side of the webdm page (https://developer.ubuntu.com/en/snappy/guides/webdm/) what you were looking for?14:54
dholbachdpm, davidcalle: do you think we should try to separate the links on https://developer.ubuntu.com/en/snappy/participate/? ie, "articles for hardware enablement", "articles on snappyfication" or "articles about snappy in general"14:59
slangasekmvo: which channel are you looking for the import to happen on?15:00
mvoslangasek: devel-proposed, is that the wrong one?15:02
slangasekI don't know15:03
slangasekI'm asking so I can check :)15:03
slangasekmvo: ubuntu-core/15.04/edge/, last import was Apr 21 9:41 - same as devel-proposed.  So it's not that15:05
sergiusensmvo: I updated the auto reboot branch15:33
dholbachthanks sergiusens!15:36
jdstrandtyhicks: fyi, r35 for ubuntu-core-security16:43
jdstrandtyhicks: (makes the network-* changes we discussed)16:43
tyhicksjdstrand: sorry for the delay - I'm just thinking through that change a little more16:58
tyhicksjdstrand: I thought that you weren't going to add all the permissions to network-client until the socket params were filtered16:59
tyhicksmvo: fyi - I verified that not doing setgroups() is fine in this case17:00
jdstrandtyhicks: heh, obviously I thought they'd be the same except for socketpair17:13
jdstrandtyhicks: that said, if you think there are things that should be in one and not the other, that's fine with me. my understanding coming out of there was that only socketpair is actually server related17:14
jdstranderr17:14
jdstrandserver only17:14
tyhicksjdstrand: what I was trying to say was that an app doing AF_UNIX communication may need many of the things that are in network-service17:15
jdstrandright, which is why I added them to client17:15
tyhicksok17:15
tyhicksI thought that was going to happen after the arg filtering17:15
jdstrandbecause this separation is meant for inet/inet617:15
tyhicksI don't think it makes a big difference though since we plan to do the arg filtering17:16
tyhicksright17:16
tyhicksreally, there is AF_UNIX and AF_INET/AF_INET617:16
tyhicksit is tough to split on client and server since those terms mean different things between those 3 domains17:16
jdstrandtyhicks: the are essentially the same now because I don't want people to ask for network-service now when they don't need it. that way people can add in network-service once we support arg filtering17:17
tyhicksok17:17
jdstrandre tough split> exactly17:17
tyhickswfm17:17
jdstrandI realize there is no practical difference now17:17
tyhicksI'm reviewing the seccomp filter now17:17
jdstrandthis is for establishing the groups for the future17:17
* tyhicks nods17:17
jdstrandtyhicks: re review, thanks17:19
mvothanks tyhicks17:29
mvopitti: is there a API to figure from a libudev device to get if its a block or char device? I'm overlooking something silly probably17:30
pittimvo: no, this is curiously hard to determine17:30
pittimvo: that's why in the PoC I was checking for "/block/" in the device path, otherwise it's a char17:31
mvopitti: ok, thats all I need to know, thanks17:33
pittimvo: that should be pretty safe17:33
jdstrandtyhicks, mvo: fyi, http://paste.ubuntu.com/10862547/17:42
jdstrandupdating the packaging now and will request an MP17:42
jdstrandI think I am going to be more lenient on the uevent rule17:43
jdstrand/sys/devices/**/uevent r,17:43
jdstrandwe can finetune that later if needed17:43
tyhicksjdstrand: wow - nice profile17:47
tyhicks(minus having to include cap_sys_admin)17:47
jdstrandyeah17:47
jdstrandit is what it is17:48
tyhicksjdstrand: oh, were you going to deny transitioning to unconfined?17:48
jdstrandChipaca: that comment was for you ^17:48
jdstrandtyhicks: oh yes, thanks for reminding me17:48
Chipacajdstrand: which comment?17:48
jdstrandChipaca: 'it is what it is'17:48
jdstrandChipaca: I know how much you like that phrase ;)17:48
jdstrand</lame joke>17:49
Chipacain my defence it was a long week and i was somewhat sleep deprived17:49
jdstrandI liked what you had to say about it17:49
jdstrand:)17:50
* Chipaca hopes the memories will come back someday17:54
* Chipaca also hopes he wasn't rude17:54
mvostgraber, tyhicks: hrm, hrm, so after some refactoring it seems like devices.allow is too clever and just having the FD is not good enough, it will deny access, from looking at the source it appears its checking if the task has CAP__SYS_ADIM so the open fd and then do the rest with thta seems to not work (which is really disappointing)17:55
jdstrandChipaca: it was something along the lines of, "Have you ever noticed that when someone says 'it is what it is' it usually means it is sh!+"17:55
jdstrandhehe17:56
jdstrandawesome17:56
stgrabermvo: gah, I hate it when checks are done on write rather than open...17:56
jdstrandjjohansen: heh, can you look at this: http://paste.ubuntu.com/10862602/17:58
Chipacajdstrand: well, i wasn't wrong :)17:58
jdstrandjjohansen: s/heh/hey/17:58
jdstrandChipaca: you weren't! :)17:58
jjohansenjdstrand: sure17:58
jdstrandjjohansen: clearly, that says that I don't want to allow transitioning to unconfined17:58
jdstrandjjohansen: I was thinking I wanted to say "not to unconfined and not to a profile that starts with '/'"17:59
jdstrandjjohansen: but I wasn't sure how to express the alternation18:00
jjohansenjdstrand: yeah that should do it, by why that instead of using a deny?18:00
jdstrandjjohansen: oh heh, yes, that would be considerably cleaner, haha18:00
jdstrandjjohansen: thanks!18:00
* jdstrand grabs brown bag18:00
jjohansendeny change_profile -> {unconfined,/**},18:00
jjohansenchange_profile -> **,18:00
jjohansenjdstrand: so this is one area of the language that could really use some improvements18:01
jdstrandyeah18:01
jjohansenthere are just some things that are really hard to express18:01
jdstrandin this case, the deny rules do a great job18:01
jdstrandjjohansen: change_profile -> **, why the '**'?18:02
jjohansenyeah but if you start doing stuff like that in the deny rule ...18:02
jjohansen* will stop at /  just as with file paths18:02
mvostgraber: yeah, unless there are more smart ideas I think I can not make the critical section smaller18:02
jjohansenyou may not care as they shouldn't be in the names you are allowing18:02
jdstrandjjohansen: so, 'foo' ok, but 'foo/bar', no18:03
jjohansenright18:03
jdstrandthat makes sense18:03
jdstrandok, thanks again18:03
jdstrandtyhicks: did you see mvo's last comment? ^18:03
tyhicksoh, no18:03
jdstrandwhat if we dropped all caps except sys_admin until after the cgroups?18:04
mvojdstrand: let me try that18:04
mvowell, its terrible but better than full root18:04
mvo(well, maybe not, I need to check what is allowed with that)18:05
tyhicksdropping all except sys_admin doesn't gain us much18:05
tyhickslet me look back at the launcher code to see if I have any other ideas18:06
jdstrandjjohansen: hrm, seems we have a parser bug18:09
jjohansenjdstrand: ?18:10
jdstrandjjohansen: all of these give a parser error:18:10
jdstrand#    deny change_profile -> {unconfined,/**},18:10
jdstrand#    deny change_profile -> unconfined,18:10
jdstrand#    deny change_profile -> /**,18:10
jdstrandAppArmor parser error for /home/ubuntu/usr.bin.ubuntu-core-launcher in /home/ubuntu/usr.bin.ubuntu-core-launcher at line 32: syntax error, unexpected TOK_CHANGE_PROFILE, expecting TOK_ID or TOK_MODE or TOK_SET_VAR18:10
jjohansenjdstrand: indeed, and ouch18:12
jdstrandjjohansen: my previous paste works18:12
jjohansenI'll get right on it18:12
jdstrandjjohansen: so, I guess I am back to my previous question on the alternation18:12
jjohansenright, its complaining about deny with change_profile18:12
* jdstrand nods18:12
jdstrandjjohansen: I don't think it is worth an emergency upload. we can SRU the fix18:12
jdstrandjjohansen: I'll file a bug and reference it in the profile18:13
jjohansensure not worth an emergency upload but something to get done18:13
jdstrandI imagine it is a pretty easy fix18:13
jjohansenjdstrand: give me a sec, to paste you it18:13
tyhicksmvo: bummer... I don't see another obvious idea18:14
jjohansenjdstrand: http://paste.ubuntu.com/10862679/18:15
tyhicksmvo: we could temporarily drop, do the udev stuff, regain, write the devices lists, then permanently drop18:16
tyhicksmvo: but I don't know that it gains us much18:16
tyhicksmvo: I'll look at the udev code to see if it is a concern18:16
jdstrandjjohansen: ok, that was what I was thinking. thanks18:18
jdstrandjjohansen: fyi, https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/144679418:18
jjohansenthanks18:18
mvotyhicks: well, drop and regain is not that helpful (from my limited understanding about the security I have). I am playing with libcap right now, but again limited success, I will get the kernel source next to see what its actually checking18:26
mvo"it" being the devices.allow write of course18:26
tyhicksmvo: ah, I'll do that "it"18:26
mterryIf I want to upload a package to the Snappy store, but like on behalf of a team (for example, ~mir-team), how do I do that?  I'm not sure how to not upload just as me18:34
tyhicksmvo: ah, just noticed one more thing - the fclose() ret val needs to be checked in write_string_to_file() since there's not an explicit fflush()18:37
=== mcaley_ is now known as mcaley
tyhicksmvo: when writing to the device cgroup files, devcgroup_update_access() does the real work and it immediately returns an error if 'current' does not have CAP_SYS_ADMIN: http://lxr.free-electrons.com/source/security/device_cgroup.c#L60318:41
tyhicksmvo: there's no way around it :/18:41
mvotyhicks: yeah, I found that too, thanks! I have http://bazaar.launchpad.net/~mvo/ubuntu-core-launcher/drop-root-early-use-caps/revision/45 that drops root earlier, the code is not clean (enough) yet but my brain is a bit fried right now not sure if this is worth it or not18:57
tyhickslooking now19:00
jdstrandmvo: fyi, I'm just about to do a MP for the apparmor profile for ucl19:00
jdstrand(ubuntu-core-launcher)19:00
mvojdstrand: nice, does it work with exotic apps like docker?19:02
mvo(I assume it does :) still curious)19:03
jdstrandI am trying docker right now19:03
jdstrandI missed one rule19:07
* jdstrand is testing now19:07
jdstranddocker itself has an issue:19:11
jdstrandApr 21 19:10:35 localhost kernel: [22039.617003] audit: type=1400 audit(1429643435.305:104): apparmor="DENIED" operation="file_mprotect" profile="docker_docker-daemon_1.6.0.001" name="/bin/bash" pid=1886 comm="docker.start" requested_mask="r" denied_mask="r" fsuid=0 ouid=019:11
tyhicksmvo: I think that patch does help19:13
* jdstrand fixes docker19:14
tyhicksmvo: I haven't went through all of the cap_*() calls closely but I understand what you're doing19:14
mvotyhicks: ok, I will take a break and either do the cleanup now or tomorrow morning, plus new tests, the old approach is no longer working but I have a plan for new tests19:15
mvotyhicks: and THANKS for your help with this!19:16
mvomuch appreciate the feedback I got19:16
tyhicksmvo: thanks for the quick turnaround on everything! :)19:16
jdstrandmvo: https://code.launchpad.net/~jdstrand/ubuntu-core-launcher/ubuntu-core-launcher.aa-profile/+merge/25699219:16
jdstrandmvo: if you are using libcap, the profile will need to be updated19:16
tyhicksmvo: I'll go back through the list and verify that everything has been done and, if necessary, propose some changes for you19:16
tyhickss/everything/everything important/19:17
jdstrandmvo: (it should be easy to see what needs to be done, but I/tyhicks can also help)19:17
jdstrandah meh, conflict19:17
* jdstrand resolves19:17
jdstrandthese branches are moving to fast :)19:17
jdstrand(it's just the changelog)19:18
jdstrandtyhicks: here is the final profile: https://code.launchpad.net/~jdstrand/ubuntu-core-launcher/ubuntu-core-launcher.aa-profile/+merge/25699219:22
jdstrandmvo: ok, that ^ is ready to pull in (obviously update as necessary for your changes)19:23
tyhicksjdstrand: looks good19:25
* jdstrand uploads docker with the small profile change19:31
jdstrandkickinz1: fyi ^19:32
jdstrandkickinz1: committed to the branch19:32
jdstrandkickinz1: can you delete ./package-dir/meta/docker-daemon.*priv now that they are no longer needed?19:33
mvojdstrand: thanks, uploaded! hints what the libcap branch needs for apparmor would be great (ideally by mail). I will check in my morning (in +8h) and continue on the capability branch19:50
kickinz1jdstrand: I'll do20:02
asaclool: still around?20:04
asaclool: do you have the code for the demo that displays stuff on the mini LED screen still?20:04
jdstrandkickinz1: thanks!20:09
jdstrandtyhicks: fyi, r37 of ubuntu-core-security20:19
jdstrand(added capget)20:19
kickinz1jdstrand: done, but I will try uploading when owncloud package is somehow working, caus I think it will need some apparmor adjustment (bind mounts).20:22
tyhicksjdstrand: ack - are you ok with me explicitly denying umount and umount2?20:22
jdstrandtyhicks: yes20:23
tyhickspushed20:23
jdstrandtyhicks: are you ok with my doing the same in apparmor? :)20:24
tyhicksjdstrand: yes :)20:24
tyhicksjdstrand: don't forget about remount in apparmor (it is a separate rule)20:24
jdstrandright, done20:27
jdstrandand pushed20:27
jdstrandubuntu-core-security 15.04.6 pushed to the image ppa20:32
jdstrandkickinz1: you are going to need that ^ for docker to work correctly20:32
kickinz1jdstrand: ok, thanks.20:35
asacjdstrand: you know what is left still?20:35
asacfor mvo :20:35
jdstrandasac: a few finish touches on the launcher20:36
jdstrandfinishing*20:36
asachmm20:36
asacwhat needs doing?20:36
jdstrandthe last bits from the security review20:36
jdstrandaiui20:36
jdstrandthere was a snag with passing fds (it didn't work), so an alternate implementation that wasn't as comprehensive is being done20:37
jdstrandthe apparmor profile bits are in the image ppa20:37
asacok, what hints is he waiting for>20:37
asac?20:37
jdstrand(ie, ubuntu-core-launcher runs under the profile)20:37
jdstrandnone20:37
asac21:50 < mvo> jdstrand: thanks, uploaded! hints what the libcap branch needs for apparmor would be great (ideally by mail). I will check in my morning (in +8h) and continue on the capability branch20:37
jdstrandoh, that20:38
jdstrandI sent that to him already20:38
asack20:38
jdstrandit is just how to update the aforementioned profile for if he uses libcap20:38
asacsergiusens: so on my image sshd is not started by default20:39
asacsergiusens: ignore... let me recreate20:39
asacnot 100% sure i --enable-ssh20:39
kickinz1jdstrand: so I need a new image? Which revision ?20:40
sergiusensasac: if you wait for the publisher to finish maybe try the latest u-d-f? But it does need a new image build as snappy list is broken20:41
jdstrandkickinz1: it isn't on the image yet. you can grab a new image, then do: sudo mount -o remount,rw / ; sudo dpkg -i /tmp/*.deb ; sudo mount -o remount,ro /20:41
jdstrandkickinz1: pull the 3 ubuntu-core-security packages from https://launchpad.net/~snappy-dev/+archive/ubuntu/image/+packages20:42
jdstrandkickinz1: note, I am getting non-apparmor/seccomp error when doing 'docker pull ubuntu:trusty'20:42
jdstrandkickinz1: I was going to follow what is in framework-policy/apparmor/policygroups/client, but the docker repo seems broken20:42
jdstrandsudo docker pull ubuntu:trusty20:44
jdstrand...20:44
asacsergiusens: from trusty20:44
jdstrandError pulling image (trusty) from ubuntu, Untar exit status 1 operation not permitted Untar exit status 1 operation not permitted20:44
jdstrandmaybe it isn't their repo20:44
asacsergiusens: ppa?20:44
jdstrandbut no denials of any kind20:44
jdstrandkickinz1: anyway, I have to step away for a little while. I'll be back later20:45
asacsergiusens: getting 0.20snappy7-0ubuntu1 and will redo the flash20:45
kickinz1jdstrand, trying locally (out of snappy) to check (pull ubuntu:trusty)20:45
asacsergiusens: which channel?20:46
asacsergiusens: 15.04 edge?20:46
* asac thinks we still work on rolling/edge until we cut it20:46
asacsergiusens: this is what i am now dd'ing https://pastebin.canonical.com/130045/20:47
asacor open paste: http://paste.ubuntu.com/10863294/20:47
kickinz1jdstrand: ubuntu-core-{launcher,meta,security}?20:47
kickinz1jdstrand: ok, sorry20:48
asacsergiusens: still have invalid package on system :/20:54
asacsergiusens: system-image-cli -i20:55
asaccurrent build number: 1820:55
asacdevice name: generic_armhf20:55
asacchannel: ubuntu-core/rolling/edge20:55
asaclast update: 2015-04-21 18:27:4420:55
asacversion version: 1820:55
asacversion ubuntu: 20150421.A20:55
asacversion raw-device: 20150421.A20:55
asacsergiusens: this doesnt help me much20:56
asacsergiusens: yuou say w eneed a new image build>?20:56
asacdo we have the fix landed?20:56
asacslangasek: https://launchpad.net/~snappy-dev/+archive/ubuntu/image this ppa is in theory in image?20:58
slangasekin practice, not just in theory20:59
slangasekthe next scheduled image livecd-rootfs build is in 56 minutes; after which we need to again mangle for importing21:00
asacok copied the snappy binary :)21:00
asacit works21:00
asaci love go :P21:00
asacok the launcher seems to be old style21:01
asacjdstrand: hello-world.env21:06
asacBad system call21:06
asacthats the problem?21:06
* asac reboots21:06
sergiusensasac: yes; you need snappy trunk21:07
sergiusensasac: and your u-d-f command was good21:07
sergiusensslangasek: asac  can we trigger a build sooner?21:07
asaci would love to see whats in21:08
asacright now i feel its broken21:08
asacbut maybe my copying didnt do the good thing21:08
asacslangasek: sergiusens: ok if we kick an image?21:08
asacgiven that we have to mangle once anyway :)21:09
asacit would help us getting answers sooner21:09
slangasekyes21:09
slangasektriggered21:09
asacgratias21:09
asachmm. guess i need the new -security package21:10
asacto get the syscall problem above eliminated21:10
asacok, i am sure all is fine its relly just installing that swecuerity stuff21:11
kickinz1jdstrand: on r404, installed debs + install docker, seems to work. r419: no way, same error as you.21:31
kickinz1jdstrand: put docker in debug mode, not much more info...21:31
kickinz1jdstrand: seems related to auplink. Does auplink need some seccomp profile?21:33
asackickinz1: whats the error you see?21:42
kickinz1asac; same as jdstrand: FATA[0016] Error pulling image (latest) from cirros, Untar exit status 1 operation not permitted21:47
kickinz1asac: I put docker on debug mode, same message, I'm trying to strace, no better info...21:48
kickinz1asac: last traces from strace:21:48
kickinz1asac: http://paste.ubuntu.com/10863526/21:48
kickinz1asac: on, r404, all clear...21:50
asackickinz1: i am on r22 :/21:53
asackickinz1: how do you produce the image?21:53
kickinz1I made a little script.21:54
kickinz1asac; r22 on amd64?21:54
kickinz1asac: r22 -> bbb?21:54
asacno on amd6421:55
asackickinz1: how do you produce the image?21:55
asacor is it an upgraded one?21:55
kickinz1asac: generated one: http://paste.ubuntu.com/10863556/21:55
sergiusenskickinz1: heh, keyboard layout is killed on the latest images21:56
sergiusenskickinz1: are you using ppa:snappy-dev/tools?21:56
kickinz1sergiusens, for building?21:57
sergiusenskickinz1: yeah21:57
asacslangasek: ready for a manual mangling?21:57
kickinz1sergiusens, no I'm using snappy bin from images (I may not use the r419 though)21:57
* asac hopes new image is ready now21:57
sergiusenskickinz1: sorry, I meant u-d-f21:57
slangasekasac: yes, doing21:58
asackickinz1: this is revision for snappy tool?21:58
* asac confused... i cannot install anything with that high numbers after our channel redo21:58
asacgreat21:58
sergiusensasac: they are using --channel ubuntu-core/devel-proposed21:58
kickinz1asac: I take snappy from images for building, I think the last one I took was from r404.21:59
asacsergiusens: that doesnt even work for me21:59
asacsergiusens: guess only in beta ppa that works?21:59
sergiusensasac: they are using an old u-d-f21:59
sergiusensasac: yeah or no apt update21:59
asacwell, lets wait for next image21:59
asachope thats useful21:59
asacguess we can only hope that things really came together21:59
* asac reboots22:00
kickinz1sergiusens, I use dnappy-dev/beta yes22:00
kickinz1sergiusens, ok, I update...22:01
sergiusensslangasek: I think this is what we need https://code.launchpad.net/~sergiusens/snappy/conflictsPackaging/+merge/25700822:03
kickinz1so if updated, I can build without getting snappy from images?22:06
kickinz1sergiusens, ^22:06
kickinz1sergiusens, I have updated I still get r419... What am I doing wrong?22:13
sergiusenskickinz1: add-apt-repository ppa:snappy-dev/tools ?22:19
kickinz1sergiusens, sorry...22:22
jdstrandkickinz1: you should see seccomp denials if that was it. besides, you are using @unrestricted in the docker-daemon seccomp filter so no seccomp filters (ie, it shouldn't be seccomp)22:24
asacok getting 23 it seems22:24
asaclets see22:24
jdstrandkickinz1: thinking about it, I bet it is the cgroups22:24
jdstranda) docker hasn't been assigned any hardware and b) I doubt it would work with our cgroups implementation22:25
jdstrandbecause docker already does stuff with cgroups22:25
jdstrand(docker really is not a great first framework-- literally everything is an exception)22:26
asackickinz1: ok i think 23 might be better... :) lets see22:26
asacat least i can install docker22:26
kickinz1the pb is to docker run -it ubuntu.22:27
jdstrandkickinz1: my feeling is we either need a way to flag the launcher that it shouldn't do anything but aa_change_onexec (ie, aa-exec) or special case docker in bin-path so it uses the old aa-exec22:27
* jdstrand tests by modifying the systemd unit22:28
jdstrandit's the launcher22:31
jdstrandI'm going to send mvo an email and CC you guys22:31
kickinz1jdstrand: thanks22:31
asacjdstrand: still get bad system call22:32
asacon 2322:32
asaclatest image22:32
jdstrandasac: is that capget?22:32
jdstrandyou need ubuntu-core-security-seccomp 15.04.622:33
asacjdstrand: ok good news is that the apps seems to work now22:33
asacat least the hello-world.echo22:33
asacdocker images fails with bad system call though22:33
jdstrandright22:33
jdstrandyes, that is fixed22:33
asacjdstrand: docker?22:33
jdstrandwhat kickinz1 and I are talking about is something different22:33
asacline 11: 1218 Bad system call ...22:33
asacselect_bin ddocker22:33
jdstrandyes, 15.04.6 fixes the syscall22:33
asacetc.22:33
asacjdstrand: thats fixed?22:33
asachmm22:33
asacso we need yet another image?22:34
jdstrandselect_bin?22:34
asacjdstrand: which package?22:34
jdstrandwhat arch is that?22:34
asacamd6422:34
asacjdstrand: we spun an image after the most reent ppa upload22:34
jdstrandcan I see the syslog entry?22:34
asacok22:34
asachmm22:34
asachave to forward port22:34
asacjdstrand: Apr 21 22:36:43 localhost kernel: [   66.568721] audit_printk_skb: 12 callbacks suppressed22:36
asacApr 21 22:36:43 localhost kernel: [   66.568724] audit: type=1326 audit(1429655803.718:15): auid=1000 uid=1000 gid=1000 ses=1 pid=905 comm="docker.x86_64" exe="/apps/docker/1.6.0.002/bin/docker.x86_64" sig=31 arch=c000003e syscall=228 compat=0 ip=0x7ffc8e52cb4d code=0x022:36
asacthats the thing i get when i run docker iamges22:36
asac22822:37
asacprobably select_bin22:37
asachehe22:37
jdstrandsyscall=228(clock_gettime)22:41
jdstrandI can adjust that22:42
jdstrandfyi, sudo sc-logresolve /var/log/syslog22:42
jdstrandemail on docker sent22:44
asacjdstrand: ?22:44
jdstrandI will fix that ^ seccomp denial a bit later22:44
jdstrandasac: I sent it to you too22:44
jdstrandI have to step away again for a few minutes22:44
asackickinz1: what /dev nodes does docker access?22:52
asackickinz1: can you strace the command on a normal ubuntu system?22:52
asacvivid?22:52
asacto see?22:52
kickinz1asac: ok22:52
kickinz1asac:22:55
kickinz1asac, http://paste.ubuntu.com/10863741/22:55
asacjdstrand: its not clear to me why you have no problems22:59
* kickinz1 going to bed...23:00
asackickinz1: i mean i have the latest image i think23:00
kickinz1asac: ok, do you want me to test?23:00
asacorr23:00
asacerr23:00
asacsorry23:00
asackickinz1: no23:00
asaci meant jdstrand23:01
asacsleep well23:01
asacand see you tomnorrow23:01
asacslangasek: do you know if ubuntu-core-security15.04.6 is on latest image?23:01
kickinz1asac: ok, will be around for a few minutes still but not too long (pb with uploading owncloud image armhf to docker registry)23:01
asacjdstrand: i clearly have 15.04.623:02
kickinz1asac: for now I've created a docker image for ubuntu:trusty for armhf (I'll change to vivid as soon as everything else works)23:02
asacguess you say its working on bbb?23:02
slangasekasac: yes, ubuntu-core-security 15.04.6 is in the latest images on edge (except arm64)23:03
asacok i did my first seccomp hackery23:09
asacenabled clocktime23:09
asacand now i can runn docker iamges23:09
asacand i am docker pulling23:10
asackickinz1: any idea what it untars at the end?23:10
asacFATA[0032] Error pulling image (trusty) from ubuntu, Untar exit status 1 operation not permitted23:11
jdstrandasac: that's fine. it is interesting that you are seeing that seccomp denial in the client where I didn't, but I didn't have a chance to test a lot of it due to the daemon not working well with the launcher23:13
kickinz1asac: it downloads layers of the image, and then it untar it. It is pulling fgood from registry, and tars are in /var/lib/apps/docker/.tmp/..../xxx/xxx.tar, then it decompresses it, and it must populate /var/lib/apps/docker/aufs with them23:13
jdstrandI will prepare 15.04.723:13
kickinz1ls23:14
jdstrandwe need to not try to fix the launcher for docker at this time and just special case it23:14
jdstrandif someone wrote a framework for snappy that needed the kinds of perms and did the kinds of things that docker is doing we would almost certainly say 'no'. this is a special case. let's special case it in the easiest way possible now and then see how to deal with this sort of thing going forward23:15
asacyeah maybe23:17
asackickinz1: how can i get logs for docker?23:17
kickinz1asac, just systemctl stop docker_.... then sudo vi /apps/docker/current/bin/docker.start and uncomment the DEBUG="-D" line23:18
kickinz1asac, then restart daemon, it will logs to journalctl23:18
kickinz1asac: really going23:18
asacbye23:19
=== kickinz1 is now known as kickinz1|afk
asacjdstrand: what does docker appamrmor get access to in /dev ?23:32
jdstrandasac: in 'unprivileged' mode: http://paste.ubuntu.com/10863849/23:35
jdstrandasac: note, most of those are directories, it is just the first 6 lines and the last that are actual files23:35
jdstrandasac: however, in 'privileged' mode, it has all of /dev23:35
jdstrandit defaults to unprivileged. there is a command to toggle privileged23:36
jdstranddocker has the ability to assign hardware to app containers23:36
jdstrand(which in our snap is reserved for privileged mode)23:37
asacjdstrand: right. so still dont get whats going on here... do we know that the devnodes that you pasted are really avail there?23:50
jdstrandasac: what we know is that docker fails to run without them23:51
jdstranddocker was not designed for snappy and we are shoehorning it into a framework23:52
asacjdstrand: hmm23:52
asacjdstrand: so with new launcher those defaults are not getting mapped in?23:52
jdstranddon't get me wrong, it is useful for people, but its design is not in line with snappy23:52
jdstrandasac: I don't know why the launcher is breaking docker23:52
jdstrandasac: I imagine that it is going to be whack-a-mole23:53
asacjdstrand: right, but do the devnodes get mapped into the launcher cgroup?23:53
jdstrandie, we give the devices then it breaks cause of how it uses cgroups23:53
jdstrandasac: nothing is doing that mapping atm because there is no oem snap that sets those up. even if it did, the udev rule for docker privileged mode would be 'tag everything for docker'23:54
asacjdstrand: right i get that23:54
asacjdstrand: can i use hwassign to try doing those dev nodes?23:54
asachttp://paste.ubuntu.com/10863849/23:54
asacthose23:54
asaci guess i would have to do a find on all those directories :)23:55
jdstrandas it turns out, no. the command line hw-assign works only with templated policy atm, not hand-crafted policy like docker-daemon has23:55
jdstrandthis is in my personal backlog (there is no trello card)23:56
jdstrandif that is deemed important, it can be SRUd23:56
* jdstrand adds a trello card23:57
jdstrandasac: but, cli hw-assign doesn't do the udev stuff. it only adds rules to apparmor policy. as such, with the cgroups implementation, it is currently broken23:59
* jdstrand just realizes that and adds a trello card23:59

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