Monday, 2015-11-30

*** openstack has joined #openstack-kuryr14:36
*** openstack has joined #openstack-kuryr15:44
*** lezbar has joined #openstack-kuryr15:48
*** salv-orlando has joined #openstack-kuryr15:49
*** irenab has joined #openstack-kuryr16:12
*** apuimedo has quit IRC16:20
*** apuimedo_ has joined #openstack-kuryr16:45
apuimedo_ajo: ping16:45
ajohi apuimedo_  :)16:46
apuimedo_I have something ugly to show you16:46
apuimedo_:-)16:46
apuimedo_related to running kuryr/neutron agents as a regular users but still be able to perform the root operations16:47
apuimedo_ajo: http://paste.openstack.org/show/480398/16:50
apuimedo_gcc -I/usr/include/python2.7 -lpython2.7 test_python.c -o test_python16:50
apuimedo_and then just16:50
apuimedo_`sudo setcap cap_net_admin=eip test_python`16:51
apuimedo_;-)16:51
apuimedo_I tried it with something not neutron obviously16:51
apuimedo_http://paste.openstack.org/show/480400/16:52
apuimedo_ajo: http://paste.openstack.org/show/480401/16:53
apuimedo_mestery: what do you think of the above?16:53
apuimedo_salv-orlando: ^^16:53
apuimedo_I'll admit it's a bit hacky to have a small C launcher16:54
apuimedo_but it is much simpler than to have an all privileges daemon server with interop16:54
ajoapuimedo_ , it would be for the neutron-*-agent right?16:55
mesteryapuimedo_: The general direction is the privsep work that gus is doing16:55
mesterySo my advice is we utilize that :)(16:55
ajomestery : that was the idea to avoid privsep at all16:55
ajomestery , since our case is simpler than other services16:55
apuimedo_yes16:55
ajowe're comfortable with "network confined"16:56
mesteryajo: OK, if that makes sense, then sure :)16:56
apuimedo_neutron agents16:56
mesteryOK16:56
mesterycool16:56
ajomestery , apuimedo_ , but I'd understand we need to test it with the agents, remove sudo, and check that all works, right?16:56
apuimedo_ajo: yes16:56
apuimedo_so if you have time, give it a shot with some agent16:56
apuimedo_I'll try with kuryr16:56
ajoapuimedo_ , I'm a bit swamped now, but I will try to find a slot16:57
ajoduring this week16:57
apuimedo_ajo: no problem. You have the sample now ;-16:57
apuimedo_ajo: no problem. You have the sample now ;-)16:57
ajo:D16:57
apuimedo_The other alternative is to have systemd start the agents with root16:57
ajoapuimedo_ , if we have a wrapper16:58
apuimedo_and then in python drop the privileges and change user16:58
apuimedo_but I think this is simpler16:58
ajosetcap does set the capabilities on the binary/filesystem?16:58
* apuimedo_ doesn't like when root reaches python16:58
ajoor does start the binary ?16:58
ajo(I'm new to this) ;)16:58
apuimedo_setcap sets attributes on the fs16:58
ajoah, cool16:58
apuimedo_there may be some fs that does not support it16:58
apuimedo_for example running on fat3216:58
apuimedo_:P16:58
ajowell16:59
ajoI'd say, OS on fat32 is unsupported16:59
ajo:)16:59
* ajo copies & pastes on a notepad16:59
apuimedo_;-)16:59
*** devvesa has quit IRC17:04
*** salv-orl_ has joined #openstack-kuryr17:08
salv-orl_apuimedo_: but by mentioning "systemd" you are making a quasi-religious assertion17:10
salv-orl_;)17:10
apuimedo_that's why I made a solution that does not need it17:11
apuimedo_salv-orl_: even if I'm on team systemd17:11
apuimedo_Arch linux17:11
*** salv-orlando has quit IRC17:11
salv-orl_apuimedo_: anyway, are you considering setcap a viable alternative to rootwrap and the privsep stuff that will come?17:13
*** apuimedo has joined #openstack-kuryr17:13
*** apuimedo_ has quit IRC17:14
apuimedosalv-orl_: I'm wondering about that17:14
apuimedoI have to see how much it conflicts with packaging and what's the distro position on that17:14
apuimedoI've lived in a Python privsep world17:14
salv-orl_apuimedo: was it a good place to be in?17:15
apuimedooVirt's vdsm works like that (vdsm server and supervdsm, the priv one)17:15
apuimedodebugging sucks17:15
apuimedoit's not like the current state with eventlet debugging is paradise17:16
apuimedobut then, it would be worse, because you have to attach debuggers on both servers sometimes17:16
salv-orl_does debugging suck because there are two different processes, one with standard priviliges and one with full privilges?17:16
apuimedootherwise you get timeouts and silliness17:16
apuimedobecause of the multi process17:16
salv-orl_yuo17:16
salv-orl_yup17:16
apuimedosometimes silliness in the serialization17:16
apuimedoI didn't follow the OSt privsep much17:17
apuimedowhich serialization are we gonna use?17:17
salv-orl_Yeah, serialization is the only concern I have honestly17:17
apuimedosalv-orl_: lack of serialization for exceptions always pissed me off17:17
apuimedoyou'd get a serialization exception17:17
*** gsagie_ has joined #openstack-kuryr17:17
salv-orl_I think these issues will be addressed, but I have no idea how17:18
apuimedoand you would be a while wondering if the exception was serialization, or it was an exception that crashed the serializer17:18
salv-orl_anyway, with setcap we probably might still have similar problems. How do you attach a debugger to the python routine that runs with setcap?17:19
salv-orl_Forgive me for the silly questions.17:19
salv-orl_My debugger is a print17:19
salv-orl_printf17:19
apuimedosalv-orl_: the whole agent or the whole kuryr runs with the privileges17:19
apuimedoso you just attach normally to the daemon17:19
apuimedoputting ipdb.set_trace on the script17:20
apuimedoor you can make the launcher have a -d flag17:20
apuimedoto start with the debugger17:20
apuimedosalv-orl_: unfortunately many times I had to even use gdb for python debugging17:20
apuimedonasty ctypes problems17:20
apuimedowhen using multiple threads17:21
apuimedoit's fun though. The latest gdb python plugin is quite good17:22
openstackgerritMohammad Banikazemi proposed openstack/kuryr: Adding support for Discovery calls  https://review.openstack.org/24597817:26
*** gsagie_ has quit IRC17:29
*** salv-orl_ has quit IRC17:56
*** salv-orlando has joined #openstack-kuryr17:57
*** salv-orlando has quit IRC18:01
*** itsuugo has quit IRC18:40
*** itsuugo has joined #openstack-kuryr18:41
*** salv-orlando has joined #openstack-kuryr18:57
*** salv-orlando has quit IRC19:19
*** salv-orlando has joined #openstack-kuryr19:20
*** salv-orlando has quit IRC20:35
*** salv-orlando has joined #openstack-kuryr20:35
openstackgerritMohammad Banikazemi proposed openstack/kuryr: Completing the basic configuration for Kuryr  https://review.openstack.org/25153220:38
openstackgerritMohammad Banikazemi proposed openstack/kuryr: Completing the basic configuration for Kuryr  https://review.openstack.org/25153221:22

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