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

solefaldDoes anyone know of a way to test maas/curtin preseed files via a VM or something? It takes way long to wait for a bare metal system to come up and go through motions, just to bomb on a syntax error at the end03:22
errrUsing 2.0.0+bzr5189-0ubuntu1 is there a way to pull up the snippets history? I rebooted my maas box and when it came up the dhcpd.conf that I had been using for a month was gone and no snippets showed in the UI anymore..05:45
=== frankban|afk is now known as frankban
=== Guest95404 is now known as ahasenack
=== ahasenack is now known as Guest59736
=== ubuntu is now known as Guest74698
solefaldI am having hell of a time trying to figure out how to escape some things in preseed files. Would someone please send me in the right direction?16:03
solefald["curtin", "in-target", "--", "sh", "-c", "sed -i /etc/beegfs/beegfs-client.conf -e \"s/^sysMgmtdHost(.*)$/sysMgmtdHost = 10.99.11.124/\""]16:03
solefaldI have tried a hundred different ways to escape this and it fails every time16:04
solefaldStdout: b"sed: -e expression #1, char 51: unknown option to `s'\n"16:04
lutostagsolefald: I would write out the expression you want in the command line... in your case ...16:07
lutostagcurtin in-target -- sh -c sed -i /etc/beegfs/beegfs-client.conf -e"s/^sysMgmtdHost(.*)$/sysMgmtdHost = 10.99.11.124/"16:08
lutostagthen use python to do it for you...16:08
solefald@lutostag thank you. while we are here, what is the difference with writing things like  "curtin in-target -- sh -c sed -i "   and ["curtin", "in-target", "--", "sh", "-c", "blahblah"]?    i see the first method used when you need to echo something out16:09
lutostagsolefald: http://pastebin.ubuntu.com/23379588/16:09
lutostagsolefald: so each item in the list is passed as a separate argument to the command16:10
solefaldhm.. thank you16:10
lutostagtypically you only will have spaces within an item if it is quoted16:11
mupBug #1636559 opened: ssh connection drops from deployed node <MAAS:New> <https://launchpad.net/bugs/1636559>16:11
lutostagsolefald: https://stackoverflow.com/questions/11801098/calling-app-from-subprocess-call-with-arguments is the closest explanation I found that might be helpful16:12
solefaldlutostag: thank you for the explanation. Trying it out now16:13
mupBug #1636559 changed: ssh connection drops from deployed node <MAAS:New> <https://launchpad.net/bugs/1636559>16:17
mupBug #1636559 opened: ssh connection drops from deployed node <MAAS:Incomplete> <https://launchpad.net/bugs/1636559>16:20
lutostagsolefald: ['curtin', 'in-target', '--', 'sh', '-c', 'sed', '-i', '/etc/beegfs/beegfs-client.conf', '-e', 's/^sysMgmtdHost(.*)$/sysMgmtdHost = 10.99.11.124/'] -- looks like I missed a space when I copied your cmd16:36
solefaldyep, saw that. thank you. i just tested and it bombs like that too with invalid sed syntax16:37
lutostagsolefald: my latest?16:38
solefaldyep.16:39
solefaldInstallation failed with exception: Unexpected error while running command.16:39
solefaldCommand: ['curtin', 'in-target', '--', 'sh', '-c', 'sed', '-i', '/etc/beegfs/beegfs-client.conf', '-e', 's/^sysMgmtdHost(.*)$/sysMgmtdHost = 10.99.11.124/']16:39
solefaldExit code: 416:39
solefaldReason: -16:39
lutostagsolefald: hmm, looks like your sed is off a bit16:39
solefaldyeah is supposed to be sed -i "s/blah/blah/" /path/to/file16:40
lutostagI would do the sed like $ sed -i 's/^sysMgmtdHost(.*)$/sysMgmtdHost = 10.99.11.124/' /etc/beegfs...16:40
lutostagyep!16:40
solefaldi've been doing that for years. then i found this page yesterdays16:40
solefaldhttps://www.stackevolution.com/node/1716:40
solefaldpuppet_02_onboot: ["curtin", "in-target", "--", "sh", "-c", "sed -i /etc/default/puppet -e 's/START=no/START=yes/'"]16:40
solefaldwhich is rather odd, but i decided to try that because everything else i've tried failed.16:41
lutostagsolefald: ah, and I think I got the command wrong again...16:41
solefaldand 's/^sysMgmtdHost(.*)$/sysMgmtdHost = 10.99.11.124/' may need double quotes because of the regex16:42
solefaldalso i just tried on the command line and it did not work with (.*) but worked with .*  so im testing that now16:43
lutostagyeah, I think after all this it should be...16:43
lutostag['curtin', 'in-target', '--', 'sh', '-c', 'sed -i "s/^sysMgmtdHost(.*)$/sysMgmtdHost = 10.99.11.124/" /etc/beegfs/beegfs-client.conf']16:43
lutostag['curtin', 'in-target', '--', 'sh', '-c', 'sed -i "s/^sysMgmtdHost.*$/sysMgmtdHost = 10.99.11.124/" /etc/beegfs/beegfs-client.conf']16:44
solefaldthank you. this is going to be my next try16:45
solefaldi wish there was a way to validate all of this without having to deploy the box every 5 minutes16:45
lutostagsolefald: without the curtin prefix bit it seems to work...http://pastebin.ubuntu.com/23379738/16:51
lutostagso should be close16:51
solefaldyep! seems like it worked! let me fix the others. i have like 15 similar lines in there16:52
vmorrisi would like to know how to modify the dns records for the maas region controller itself -- the first interface that it has got picked up and set as the IP in DNS - I would rather it be the address on one of the other interfaces17:06
solefaldlutostag: that worked! now i am trying to figure out what to do with ["curtin", "in-target", "--", "sh", "-c", 'sed -i "s/^connInterfacesFile.*$/connInterfacesFile = /etc/beegfs/interfaces/" /etc/beegfs/beegfs-client.conf']17:12
solefaldbecause it does not like when i scape / with \   or change / delimiters to @17:12
lutostagsolefald: sed uses whatever directly follows 's' as the delemiter...17:12
lutostagso I would...17:13
lutostag["curtin", "in-target", "--", "sh", "-c", 'sed -i "s_^connInterfacesFile.*$_connInterfacesFile = /etc/beegfs/interfaces_" /etc/beegfs/beegfs-client.conf']17:13
solefaldill try underscores. @'s did not work17:13
solefaldCommand: ['curtin', 'in-target', '--', 'sh', '-c', 'sed -i "s@^connInterfacesFile.*$@connInterfacesFile = /etc/beegfs/interfaces@" /etc/beegfs/beegfs-client.conf']17:13
lutostagsolefald: did the @ work on the command line directly?17:14
solefaldyep17:14
lutostaghmm, $@ is a thing in bash-land, maybe that made it sad17:16
lutostagbut then again so is $_ ...17:16
vmorrisokay, dpkg-reconfigure maas-region-controller let me change the ip address that maas has configured, but it's still showing up as the old address in the DNS table17:18
lutostagvmorris: the DNS table where? has the TTL expired?17:22
vmorrislutostag: the DNS table in the MAAS gui still contains the old IP address for the maas-region server, i've restarted following the dpkg-reconfigure17:22
lutostagroaksoax: ^^17:23
=== zz_CyberJacob is now known as CyberJacob
vmorrislutostag roaksoax: this is maas 2.0.0+bzr5189-0ubuntu1~16.04.117:31
vmorrissoooo, i'm just going to edit /etc/bind/maas/zone.maas and reverse since I can't seem to find any appropriate place to edit the thing otherwise17:45
vmorrisjust fyi, that didn't help17:58
=== frankban is now known as frankban|afk
roaksoaxlamont: ^^18:50
roaksoaxvmorris: i think you'd just need to change settings via API18:50
roaksoaxbut lamont may be able to answer that better18:50
lamontvmorris: it likely requires a restart of the region before DNS updates will have the new address18:55
lamontwhich you've done.  hrm18:55
vmorrislamont: thanks but I tried this18:56
vmorrislamot: manually altering the records was only temporary, they were restored following the restart as wel18:56
lamontis there a bug filed?18:56
vmorriswell* soo.. i'm reinstalling the controller without that interface enabled18:56
vmorrisnone that i'm aware of18:56
vmorrisit's likely just a symptom of my configuration here18:57
bladernr`roaksoax, is there a way in MAAS to limit what nodes a user can control?19:02
=== LoRez_ is now known as LoRez
mupBug #1636601 opened: Can 'break' a 'New' node but cannot 'fix' it <docteam> <MAAS:New> <https://launchpad.net/bugs/1636601>19:39
mupBug #1636602 opened: Tool to restart all MAAS processes <MAAS:New> <https://launchpad.net/bugs/1636602>19:39
jheggeyeah19:52
brandor5Hello everyone: I've got a new instance of maas 2 up and trying to configure nodes... however the ephemeral image loads and just sits there... I see cloud-init trying to talk to meta-data but failing... is that expected?20:08
brandor5anyone?20:16
brandor5just poking around it looks like it's getting the wrong cloud-config-url from MAAS... it's using localhost instead of a hostname or ip20:18
roaksoaxbladernr`: nope20:19
roaksoaxbrandor5: check /etc/maas/rackd.conf what does it say there ?20:19
brandor5roaksoax: it is using localhost there... should that be fixed by install?20:20
brandor5and is there a proper way to fix it other than vi20:20
roaksoaxbrandor5: no, if localhost is there, it will chose the value in /etc/maas/regiond.conf under maas_url20:20
roaksoaxbrandor5: so you have two options20:21
roaksoax1. fix /etc/maas/rackd.conf to point to the proper IP20:21
roaksoaxor20:21
roaksoax2. fix /etc/maas/regiond.conf and leave rackd.conf as localhost20:21
roaksoaxbrandor5: we reocmmend you do 120:21
brandor5roaksoax: awesome, thanks!20:21
brandor5roaksoax: is there a service that needs to be restarted to take that change in?20:23
roaksoaxbrandor5: yes20:29
brandor5roaksoax: which service :D20:41
brendandbrandor5, probably maas-rackd20:45
brendandsystemctl restart maas-rackds20:45
brendand(no s at the end)20:45
brandor5brendand: ah that's it, I'm not used to systemd on ubuntu yet.... was looking for services in /etc/init.d20:46
roaksoaxbrandor5: maas-rackd yes20:46
brandor5thank you20:46
bladernr`roaksoax, thanks!20:53
solefalddoes curtin run late commands in alphabetical order?21:02
solefaldmy commands are named like this -  packages_0X_blah: , beegfs_0X_blah:, test_0X_blah:21:05
mupBug #1573690 changed: In the domain details pages, sometimes names have links to nodes when they should not <MAAS:Fix Released by lamont> <https://launchpad.net/bugs/1573690>22:57
mupBug #1573690 opened: In the domain details pages, sometimes names have links to nodes when they should not <MAAS:Fix Released by lamont> <https://launchpad.net/bugs/1573690>23:06
mupBug #1573690 changed: In the domain details pages, sometimes names have links to nodes when they should not <MAAS:Fix Released by lamont> <https://launchpad.net/bugs/1573690>23:12

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