/srv/irclogs.ubuntu.com/2016/11/03/#maas.txt

=== frankban|afk is now known as frankban
slevchenko<brendand> slevchenko, which version of MAAS are you using? It's MAAS 2.0 I'm using and I want to assign salt-installation script to a group of nodes. Group may be any means, tags for example.08:53
brendandslevchenko, i *think* you would have to do that via the command line08:56
brendandslevchenko, you can use allocate to select a group of machines, then you would need to provide the script as a cloud-init user_data08:56
brendandi *think* - there might be an easier way08:57
brendandroaksoax, ^08:57
roaksoaxyou can also do post_install hooks in curtin08:57
slevchenkoIt's even better for me, but I can't find out how to do it. I was able to do it for a certain node08:57
roaksoaxwell, by preseeding in curtin08:57
brendandslevchenko, http://maas.ubuntu.com/docs2.0/api.html?_ga=1.143107125.1468356320.1463157245#machines08:58
slevchenkoYes I understand, there is only one problem for me, I need to do it for a group, not node wuith certain name08:58
brendandslevchenko, there is an operation 'allocate', you can provide some constraints08:58
slevchenkoOh thx, I'll try it08:58
brendandroaksoax, how do you do that? i don't see anything in the docs09:00
roaksoaxbrendand: api09:00
brendandroaksoax, the only references to 'curtin' i see in the api docs is to get the curtin config09:02
brendandand a 'curtin_verbose' config option09:03
slevchenko<brendand> slevchenko, you can use allocate to select a group of machines, then you would need to provide the script as a cloud-init user_data09:05
slevchenkoOne mor thing,  by *provide the script* you mean some sort of loop `for $machine in $allocated_mcachines; do user_data` or it's really possible to assign userdata for whole group with maas-cli ?09:05
brendandslevchenko, how are you deploying the machines?09:15
slevchenkoAt this moment I'm researching a proper method to do it. So right now, I just applying Ubuntu 16.04 button to nodes (discoverd through PXE) in UI and press 'deploy'09:17
slevchenkoRight now my goal is to automate Salt-master setup, and then do batch salt-minions setup09:19
slevchenkohttps://maas.ubuntu.com/docs/development/preseeds.html If I undrstood correct it's possible up to certain node.09:23
slevchenko"{prefix}_{osystem}_{node_arch}_{node_subarch}_{release}_{node_name}" <- I mean this part09:23
brendandslevchenko, yeah. i'd probably only do that if modifying the preseed is necessary to get the machine to deploy09:25
slevchenkoIs it possible for "{prefix}_{osystem}_{node_arch}_{node_subarch}_{release}_{node-group\tag\whatever}" ?09:25
brendandslevchenko, cloud-init is far more user-friendly if it's post-installation tasks you're after09:25
slevchenkoSo I'll need to modify cloud-init's bits and pieces directly, without invloving MAAS?09:26
brendandslevchenko, you should read up on cloud-init, it's like an extensible yaml based configuration framework09:27
brendandslevchenko, btw where have you seen the concept of 'node-group'?09:27
brendandah, in 1.909:28
brendandslevchenko, you'll notice that is no longer an object in the 2.0 api. it might have an analog, but i'm not sure09:29
slevchenkoIf memory serves me it was somewhere in cli help, let me check09:29
brendandit shouldn't be in 2.009:31
slevchenkoYes it's not. But it was present in erlier versions, before update09:33
brendandslevchenko, 2.0 is a new major version, there are some quite fundamental changes to how maas works09:33
slevchenkoSo sole possible grouping concept is TAGS now, right ? Apart from domains, controllers etc09:34
brendandslevchenko, there is also 'zones', but that's really intended to be used for physical grouping of machines, not conceptual09:38
brendandslevchenko, so i would say use tags09:38
slevchenkoOk htx09:39
slevchenko*thx09:39
slevchenkoGuys does anyone know, how to start a node from CLI in MAAS 2.0 ? Answers I found earlier seems to refer older versions10:53
brendandslevchenko, you first need to allocate it using 'machines allocate <some constraints>', then call its 'deploy' operation10:57
brendandlet's say you have a machine with the tag 'foo'10:57
brendandmaas profile machines allocate tags=foo10:58
brendandthat returns one or more machines, then you need to find the system_id of the machine and do10:58
brendandmaas profile machine deploy <system_id>10:58
slevchenkoThx, but this time I'm trying to do something like this: http://askubuntu.com/a/63686711:00
slevchenkoscript=$(base64 addkey.sh)11:00
slevchenko$ maas myuser node start node-79b67e82-d25c-11e4-a333-00163eca91de \11:00
slevchenko  user_data=$script distro_series=trusty11:00
slevchenkoBut in 2.0 'node' has no start,stop etc options11:01
brendandslevchenko, yes, exactly11:01
brendandslevchenko, start is now 'deploy'11:02
slevchenkoSo I'm trying to figureout how to do same thing in 2.011:02
slevchenkoand user_data=$script part ?11:02
brendandslevchenko, it's the same, you just use deploy instead of start11:03
brendandslevchenko, i gave you a link to the 2.0 api documentation11:03
slevchenkooh, is there any 2.0 documentation about that ?11:04
brendandslevchenko, yes - i did give you a link earlier, but here it is again: http://maas.ubuntu.com/docs2.0/api.html11:04
brendandslevchenko, but the command is essentially the same, just the system_id replaces the node id, and the command is called deploy, not start11:05
brendandoh, and the api is 'machine', not 'node'11:05
slevchenkoThanks Brendan11:17
slevchenkoSo can I use 'cloud-config' as my user_data right ?11:19
brendandslevchenko, i believe so, the provided file should look something like https://cloudinit.readthedocs.io/en/latest/topics/examples.html#yaml-examples11:20
=== Kiall_ is now known as Kiall
=== haasn` is now known as haasn
BravenI am working with a dell IDRAC. For the IDRAC the Maas web GUI is getting "Failed to query node's BMC — Power state could not be queried" errors14:35
=== cmagina_ is now known as cmagina
=== jamespag` is now known as jamespage
zeestratBraven: Did you manage to fix your problem? If not, have you checked that IPMI is enable over LAN in the iDRAC settings?17:09
zeestratBraven: Somewhere around here I think. iDRAC -> iDRAC Settings -> Network/Security -> Network -> IPMI Settings -> [x]Enable IPMI Over LAN17:09
BravenI can take a look at it17:09
BravenWhat is weird the drac finally works17:10
pragsmikebraven is it enterprise iDRAC, or express iDRAC?17:14
pragsmikeenterprise has the dedicated ethernet port, express shares the first host port17:14
Bravenenterprise. It worked before but we had to rebuild the rack controller17:15
Bravenbecause of DHCP issue with it17:15
pragsmikeso you got it working then?17:17
narinderguptambeierl, hi lets pose the query here?17:18
mbeierlnarindergupta: sure, but I am not sure the overall phrasing as "labconfig.yaml" is not relevant17:18
pragsmikebraven: or do you mean the drac works, but just not with maas17:19
narinderguptambeierl, i think what we would like to know how maas determines the vlan on a subnet?17:19
narinderguptaroaksoax, mbeierl is trying to configure the vlan in maas and maas discovery of nodes some vlan auto detected but looks like subnet does not match.17:20
mbeierlHow does maas determine the VLANs and subnets to assign to a given fabric?  I have two subnets on the same NIC: 1) tagged VLAN 904, which is subnet 10.9.14.0/24, and 2) untagged subnet 10.9.12.0/2417:20
mbeierlBut for some reason, in MAAS, I see fabric-1 with VLAN 904 and subnet 10.9.12.0/2417:20
mbeierland a second fabric, (fabric-3) with untagged VLAN, subnet 10.9.14.0/2417:21
BravenIDRAC work with the Web GUI and MAAS. But MAAS is get this WARNING "The Failed to query node's BMC — Power state could not be queried <server IP> BMC busy"17:21
pragsmikebraven: when you say it works with maas do you mean maas can power the machine up and down, but it gets that warning?17:24
pragsmikembeierl: Supposedly, By default MAAS creates one fabric per physical NIC it discovers in /etc/network/interfaces during installation.17:24
BravenYes MAAS can power the IDRAC up and down. But it take a few attempts. MAAS status also get stuck on commissioning in the GUI.17:26
pragsmikembeierl: you had the vlan interfaces defined already when you installed maas (rackd)?17:26
pragsmikevlans defined on the machine where you ran rackd that is17:26
mbeierlpragsmike: A little context - MAAS is in a VM with bridged interfaces to the physical host with the real eth0.904, etc, interfaces17:27
mbeierlpragsmike: looking at that now...17:28
pragsmikembeierl: ah, ok. I've not tried having vlans on the host, just in the guest (lxc container in my case)17:28
mbeierlpragsmike: but you gave me something to look at...17:28
pragsmikembeierl: I just have the raw device eth1 on the host, and it's bridged to eth1 in the guest, and the guest is where the vlan interfaces are defined17:29
mbeierlpragsmike: right - bridged interfaces mask that from the guest VM so maybe I mixed something up there17:30
pragsmikei'm puzzled as to why you wound up with two fabrics17:30
pragsmikeoh, unless it thought they were physical nics17:30
mbeierlindeed, in the VM it appears as two NICs17:31
mbeierlbecause of the bridge in the host17:31
pragsmikeanyway if you can bridge the physical nic into the vm, and let the guest configure the vlan children on the vm's nic, that should work17:32
pragsmikeafk for a while17:32
mbeierlpragsmike: will look at that, thanks!17:32
pragsmikembeierl: I have some notes about how i set things up here: https://github.com/pragsmike/maas-openstack-lab17:36
mbeierlpragsmike: awesome, thanks!17:36
BravenWhere in MAAS are the logs17:52
wililupyQuestion: I'm trying to add a device to MAAS but it says the IP is already in use, but I can't find any record of it, and the logs are not telling me anything. Is there a way to look to see what/where this IP is being used?17:56
wililupyI've tried maas default dnsresources read ip=ip.add.re.ss but it does not list anything with the IP address.17:56
Bravenlook in /var/lib/maas/dhcp/dhcpd.leases17:59
wililupynot there either. Its a static IP address not in my dhcp pool, which is why its funny that it is saying its in use...18:02
=== frankban is now known as frankban|afk
wililupyThe IP address used to be attached to a server, but we have retired that server and removed it from maas. It looks like there might be something lingering behind not allowing me to reuse this IP address...18:04
wililupyI was hoping the maas.log would tell me what is still using it since MAAS is saying that it is still being used, but it is not being that helpful....18:05
=== zz_CyberJacob is now known as CyberJacob
brendandwililupy, how about 'maas default ipaddresses read'? do you see it in there?18:53
wililupybrendand no18:57
wililupyThat doesn't return any up addresses. Hmmm...18:58
ltragerwililupy: try maas <profile> ipaddresses read all=true19:02
brendandltrager, all is only in 2.1 though20:00
ltragerbrendand: ah I forgot that20:01
brendandwililupy, if you're using 2.0 that won't work20:01
brendandwililupy, it would be great if you could post a question on http://askubuntu.com/20:01
mpontillowililupy: yeah, this was fixed in MAAS 2.1 - it may be orphaned in the database. see https://bugs.launchpad.net/maas/+bug/1629061 -- someone else ran into this and was able to delete the record from the database directly, but obviously that's not ideal20:11
wililupythanks mpontillo, brendand and ltrager. I"m using 2.0 atm. mpontillo, is there a good howto/doc on how to remove the orphan from the database? I'm not a postgres guy...20:15
blake_rwililupy: did you check the subnet details page for the subnet that the IP address you want to exist?20:17
blake_rwililupy: it should be listed on the subnet details page20:17
wililupyblake_r: it does show up there, but no way to remove it...20:18
blake_rwililupy: does it say what its linked to20:18
wililupyunknown20:18
wililupyand the node is blank20:19
wililupyblake_r ^^20:19
mpontillowililupy: I would do "sudo maas-region dbshell" followed by "select * from maasserver_staticipaddress where ip=<unwanted-ip>;"20:27
mpontillowililupy: can you post the output of those commands? I'm curious what type of address got "stuck"20:27
mpontillowililupy: that won't delete the address; if you're convinced that is the one you want to delete, you could then do ""delete from maasserver_staticipaddress where ip=<unwanted-ip>;". but you're venturing into "unsupported" territory here.20:27
wililupympontillo: ack,20:28
wililupymaasdb=# select * from maasserver_staticipaddress where ip=10.1.10.5;20:30
wililupyERROR:  syntax error at or near ".10"20:30
wililupyLINE 1: select * from maasserver_staticipaddress where ip=10.1.10.5;20:30
wililupy                                                              ^20:30
wililupy                                                              ^20:30
mpontillowililupy: ah sorry, you need to single-quote the IP address, such as ip='10.1.10.5'.20:30
wililupyhaha! found it.20:31
mpontillowililupy, can you tell me its alloc_type?20:31
wililupy120:32
mpontillowililupy: okay so that is a STICKY IP address, such as one that was reserved by a user for a machine20:32
mpontillowililupy: actually we call it "Static" in the UI. it should have been deleted when the device was deleted, I think20:33
wililupyyeah. It was a server that they have retired and want to repurpose the IP for their network device on that subnet.20:33
wililupyERROR:  update or delete on table "maasserver_staticipaddress" violates foreign key constraint "D8c61f24ad88a66a26296efd4314384e" on table "maasserver_bmc"20:35
wililupyDETAIL:  Key (id)=(53) is still referenced from table "maasserver_bmc".20:35
mpontillowililupy: aha. so MAAS believes there to be a machine somewhere that is using that IP address for power control.20:36
mpontillowililupy: run this to figure out which node(s) are using that address as a BMC: select s.ip, s.alloc_type, b.power_type, n.hostname from maasserver_staticipaddress s JOIN maasserver_bmc b ON s.id = b.ip_address_id LEFT OUTER JOIN maasserver_node n on n.bmc_id = b.id;20:39
BravenI am having an issue with my Maas setup.20:46
wililupympontillo: Figured it out. It must have been a kvm server becuase it is pointing to 4 vm's that are no longer in use as well..21:31
mupBug #1639054 opened: syslog flooded with dhcpd messages that seem to be due to the use of actions in MAAS 2.0 <MAAS:New> <https://launchpad.net/bugs/1639054>21:36
mupBug #1639054 changed: syslog flooded with dhcpd messages that seem to be due to the use of actions in MAAS 2.0 <MAAS:New> <https://launchpad.net/bugs/1639054>21:42
mupBug #1639054 opened: syslog flooded with dhcpd messages that seem to be due to the use of actions in MAAS 2.0 <MAAS:New> <https://launchpad.net/bugs/1639054>21:48
=== blahdeblah_ is now known as blahdeblah
wililupythanks mpontillo. Those commands helped get rid of that stray IP so they could reuse it for their network device. Everything is good again. They asked when 2.1 will be officially released?23:19
ltragerwililupy: MAAS 2.1 is currently in Ubuntu Yakkety and can be used by adding our stable ppa - sudo add-apt-repository ppa:maas/stable23:28
ltragerwililupy: we're planning on getting it into Xenial in the next couple of weeks23:28
wililupythanks ltrager. I'll tell them about the ppa and see if they go that route or if they will wait for it to make it to the xenial archive.23:41
=== CyberJacob is now known as zz_CyberJacob
mpontilloBraven: what seems the be the problem?23:57
mpontillowililupy: glad everything is up and running again; thanks for confirming the source of the issue!23:57

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