On 11/26/15 13:40 , Kilian Ries wrote: > Patrick, > > Thanks for your quick response. I was just a little confused because if i > connect via vmadm console i can see the login just seconds after start and > zlogin takes up to two minutes. Didn’t now exactly how zlogin works in the > background …
While there is a big of zlogin magic here, none of the DNS timeout related bits are specific to zlogin itself. These are often related to the contents of the guest itself as it goes through and creates a new pty for your user (see https://github.com/joyent/illumos-joyent/blob/master/usr/src/cmd/zlogin/zlogin.c#L30-L61 for more details). At that point, it's generally up to whatever the lx distro defaults are. So, if for example, it's required to do reverse DNS resolution or try and see if it can reach some package manager URL to see if updates are available because that's in the /etc/motd, then you'll want to change those defaults. Which is not to say that there might not be a bug in zlogin. If you want to better understand what's going on, next time this happens, I'd run ptree from the global zone on the zlogin process and see what's the process tree looks like. That should help you narrow down where most of the time is being lost. Robert > Von: Patrick Mooney > <[email protected]<mailto:[email protected]>> > Antworten an: > "[email protected]<mailto:[email protected]>" > <[email protected]<mailto:[email protected]>> > Datum: Dienstag, 24. November 2015 um 18:26 > An: > "[email protected]<mailto:[email protected]>" > <[email protected]<mailto:[email protected]>> > Betreff: Re: [smartos-discuss] Zlogin takes up to 2 minutes > > Kilian, > Without a valid gateway, it is very likely that DNS resolution failures will > cause a delay in the login process. The nature of those failures changes > when you altered the ip address since there is not a valid route to the > gateway. This will cause a much quicker failure (no route to host) rather > than a timeout while querying the DNS servers. > > On 24 November 2015 at 10:07, Kilian Ries > <[email protected]<mailto:[email protected]>> wrote: > > Hello, > > i think i found an abnormal behaviour (maybe a bug) by using the > zlogin-command with lx-branded zones: > > I'm trying to setup a new lx with ip-address and gateway (the gateway doesn't > exist yet): > > { > "alias": "lx1", > "hostname": "lx1", > "brand": "lx", > "kernel_version": "3.13.0", > "max_physical_memory": 2048, > "image_uuid": "d5b3865c-0804-11e5-be21-dbc4ce844ddc", > "quota": 10, > "resolvers": [ > "8.8.8.8", > "8.8.4.4" > ], > "nics": [ > { > "nic_tag": "admin", > "ip": "192.168.10.100", > "netmask": "255.255.255.0", > "gateway": "192.168.10.1" > } > ] > } > > After creation, try to "zlogin uuid" and it will take up to 2 minutes until > you are logged in. > > Just seeing: > > [Connected to zone 'ceeb43dd-9157-4efc-a63b-3acf3b8647d2' pts/3] > > then after two minutes, i'm logged in. I can repeat that multiple times, it > always takes about 2 minutes. > > If i change my lx-config to the following: > > { > "alias": "lx1", > "hostname": "lx1", > "brand": "lx", > "kernel_version": "3.13.0", > "max_physical_memory": 2048, > "image_uuid": "d5b3865c-0804-11e5-be21-dbc4ce844ddc", > "quota": 10, > "resolvers": [ > "8.8.8.8", > "8.8.4.4" > ], > "nics": [ > { > "nic_tag": "admin", > "ip": "192.168.20.100", > "netmask": "255.255.255.0", > "gateway": "192.168.10.1" > } > ] > } > > then it works normal and i can zlogin within seconds. The only difference is > that the ip-address is on another subnet (192.168.20.xx) than the gateway > (192.168.10.xx). If they are both on the same subnet and the gateway isn't > reachable it slows down the zlogin massive. > > I'm able to reproduce that behaviour on different smartos hosts, running > different releases (up to build: 20151112T052215Z). > > Greets > Kilian > > smartos-discuss | > Archives<https://www.listbox.com/member/archive/184463/=now> > [https://www.listbox.com/images/feed-icon-10x10.jpgfe4ca5b.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc] > <https://www.listbox.com/member/archive/rss/184463/27541149-b940c87b> | > Modify<https://www.listbox.com/member/?&> Your Subscription > [https://www.listbox.com/images/listbox-logo-small.pngfe4ca5b.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc] > <http://www.listbox.com> > ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
