/srv/irclogs.ubuntu.com/2014/09/04/#maas.txt

=== CyberJacob is now known as CyberJacob|Away
=== menn0 is now known as menn0-afk
=== menn0-afk is now known as menn0
bigjoolsjtv: may I avail myself of your reviewing powers please https://code.launchpad.net/~julian-edwards/maas/timer-commands/+merge/23329603:33
jtv*trumpet music blares briefly*03:33
bigjoolsis that like the reaping music in Hunger Games?03:34
jtvCan't discuss that here.  Probably illegal.03:47
jtvAnyway, your review is done.03:47
bigjoolsthanks03:49
newellHola all05:09
=== CyberJacob|Away is now known as CyberJacob
=== mfa298___ is now known as mfa298
=== trash_ is now known as trash
=== CyberJacob is now known as CyberJacob|Away
jtvControlling the power on our NUCs would be so much easier if amttool supported IPv6...08:11
jtvBah.  Doesn't look as if wsman supports IPv6 either.  :(08:26
rvbaallenap: it seems we've got many different ways to test methods that call the RPC stuff in the code base… I assume this is due to the fact that you're refined it recently… can you point me to the most up-to-example version?10:10
allenaprvba: It depends on what you want to do :) call_responder is best when you’re testing a single RPC method directly.10:12
rvbaallenap: I want to test this: a RPC method should be called as a side-effect of changing a node's status.10:13
allenaprvba: Mock(Live)?(ClusterToRegion|RegionToCluster)Fixture are best when testing code that uses RPC. The Live variants are best when there isn’t an opportunity to pump IO in the test, by hand as it were.10:13
rvbaallenap: okay, thanks; that's what I started using.  There are places in the code that use pure mocking instead of this.10:14
allenaprvba: Personally I would be tempted to write a helper in maasserver.clusterrpc somewhere, test that on its own, then use patch_autospec to test that *that* is called when changing a node’s status.10:15
rvbaallenap: I don't understand… what would that helper do?10:16
rvbaallenap: couldn't we get MockRegionToClusterRPCFixture to use patch_autospec under the hood to create "valid" mocks for all the registered methods?10:22
allenaprvba: We’re actually getting something similar because all calls are being validated against the RPC schema.10:39
rvbaallenap: ah, okay.10:39
rvbaallenap: still, it's not exactly the same thing as having mocks already setup.10:39
allenaprvba: The helper would be a thin wrapper around getting a client and making the remote call. It’s a conveniently small thing to test, but also provides a good point at which to mock.10:40
allenaprvba: What kind of mocks do you want? When running the pserv tests I don’t really want to bring up the database and Django.10:40
rvbaallenap: well, just mock objects;  and then you can configure them if you want.  I don't see how that's related to Django at all but I must be missing something.10:41
allenaprvba: If you’re using addEventLoop (from the cluster) or addCluster (from the region) with the end-to-end fixtures, then you can specify which calls to mock, and it does provide stubs for you to customise. It’s hard to customise those to have some default behaviour when that behaviour is defined elsewhere (e.g. provisioningserver shouldn’t import10:48
allenapmaasserver, and that’s where Django comes in) and might require a database with sample data. I also don’t think that would be a good way to write unit tests.10:48
rvbaallenap: fair enough.10:49
=== onicrom_ is now known as onicrom
=== allenap_ is now known as allenap
=== ubot5` is now known as ubot5
gQuigs~$ maas maas-mini-test maas get-config maas_name=unicode14:18
gQuigsNo provided name!14:18
* gQuigs doesn't understand how to query get-config14:18
gQuigsideally, I'd like to be able to just get all the config back14:19
rvbaallenap: I'm still not completely satisfied with the explanation you gave me on ~allenap/maas/rpc-start-nodes-extra… why were we excluding nodes with MACs?  If this is still a requirement, why aren't you changing all the call sites to eliminate the nodes with MACs before calling start_nodes.  And if you think start_nodes is the wrong place to do this, why did you do something very similar in stop_nodes?15:04
rvbaallenap: sorry, lots of questions :)15:05
allenaprvba: I honestly don’t know why we were excluding nodes without MACs.15:08
allenapIt seems bizarre to make that decision then. Worse yet to exclude them without warning, just silently drop them.15:09
allenaprvba: I’m not sure the call sites need changing… well, I don’t know. How do we get to a point where we have a node without a MAC address?15:10
rvbaallenap: the only explanation I can see is that for some reason we know we can't power them up.  In which case it's logical to exclude them.15:11
rvbaallenap: yeah, I know, that's why the whole thing is weird.15:11
allenaprvba: stop_nodes() doesn’t exclude nodes without MACs, only those where the power_info tuple has can_be_stopped=False.15:11
rvbaallenap: right.15:12
rvbaallenap: I'm temped to agree with you and get rid of it… but because I don't understand why we were doing this in the first place I'm a bit confused…15:12
allenaprvba: On one hand I want to remove it and see if anything happens.15:12
rvbagQuigs:  ~$ maas maas-mini-test maas get-config name=myconfig15:13
gQuigsrvba: oh, wow..  thanks!15:14
rvbaallenap: I think we did this because get_primary_mac is used by get_effective_power_parameters15:18
rvbaallenap: but there is support for when get_primary_mac return None15:19
rvbaallenap: okay, let's get rid of it.15:19
allenaprvba: Cool.15:21
allenaprvba: Thanks, by the way. It’s good to have these kinds of discussions :)15:21
rvbaallenap: heh, you're welcome :)15:23
roaksoaxrvba: isn't the primary mac also for networking?15:34
roaksoaxrvba: we only do mapping for primary mac15:35
roaksoaxfor DNS15:35
rvbaroaksoax: no, we populate the DNS with what's in the staticIP table. And this is, in turn, uses the MAC on the managed interface.15:39
roaksoaxrvba: ok16:02
=== CyberJacob|Away is now known as CyberJacob
=== roadmr is now known as roadmr_afk
=== CyberJacob is now known as CyberJacob|Away
=== roadmr_afk is now known as roadmr
=== CyberJacob|Away is now known as CyberJacob
=== dpb2 is now known as dpb1
=== CyberJacob is now known as CyberJacob|Away
=== CyberJacob|Away is now known as CyberJacob
=== CyberJacob is now known as CyberJacob|Away

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