14:30:45 #startmeeting rolekit (2016-01-05) 14:30:45 Meeting started Tue Jan 5 14:30:45 2016 UTC. The chair is sgallagh. Information about MeetBot at http://wiki.debian.org/MeetBot. 14:30:45 Useful Commands: #action #agreed #halp #info #idea #link #topic. 14:30:45 The meeting name has been set to 'rolekit_(2016-01-05)' 14:30:45 #meetingname rolekitweekly 14:30:45 #chair sgallagh twoerner nilsph 14:30:45 #topic init process 14:30:45 The meeting name has been set to 'rolekitweekly' 14:30:45 Current chairs: nilsph sgallagh twoerner 14:30:51 .hello twoerner 14:30:53 twoerner: twoerner 'Thomas Woerner' 14:30:54 Happy New Year, rolekitters 14:30:59 rolekittens? 14:31:10 rolekites? 14:31:18 hmmm... 14:31:25 Happy new year 14:31:28 .hello nphilipp 14:31:29 nils: nphilipp 'Nils Philippsen' 14:31:56 rolecritters? 14:32:18 nils++ 14:32:19 hide the water 14:32:50 #topic Agenda 14:33:41 OK, so I don't have much of a formal agenda this week 14:33:51 twoerner wanted to discuss firewalling 14:34:00 yes, this is on my agenda 14:34:04 #info Agenda Item: Firewall management in rolekit 14:34:24 I am not sure about the final decisions on firewall management in rolekit 14:34:29 nils: Do you want to talk again about your third-party role creation work? 14:35:35 yeah, I wanted you guys to look at how I want to implement role parameters/settings. 14:35:53 I have some code, but it doesn't work yet :) 14:35:54 #topic Agenda Item: Third-party Role Creation 14:35:55 ok.. this interferes with the firewall work 14:35:59 yes 14:36:09 OK, do we want to cover this in reverse order, then? 14:36:15 another reason why I wanted you to pass this by you 14:36:21 yes, please 14:36:33 #topic Third-Party Role Creation 14:36:43 #undo 14:36:43 Removing item from minutes: 14:36:45 #undo 14:36:45 Removing item from minutes: 14:36:50 #info Agenda Item: Third-party Role Creation 14:36:52 #topic Third-Party Role Creation 14:37:01 nils: You have the floor 14:37:45 okay, so here's how imagine what I'm working on should be used, i.e. when writing a Role class: https://gist.github.com/nphilipp/2f3c533ba4e22c4301e2 14:39:03 every new parameter gets defined on the class as a RoleParam (RoleParamList, RoleParameters) object. Values can be simply set on child classes without giving that fact much attention (see the database Role example) 14:40:40 I'd also like to differentiate a bit between real settings and "state" variables (like "lasterror", "state", ...) which are more tied to the internal implementation and not to how a user deals with a role. 14:41:47 how do you plan to differentiate? 14:41:51 One thing I didn't particularly like about the old way of things was that you had to set both ports and services of firewall, even if one of both was empty. 14:42:02 But I guess we'll discuss changes there later :). 14:42:43 nils: Will RoleParam accept a validator function as well? 14:43:04 twoerner: one way could be to have different classes for each, e.g. RoleParam and RoleVariable. Both would be (de)serialized to and from JSON, but only Params would be displayed to the user. 14:43:16 sgallagh: yes, that's my intention 14:43:42 nils: I think that would be better than the minval/maxval stuff, for example. 14:43:48 We could provide a couple standard validators 14:43:51 sgallagh: I called it constraint, but so far nothing regarding names is very much set in stone :) 14:44:00 ahh yes 14:44:03 Constraint is fine. 14:44:17 validator is fine, too 14:44:32 I have no real preference. 14:44:42 twoerner: Break the tie? ;-) 14:44:51 nils: what means sensitive here? 14:44:54 Or come up with a third name :o) 14:45:03 visible like in UIs? 14:45:06 twoerner: sensitive data that can be scrubbed from the instance, like a password 14:45:07 twoerner: I am assuming it means "things that would be cleared when sanitize() is called" 14:45:13 yep 14:45:46 why not using sanitizable then? 14:45:59 then it would match with name 14:46:17 twoerner: I think I like 'sensitive' better here, actually. 14:46:21 Because it implies two things: 14:46:22 I don't think "sanitizable" is very descriptive or intuitive. 14:46:36 1) If passed in explicitly, it won't be saved to the settings.json 14:46:45 2) If auto-generated, it will be cleared by sanitize() 14:46:52 yes 14:47:10 ok 14:47:49 there will be mutators that will automatically update the settings.json file on insensitive changes? 14:48:00 note to self: need to differentiate between auto-generated and explicitly set "sensitive" data 14:48:02 twoerner: Sorry, can you give an example? 14:49:57 most of the firewall setting will be writeable later on to make port changes or assignments possible. Will self.firewall["ports"]["tcp"] = 23 automatically update the settings.json file? 14:51:31 or will it be needed to call the self.write_settings() or similar? 14:51:57 twoerner: Well, we only call write_settings() at the end of processing for a call 14:52:12 We don't do it midway through a deploy(), for example 14:52:40 I haven't thought about how it should be done. I think it's better to explicitly write (once), rather than write every time a setting is touched. 14:52:59 Well, write once per D-BUS call at least. 14:53:14 if we have more dynamic ports I need to make sure that the changes, that I have done already are saved somewhere even in case of roled dying to be able to revert again 14:53:17 If we decide to add a ModifyFirewall() method, for example... 14:53:20 ...that changed something. 14:54:00 but we might ignore this also 14:54:30 twoerner: In an ideal world, I think we'd have rolekit create a custom chain and, upon startup, ensure that the running chain matches what rolekit thinks it is 14:54:42 That way if it crashed partway through processing, it would at least restore the old state 14:55:59 ok.. I think I like the new settings 14:56:13 now I only need to get them working 14:56:15 :) 14:56:35 ok... one more 14:56:53 if I change a setting, is there a way to get the default back again? 14:57:33 is there a default value at all? 14:57:58 I thought about that, and there are a couple of ways the API could look like. 14:57:59 I can see it for database 14:58:28 For instance, an explicit method: somerole.someparam.unset() 14:58:40 but the question is if services = "postgresql.service" is seen as a default 14:58:54 in the database role 14:59:01 which would make it unset, using/setting the default value next time it is accessed. 14:59:47 that parameter is read only (and should probably one of the "differentiated as not user-settable" things) 14:59:58 IIRC 14:59:59 I think 'services' by the way is going to go away. 15:00:10 We don't actually use that for anything anymore 15:00:23 ok 15:00:25 Because it isn't interesting to the end-user. 15:00:43 I just tried to "translate" what I found on RoleBase and the database role into the API I had in mind. 15:00:48 It gives them no information and is always handled by the role-rolename-roleinstance.target file 15:01:11 But it is something a role developer would set, yes? 15:01:31 A better example of course would be the default port for a service 15:01:41 Right. 15:01:43 yes 15:01:44 nils: It's something that would realistically be hard-coded into the role definition 15:02:11 but something we should serialize into the settings.json of the role, right? 15:02:16 nils: No 15:02:33 That was what I meant by having it go away 15:02:45 if it has been applied, then yes. no? 15:03:02 Hmm, what if a future role version uses different services? We want to be able to decommission the old instance, don't we? 15:04:01 nils: That information is managed by the role.target file 15:04:18 Yeah, we can query that via systemd. 15:04:32 If we need to. 15:04:36 We don't actually need to query it; we just stop the role.target and the appropriate services are also stopped 15:05:01 And if we remove the instance, we remove the role target file. Right. 15:05:06 Precisely 15:07:28 nils: I think there is a missing _gen in default=_database_default, right? 15:07:35 or am I missing somehting? 15:07:46 twoerner: probably, it's not working code :) 15:07:54 nils: ok :-) 15:08:27 nils: there will also be something like settings.is_default()? 15:08:58 I think there will have to be, in order to ensure that we know which settings can be sanitized too 15:09:06 yes 15:09:59 and also accessors for the parmameter options like readonly etc 15:10:01 that's easily done 15:10:20 that would simply be `role.setting.` ;) 15:10:34 great 15:10:54 OK, so I think we're all on board with this new approach 15:11:15 `role.setting` would be a RoleSetting/Param object and act as a descriptor for getting/setting/unsetting 15:11:31 that's the idea anyway 15:12:07 ok.. looks good to me 15:12:08 I need to see where the descriptor use case and "normal member" use case clash 15:12:22 but I'm positive that there's a way to accommodate both 15:13:06 and it should be possible to register the parameters as dbus properties 15:13:30 for instance, if you want to deal with the actual values, you're working on the instance object, and if you want to find out stuff of the settings/param class, then work on the class. 15:13:34 Yes. 15:13:39 are all registered automatically or only by setting an option like dbus=True 15:13:58 the semantics should be: user-settable, yes or no 15:14:15 or "interesting to the user" or whatever 15:14:28 and then it should at least be readable from the bus 15:14:37 (depending on readonly) 15:15:23 do we want to have parameters that are not exported over dbus in any way? 15:15:37 s/over/to/ 15:16:33 I think we have those too 15:16:34 I don't know, internal book-keeping stuff? implementation details? 15:17:11 stuff like that I really want to have separate from a) role settings and b) role state 15:17:19 or maybe also not.. need to have a look at the code 15:17:22 yes 15:17:32 I'm bound to trip over it sooner or later anyway :) 15:17:57 nils: yes :-) 15:19:37 ok 15:19:47 do we have time for the firewall stuff still? 15:20:18 yes as far as I'm concerned. sgallagh? 15:21:00 Fine by me. 15:21:04 nils, sgallagh: do you have more to discuss about the parameters? 15:21:05 #topic Firewall management 15:21:31 No, I think we need nils to get a prototype working and we'll adjust from there 15:21:37 yup 15:21:41 ok, good 15:22:04 I will also need parts of this as a base for the firewall stuff I think 15:22:49 especially default vs. role deployment setting 15:23:53 sgallagh: could you please explain what the firewall interaction should look like now? 15:24:41 I think the things mentioned in issue#7 are not complete or accurate anymore 15:24:57 Geez, give me all the tough questions... ;-) 15:25:07 sgallagh: :-) 15:25:37 We had a long discussion about this during a meeting before the break 15:25:43 Let me see if I can find a decent summary there 15:27:04 Not coming up with it really quickly... 15:27:19 I am not sure that we had a summary 15:27:42 So the core problem we had was that the port assignments were being strictly defined by the role definition, which makes life really difficult if you want to run on non-standard ports. 15:28:14 We also determined that the details of the firewall configuration were not *strictly* interesting to the end-user, provided that the service is reachable 15:29:00 So what we were talking about was having a set of helper tools that role definitions could call that would mark the correct ports as open when the role was active. 15:29:36 And that the end-user should only have to specify on which ports they want the service to run and not separately care about the firewall. 15:29:52 (With the notable exception that we want to be able to restrict by network interface) 15:30:05 Does that provide a decent summary? 15:30:09 network interface or zone? 15:30:48 twoerner: The strict requirement is by interface. Zones can provide a superset of that, so I'm fine with it 15:31:07 at the moment there is no interface use in roles for firewalls 15:32:00 twoerner: Right, we've never actually achieved that goal 15:32:33 It's always been on the back-burner as long as it works for all interfaces. 15:32:34 that goal? 15:32:52 Restricting by interface; we deferred that goal. 15:33:13 Might as well keep it in mind while we're redesigning this 15:33:32 interface names are not set in stone - there was a case again that the interface name changed after doing an upgrade.. 15:33:59 but I am not sure that we support upgrades with keeping roles 15:34:18 twoerner: We *intend* to, but we have made no official statement about it yet. 15:34:36 And thus far it seems to be working for the roles we have 15:36:27 ok.. I will think about this and will provide a proposal as Nils did for parameters 15:36:39 is that ok? 15:37:01 Works for me. 15:37:14 #topic Open Floor 15:37:46 I have a PoC for a containerized Domain Controller Role up on Review Board: http://reviewboard-fedoraserver.rhcloud.com/r/242/ 15:38:16 Anyone who has a few minutes and would be willing to review it is encouraged to do so. 15:38:39 It's not finalized; it currently points to my personal Docker repo, since I had to make a few modifications to the FreeIPA container to make it work. 15:39:00 I'm working with upstream to get those changes in 15:39:19 ok 15:40:38 Anything else? 15:40:53 If not, I'll close out the meeting and get ready for the Server SIG meeting in 20 minutes. 15:41:15 I am done 15:41:26 nils: You good? 15:41:48 sgallagh: yeah, just took a look at the containerized DC role 15:41:59 sgallagh: and done, yes :) 15:42:31 Thanks for coming folks. It's going to be a very exciting 2016. 15:42:33 #endmeeting