/srv/irclogs.ubuntu.com/2016/09/10/#maas.txt

koapshello04:22
koapsis anyone around who might be able to help me with a MAAS 1.9 API command?04:23
DJHenjinApparently 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?10:31
koapsDJHenjin: I have interfaces not plugged in on my controllers with no prob19:16
koapsDoes 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 PXE19:18
koapsI know I can do it in the webui, but I need to use the maas cml19:19
DJHenjinkoaps, I am sure there must be _a_ way to do it20:23
DJHenjinnot 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 groups20:24
koapsI dug through all the commands I could think of, none seem to allow updating the nodegroup for a node20:26
koapsseems weird to me you can't change that when you can easily do it in the webui20:26
DJHenjinor 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 somewhere20:26
koapsI 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 update20:28
koapsjust radially changes how we injest servers if we need to add them new from the maas command20:28
DJHenjinone sec, let me take a look at the code, (this is open source right)?20:28
koapsya20:28
DJHenjinwhat version you on?20:29
koaps1.920:29
DJHenjinkk20:29
koaps1.9.3 I think is current20:29
koapshttp://maas.ubuntu.com/docs1.9/api.html#nodes20:29
koapswhen creating a new one, there's20:31
koapsparam nodegroup: The id of the nodegroup this node belongs to.20:31
DJHenjinTake a look at line 114, 117 of http://bazaar.launchpad.net/~maas-committers/maas/1.9/view/head:/src/maascli/api.py20:33
DJHenjinLooks like there may be a way to pass in store_true=true to get a persist mechanism going20:33
koapsnot sure how that would help me change the value?20:35
koapspython not my strongest lang :)20:35
DJHenjinwell, basically speaking. store_true is an argument that by default is initialized to false in all instances of the command parser.20:42
DJHenjinI 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 happens20:44
koapsthink I follow ya20:53
DJHenjinLooking 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:57
DJHenjinwell, really it would allow changing anything at all about the group quite easily, although name might break the group since name is used for dhcp20:58
DJHenjiner, dns21:00
koapsi don't need to change the nodegroup itself, just add nodes to it21:03
koapsI think there's commands for changing the nodegroup itself21:03
koapsjust nothing that says put this node in that group21:04
DJHenjinthats what I am looking for. name was just an example of where it may break things to change somethign manually21:09
DJHenjinBaseNodeManager 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 looking21:11
koapsthanks for looking, I appreciate the help21:16
DJHenjinI am coming up blank, sorry. I have to go deal with a dead UPS in the DC21:47
koapsall good, thanks for checking21:52
koapsI feel for you, I'm glad I don't have to make weekend DC trips any more :)21:53
DJHenjinThat's wwhat I am hoping maas will help eliminate22:01
DJHenjinalthough it helps when the "DC" is <10 feet to your right XD22:01
koapshah22:02

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