← Back to team overview

launchpad-dev team mailing list archive

[Private-canonical-maas] Avahi tests

 

>> in the last couple of days I tested the avahi usb stick image and how
>> it was working with MAAS.
>
> Hey Diogo,
>
> Thanks for this. I'm approaching your findings in terms of
> documentation, so trying to think around the virtual aspect of this.
>>
>> I don't have loads of spare machines and/or USB sticks to test this so
>> I went with virtual machines. I used VirtualBox so I could test the
>> avahi usb stick image, which is a 64bit and my host is 32bit. kvm
>> doesn't accept running a 64bit guest on a 32bit host. So, I setup a
>> new MAAS server from scratch using the installer from Precise.
>>
>> For the node I couldn't boot directly from the USB stick, because
>> VirtualBox doesn't support that. I created a new virtual disk,
>> attached it to the VM and booted from there. I think this allows us to
>> test the code that runs once it boots, so I don't think the fact I'm
>> not using a real usb stick matter a lot. If you see issues with this
>> approach, please let me know.
>>
> This all sounds great. I guess what I want to know is, how sure are
> you that it'll work with a real USB stick? It sounds like all the same
> things should happen from what I'm reading here, so in terms of
> writing the documentation, we could write about what you did, as if it
> was done physically. Is it possible to write about it in this way, or
> would we be guessing anything, or taking any different steps?
>
> If things are going to be different between a virtual set-up and a
> physical one, I think we need to either:
> - Push for someone to do this physically, even if it means
> travel/renting/buying/borrowing equipment.
> - Write about it in the best way we can, given our physical
> limitations, and highlight potential trouble points for things we are
> not 100% sure about, then pay close attention to users would are
> reporting back issues.
>
> Regarding the VM set-up itself: Do you think there would be much of a
> use case for people wanting to do things this way in real life, or is
> it just a clever get-around that you came up with to get over the
> problem of not having the machines and USB sticks physically present?
>
> If you think it would be something people would like to try themselves
> to get their MAAS working, we could write this story as more of a
> 'double guide' - how to do it virtually, and how to do it
> physically/with USB sticks.
>
>> To create the VirtualBox disk image:
>>
>>    $ wget -c http://people.canonical.com/~andreserl/maas.img.bz2
>>    $ bunzip2 maas.img.bz2
>>    $ VBoxManage convertdd maas.img avahi-node-02-usb.vdi
>>
>> I tried a couple of different virtual network setups in VirtualBox but
>> the only one I could get working was bridged mode on a virtual adapter
>> (lxcbr0). That way both VMs have internet access and see each other.
>
> Can you tell me a bit more about what a virtual adaptor is? This part
> may be key here. It's important that all the different parts can see
> each other, so that avahi can do what it needs to do, and be 'found.'
>>
>> So the network looks like:
>> lxcbr0: 10.0.3.1 bridging the MAAS network to my internal network
>> MAAS server: 10.0.0.3.2
>>
>> Once I had this set up, I could boot the node from the avahi disk
>> image created above. The node booted, found the MAAS server and kept
>> making requests like this:
>>
>>  "GET /MAAS/api/1.0/nodes/?op=is_registered&mac_address=08:00:27:50:5e:a3
>> HTTP/1.1" 200 205 "-" "curl/7.22.0 (x86_64-pc-linux-gnu)
>> libcurl/7.22.0 OpenSSL/1.0.1
>> zlib/1.2.3.4 libidn/1.23 librtmp/2.3
>>
> What does this request mean?
>
>> At this point the node showed the login prompt and the node hostname
>> set to ubuntu.1
>>
>> I then went to the MAAS UI and added that node MAC address and
>> architecture type. The node displayed as "Comissioning".
>>
> This sounds good to me.
>
>> Meanwhile in the node screen, it booted into kexec, the hostname
>> changed to node-080027505ea3 and gave me the login prompt. After some
>> time, the node was turned off and its status changed to "Ready" in the
>> MAAS UI.
>>
> About how long are we talking here?
>
>> In summary, it works but I think it could be much better. One thing I
>> found surprising, is the login prompts. If you are looking at the
>> screen it seems like the system is ready to use, but if you wait long
>> enough, it'll suddenly boot into kexec or turn off the machine. I
>> think it'd be a better user experience if we showed the user that the
>> node is trying to contact the MAAS server (on the first step) or that
>> the node is doing its thing once it's executing kexec.
>>
> Yes definitely - the user isn't going to know what's happening if
> they're waiting a long time. We need some kind of message here.
>
>> Another thing I was expecting is the avahi usb disk to behave like pxe
>> booting. I'd boot from it and the node would find the MAAS server in
>> the network, enlist itself (show up as "Declared" in the MAAS ui) then
>> I could accept & commission it. The way it works now I have to
>> manually add the node's MAC address into the UI. Maybe it was a
>> misunderstanding on my part of how the Avahi story should work, but I
>> thought I'd raise this as well.
>
> I'm not sure about this myself. Any ideas guys?
>>
>> What you think about these issues? Need bugs for them? If there are
>> other use cases using the avahi image that you'd like me to try,
>> please contact me.
>
> Thanks for all this Diogo.
>>
>> Cheers,
>> --
>> Diogo M. Matsubara
>>
>> --
>> Mailing list: https://launchpad.net/~private-canonical-maas
>> Post to     : private-canonical-maas@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~private-canonical-maas
>> More help   : https://help.launchpad.net/ListHelp



--
Matthew Revell
Launchpad Product Manager
Canonical

https://launchpad.net/~matthew.revell