[04:22] <koaps> hello
[04:23] <koaps> is anyone around who might be able to help me with a MAAS 1.9 API command?
[10:31] <DJHenjin> Apparently my region controller has disappeared,... If I have 3 NICs in the box I am running the MAAS on, Do I have to have all 3 of them connected to something, or can I leave one hanging?
[19:16] <koaps> DJHenjin: I have interfaces not plugged in on my controllers with no prob
[19:18] <koaps> Does anyone know if the only way to update the nodegroup on a node is during node new ? I can't find a way to update the value after the node is seen by MAAS after PXE
[19:19] <koaps> I know I can do it in the webui, but I need to use the maas cml
[20:23] <DJHenjin> koaps, I am sure there must be _a_ way to do it
[20:24] <DJHenjin> not everyone can count on $10,000 servers with 0.1%  failure rate, so there would have to be mechanisms to replace dead machines, and possibly expand the node groups
[20:26] <koaps> I dug through all the commands I could think of, none seem to allow updating the nodegroup for a node
[20:26] <koaps> seems weird to me you can't change that when you can easily do it in the webui
[20:26] <DJHenjin> or are you referring to a name? every time I have had to deal with something like that (in many other web coding projects) there has always been an obscure get_ID_by_Name, and set_Name_by_ID hiding somewhere
[20:28] <koaps> I tried passing the equiv of what's used in the new command, nodegroup=CLUSTERID, to the node update, didn't error but also didn't update
[20:28] <koaps> just radially changes how we injest servers if we need to add them new from the maas command
[20:28] <DJHenjin> one sec, let me take a look at the code, (this is open source right)?
[20:28] <koaps> ya
[20:29] <DJHenjin> what version you on?
[20:29] <koaps> 1.9
[20:29] <DJHenjin> kk
[20:29] <koaps> 1.9.3 I think is current
[20:29] <koaps> http://maas.ubuntu.com/docs1.9/api.html#nodes
[20:31] <koaps> when creating a new one, there's
[20:31] <koaps> param nodegroup: The id of the nodegroup this node belongs to.
[20:33] <DJHenjin> Take a look at line 114, 117 of http://bazaar.launchpad.net/~maas-committers/maas/1.9/view/head:/src/maascli/api.py
[20:33] <DJHenjin> Looks like there may be a way to pass in store_true=true to get a persist mechanism going
[20:35] <koaps> not sure how that would help me change the value?
[20:35] <koaps> python not my strongest lang :)
[20:42] <DJHenjin> well, basically speaking. store_true is an argument that by default is initialized to false in all instances of the command parser.
[20:44] <DJHenjin> I haven't found the associated code yet, but to me it looks like any API commands that need to change stored values only part of the time can short circuit the code which actually commits the new value by leaving store_true set as false. And tif they want to make a meaningful commit (after validation for ex), they jusdt do the same command, pass in store_true as true. and then the magic happens
[20:53] <koaps> think I follow ya
[20:57] <DJHenjin> Looking at how the nodegroup is implemented, we use UUID to differentiate between the nodegroups programmatically, which would allow us to change the name relatively easily.
[20:58] <DJHenjin> well, really it would allow changing anything at all about the group quite easily, although name might break the group since name is used for dhcp
[21:00] <DJHenjin> er, dns
[21:03] <koaps> i don't need to change the nodegroup itself, just add nodes to it
[21:03] <koaps> I think there's commands for changing the nodegroup itself
[21:04] <koaps> just nothing that says put this node in that group
[21:09] <DJHenjin> thats what I am looking for. name was just an example of where it may break things to change somethign manually
[21:11] <DJHenjin> BaseNodeManager on line 268 in http://bazaar.launchpad.net/~maas-committers/maas/1.9/view/head:/src/maasserver/models/node.py is likely where it will exist, I need to go have a smoke, but I will keep looking
[21:16] <koaps> thanks for looking, I appreciate the help
[21:47] <DJHenjin> I am coming up blank, sorry. I have to go deal with a dead UPS in the DC
[21:52] <koaps> all good, thanks for checking
[21:53] <koaps> I feel for you, I'm glad I don't have to make weekend DC trips any more :)
[22:01] <DJHenjin> That's wwhat I am hoping maas will help eliminate
[22:01] <DJHenjin> although it helps when the "DC" is <10 feet to your right XD
[22:02] <koaps> hah