/srv/irclogs.ubuntu.com/2014/02/17/#maas.txt

bradmare there any decent docs about how to write preseed files and modify them for maas?00:05
bigjoolsbradm: it's not a maas-specific thing really00:06
bigjoolshttps://help.ubuntu.com/12.04/installation-guide/i386/preseed-intro.html00:06
bradmbigjools: I'm talking about what you can do inside the {{ }} tags00:06
bigjoolsthat's a templating language called Tempita:  http://pythonpaste.org/tempita/00:07
bigjoolshttp://pythonpaste.org/tempita/#the-language specifically00:07
bradmbigjools: and how do we know what variables we have access to in there? apparently I want to access node.tags.all(), but how would I find that out?00:08
bigjoolsreading the code, it's not documented :(00:08
bradmI think what I want is {{ if 'nova-compute' in node.tags.all() }}00:08
bradmbut its a guess based on the examples00:09
bigjoolsshould work00:09
bradmcool, thanks00:11
bradmis there any way to either see the preseed that's used by maas for a node, or maybe to capture the output from syslog of the install?02:20
bigjoolsbradm: yeah there's a preview on the node page02:20
bradmbigjools: aha, sweet.02:21
bradmoh, haha, thats what happens when you make assumptions about tag names02:22
* bigjools gets annoyed with whatever is stealing the ctrl-space shortcut on the desktop02:28
bigjoolsno, I don't ever want to change my keyboard layout once I set it, Unity02:28
=== mwhudson is now known as zz_mwhudson
roaksoaxbigjools: howdy!! so maas was broken in latest trunk and nobody noticed03:50
roaksoax:)03:50
roaksoaxbigjools: fixes were really packaging branch but if I hadn't tested, nobody would have noticed :)03:51
bradmugh, debugging preseeds is time consuming03:53
roaksoaxbigjools: so something changed on how maas binds ports? or how pserv does? cause now I had to use authbind for pserv too when before wasn't needed03:54
roaksoaxbigjools: uploaded!03:57
bradmbigjools: any hints on what else it could be to match a tag?  if "compute" in node.tags.all() doesn't seem to do it04:03
bradmah, node.tags.all() is empty in the preseed04:33
bradmand the node definately has a tag04:33
bradmdo I need to be using the curtin installer or something?04:56
bigjoolsroaksoax: it's a *really* good idea to wait for a successful qa lab run before uploading anything05:43
bigjoolsbradm: it will be returning tag records, not tags, so it will need something like:05:44
bigjoolstag.name for tag in node.tags.all()05:44
bigjoolsyou might need :py mode, but see if it works05:45
bradmbigjools: can I assign that to a variable or something?05:47
bigjoolsyeah use a define block05:47
bradmbigjools: so a python define block to create a function?  like {{py: def tagsname(n): return tag.name for tag in node.tags.all() }} or something?05:53
bigjoolsno05:54
bigjoolshang on05:54
bradmbigjools: or the {{def tagsname}} stuff?05:54
bigjoolsbradm: http://pythonpaste.org/tempita/#inherit-def05:55
bigjoolsyou can set python vars as well05:56
bradmbigjools: hmm, I'll play about with it and see what I can do05:58
bradmbigjools: I think this is a really important idiom for tweaking preseeds based on tags05:58
bigjoolsbradm: yes, sounds reasonable06:05
bradmbigjools: clearly I suck at this :)06:12
bradmhttps://pastebin.canonical.com/104959/ prints out the tags on from the node06:13
bigjoolsuse public pastebin if you can06:24
bigjoolsbut glad it worked for you06:25
bradmyeah, just need to figure out how to turn that into an if statement now06:25
bigjools{{py: if "mytag" in [tag.name for tag in node.tags.all()] }}06:33
bradmbigjools: https://pastebin.canonical.com/104960/06:33
bigjoolsuse public pastebin if you can06:33
bigjoolsplease06:33
bradmoh, bah06:33
bradmhttp://pastebin.ubuntu.com/6947342/ - gives me a function I can use later like - if 'mytag' in tagnames(node)06:34
bradmbigjools: hrm, yours doesn't work for me06:35
bigjoolsit was untested :)06:35
bigjoolsif yours works then fine06:36
bradmyours is nicer in terms of using less space06:36
bradmhttp://pastebin.ubuntu.com/6947349/ <- what I'm trying to do - I can have different late_commands based on tags06:37
bradmI suspect its the endif etc thats there06:37
bradmbigjools: thanks for the help, this should work out nicely06:41
=== zz_mwhudson is now known as mwhudson
bigjoolsbradm: np06:53
bradmI don't like maintaining multiple sets of data with most of it duplicated, this will fix that06:54
=== mwhudson is now known as zz_mwhudson
=== CyberJacob|Away is now known as CyberJacob
=== jtv1 is now known as jtv
* jtv just wasted a few hours trying to get his escaping test for a data display working, only to realise the data got neatly un-escaped as part of the extraction from HTML in the test itself.07:24
rvbaI'm still getting 'AttributeError: class Factory has no attribute 'forProtocol'' when running 'make run+webapp' on trunk. (http://paste.ubuntu.com/6947733/)08:43
rvbaAnyone else seeing this?08:43
=== CyberJacob is now known as CyberJacob|Away
rvbabigjools: btw, about lp:~julian-edwards/maas/default-commissioning-series : we're now using Trusty for commissioning but we're still importing *all* the images.  This is such a waste of bandwidth!09:30
jtvShould be an easy fix!09:31
rvbabigjools: fixing this will reduce the time it takes to import the images.09:48
bigjoolsrvba: +1!09:49
bigjoolssilly omission09:49
bigjoolsalthough we may need some more for deployment to other releases09:49
rvbabigjools: we need to keep all the deployment images indeed.  But the ephemerals take much longer to import.09:51
bigjoolsyes09:51
jtvrvba: I've pushed a change that tests for, and fixes, the QuerySet nastiness.12:34
rvbajtv: cool, branch approved.12:35
jtvThanks!12:39
rvbajtv: forgot to say, you might want to rename NetworkConnectNodesForm to re-use it verbatim in the method used to remove nodes.12:43
jtvMight, yes...  small tweak to the help string I guess.12:44
rvbaRight.12:45
jtvrvba, want to try this one?  https://code.launchpad.net/~jtv/maas/sample-commissioning-data/+merge/20671113:40
rvbajtv: sure13:46
tomixxx3hi, does it make sense to set "ip address" equal to "router ip" in maas dashboard?13:55
jtvHi tomixxx3.  I think it does, if your maas server is also your gateway.  But we don't really do anything with router_ip; it's just there so you can allocate nodes that are connected to a particular router.13:56
tomixxx3k i will try - and change it also in "interfaces"13:57
tomixxx3do i have to re-commission nodes after a change like this?13:58
jtvWhich are you changing?  IP address of a cluster interface?13:59
tomixxx3no, gateway address of the network interface13:59
jtvGateway address is different from router_ip...  The gateway is configuration for MAAS's DHCP server.14:00
jtvBasically, that's "when I serve DHCP to a node, where should I tell the node its gateway is?"14:00
jtvIf you're not managing DHCP on any interfaces, it's not going to matter.14:00
tomixxx3puhh... ok, whre can i set the gateway-address then?14:01
jtvOn the DHCP server.  Are you running your own DHCP server for the nodes, or are you letting MAAS serve DHCP?14:01
tomixxx3MAAS runs DHCP + DNS for the nodes14:02
jtvAh OK14:02
jtvIn that case you do need the gateway setting on the cluster interface.14:03
jtvI don't think you need re-commissioning after a change like that, per se, but the nodes may still have old information.14:03
tomixxx3k, i should maybe reboot nodes then14:04
jtvThat would make them pick up the settings, yes.14:04
tomixxx3now is the question what is the gateway address14:04
jtvWhatever gateway the nodes should use when communicating to the internet.14:05
tomixxx3my maas server has 2 interfaces. is it the ip of the interface which connects the maas-server to internet?14:05
tomixxx3would make sense, not? ^^14:05
jtvSlightly different:14:05
jtvthe gateway setting tells DHCP clients: "if you have a packet that you want to send to a host that's not on the same network, send it to the gateway and it will forward your packet."14:06
jtvSo if your maas server is also the gateway between the nodes and the internet, it should be the IP address of the interface that the nodes can see.14:07
jtv(I hope.  Rusty!)14:07
tomixxx3hmm, i have set the gateway equal to ip address, but now my maas-server lost its i-net connection14:08
jtvThe _server_?14:09
jtvThe gateway setting will only affect the nodes.14:09
tomixxx3yes...14:09
tomixxx3i swear14:09
tomixxx3its the server14:09
jtvAre you sure you edited the cluster interface where you serve DHCP?14:09
jtvOr it could simply be unrelated...14:09
tomixxx3i have changed "interfaces" file and i have changed cluster interface settings in maas dashboard14:10
jtvAh, then your interfaces file may be broken.14:10
jtvYou could try running "sudo ifup <interface>" in a shell (where <interface> is e.g. eth0 or eth1)14:10
jtvJust to see if there's an error...14:11
tomixxx3ifup, ifdown works14:11
jtvHmmm14:11
tomixxx3i dont understand this14:12
jtvNeither do I!14:13
tomixxx3i could try the ip of the other interface card as gateway14:15
jtvWell... gateway setting shouldn't affect the server itself.  Something else is wrong.14:16
jtvAnd it sounds as if it's in the system network settings, really, not the MAAS settings.14:17
tomixxx3server is reachable through 10.0.0.9/MAAS only i-net does not work14:18
jtvSo... the nodes can reach the server and vice versa, but the server cannot reach the internet?14:19
tomixxx3yes14:19
jtvAnd that interface gets its IP address from the uni's DHCP server, right?14:20
tomixxx3yes14:20
jtvDoes it have one now?  Is the interface up?14:20
tomixxx3yes14:20
jtvCan the server reach other hosts on the university network?14:20
tomixxx3just a moment, iam rebooting the server right now - and i have forgotten to run the NAT-script...14:21
tomixxx3its a NAT script provided by gmb14:21
jtvYes, I remember.14:21
jtvI hope you don't have one of those weird setups where on some boots, eth0 and eth1 are switched around...14:22
jtvBut probably not.14:22
tomixxx3hehe, i have tried already inverted ethernet ports in the script :D14:22
jtvHope that didn't affect anything...14:23
tomixxx3schould not14:23
tomixxx3the server behaves like the nodes now: it can resolve the DNS name of any http-url but it cannot connect...14:24
jtvThat does sound as if some wires got crossed somewhere...14:24
tomixxx3assume my gateway address is 143.205.140.30, the ip of the other network interface14:26
tomixxx3what could my ethernet settings look like xP - they should also allow 10.0.0.9 as a IP14:26
tomixxx3sorry wrong question. why iam not able to set the "network" parameter in cluster interface settings14:31
tomixxx3?14:31
jtvNetwork parameter?  I don't understand what parameter that is... do you mean netmaks?14:32
jtv*netmask?14:32
tomixxx3no, i mean "network", the part of the net14:34
jtvOhhh14:35
jtvThat's not a parameter.14:35
jtvThat's just a network address computed from your cluster interface's IP address and netmask.14:35
tomixxx3ok14:36
tomixxx3if i remove the gateway line from the "interfaces" file i have access to i-net on server again14:46
jtvOh, did you set your own server's address as its own interface in its own interfaces file!?14:49
jtvThat would create a fun situation.  :)14:49
tomixxx3yes i guess14:50
tomixxx3bad?14:50
jtvYes — if you set a gateway in your interfaces file, that tells _that same machine_ where it should send its internet packets.14:51
tomixxx3so it asks only itself?14:52
jtvAs you noticed we have 2 "gateway" settings.14:52
jtvOne is in /etc/network/interfaces.14:52
jtvThe other is in MAAS.14:52
tomixxx3yep14:52
jtvThe one in /etc/network/interfaces is for configuring your server's own networking.14:53
jtvBut the network interface that goes to the "outside" should just get its gateway from DHCP.14:53
jtvOn the other hand, the gateway setting in MAAS is configuration for the DHCP server.14:53
jtvIt doesn't do anything for your machine, but the nodes are its DHCP clients.14:53
jtvAnd it tells the _clients_ where their gateway is.14:53
tomixxx3ohoh14:54
jtvFor the clients (your nodes), your server is the gateway.  That's fine.14:54
jtvBut you configured your server to use itself (on the other interface) as the gateway.14:54
jtvAnd so it was probably just running around in circles.14:54
tomixxx3i understand14:54
tomixxx3good point14:55
tomixxx3so maas takes control over the one ethernet port?14:57
tomixxx3wow, this could solve a lot of troubles14:58
tomixxx3jtv: but i have to configure the ehternet port in the "interfaces" file too?15:03
tomixxx3jtv: just remove the "gateway" to be the same as the ip15:03
* jtv reads backscroll15:03
jtvMAAS doesn't actually take control of any ethernet interfaces.  But it serves DHCP on the interface that faces your nodes, which is pretty bossy.15:04
tomixxx3OK, so only the "gateway" line should be replaced in the "interfaces" file?15:04
jtvI mean good, but it's more "taking control of the network" than "taking control of the ethernet port."15:04
jtvIt's hard for me to imagine what the current state is, and it's getting a bit late to really dive into it... but generally, you set up your system's networking in /etc/networks/interfaces, and then you let MAAS run on top of that as basically just another server application.15:05
=== freeflying is now known as freeflying_away
jtvMAAS tries to _detect_ your system setup when you install it, but it doesn't keep track after that and it doesn't change them.15:07
jtvIt only does that sort of "bossy" stuff on the nodes.15:07
tomixxx3kk15:07
tomixxx3shit15:17
tomixxx3sorry, it seems it is working now!15:17
tomixxx3i have removed the "gateway" line from "interfaces" and set "ip router" in dashbaoard to "10.0.0.9" - same address like the IP address of the maaas-server15:18
jtvThe "IP router" field in MAAS doesn't matter much — that's just for large setups where you sometimes want to allocate nodes that are connected to specific routers.15:19
tomixxx3hmmm, or was it the reboot of the nodes?15:19
tomixxx3i dont know...15:19
jtvWell the incorrect gateway setting in /etc/networks/interfaces you had earlier definitely sounded like a problem.15:20
tomixxx3yeah, but before today i had no gateway line configured...15:20
tomixxx3executed "wget www.orf.at" from ubuntu@cloud1 now and everything seemts to work "index.html" saved...15:21
tomixxx3i cant believe right now, maybe just a fata morgana15:23
jtvheh15:23
jtvNetworking can be tough going, but it's useful knowledge in general life.15:24
jtvAnd when I say "general," obviously I mean "deeply technical computer-related."  :)15:25
tomixxx3yeah, quite a good feeling right now, i want to expand my cloud :D *hrhr*15:27
tomixxx3jtv: but it's definitely the "router ip" setting15:28
tomixxx3if have tried a different value now, and it is not working anymore15:28
jtvAnd if you set it back to the previous value, it works again..?15:29
tomixxx3jtv: worth a try15:29
tomixxx3what do u mean with previosu value? "ip address" == "router ip" or "ip address" == the address before today?15:29
tomixxx3i've tried it with "the address before today" and it does not work15:30
jtvI mean, if you reset it to the "good" value that worked just now, it works again?15:31
tomixxx3that's what im trying right now15:31
tomixxx3would be cool15:31
tomixxx3^^15:31
jtvLet's hope it works!15:32
tomixxx3yep, working15:36
jtvGreat!  I don't understand it, but maybe tomorrow I can look into it.15:37
jtvFor now, I have to leave.15:37
tomixxx3kk, ty for help so far!15:38
jtvnp!15:39
=== CyberJacob|Away is now known as CyberJacob
=== zz_mwhudson is now known as mwhudson
=== freeflying_away is now known as freeflying
chris38home__just upgrade maas on trusty and got this in pserv.log :23:13
chris38home__twisted.internet.error.CannotListenError: Couldn't listen on 127.0.0.1:69: [Errno 2] No such file or directory.23:13
chris38home__any idea ?23:14
bigjoolswhat version of the package?23:14
chris38home__1.5+bzr1951+1951+243~ppa0~ubuntu14.04.123:14
bigjoolsyou are better off using the main archive for trusty23:15
chris38home__go it on 1.5+bzr1951-0ubuntu1 too23:15
bigjoolsthe daily build packages may be broken at any time23:15
bigjoolsok23:15
bigjoolsroaksoax: is that ^^ anything like the authbind error you saw?23:16
roaksoaxbigjools yup. Still need to handle upgradea. Clean inatalls are not affected23:18
bigjoolsroaksoax: what's the procedure to handle the upgrade so chris38home__ can be unblocked?23:18
bigjoolsand the rest of us :)23:19
chris38home__;-)23:19
roaksoaxjust edit /etc/authbind/byuid/xyz23:19
roaksoaxand make ghe 68:68 become68:6923:20
bigjoolsright23:20
chris38home__cool, got it fixed23:21
chris38home__thanks ;-)23:21
=== mwhudson is now known as zz_mwhudson

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