[Bug 1202758] Re: hostname not resolvable on azure
fixed in 0.7.3 ** Changed in: cloud-init Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
** Branch linked: lp:~ubuntu-branches/ubuntu/saucy/cloud-init/saucy- proposed -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
I'm going to fix this issue simply by not capturing output. I had done that initially because there is no /dev/console output on azure. However, if the user wants to see output, they should just have their supplied command be 'sh' and redirect to a file. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
Interesting, i launched 10 instances and grepped cloud-init timestamps. it seems pretty reliable that the ifdownup cycle is reported to take between 12 and 22 seconds. $ cat /etc/cloud/cloud.cfg.d/my.cfg datasource: Azure: hostname_bounce: # policy can be 'on', 'off' or 'force' policy: force # the method 'bounce' command. command: ["bash", "-xc", 'date; cat /proc/uptime; time echo ifdown $interface; cat /proc/uptime; date; cat /proc/uptime; time echo ifup $interface; cat /proc/uptime; date'] I put the above in that file, and then echo "ubuntu" | time sudo sh -c 'tee /etc/hostname; hostname -F /etc/hostname; ifdown eth0; ifup eth0;' ; sudo rm -Rf /var/lib/cloud/ /var/log/cloud-init.log and reboot. The issue seems to be ntpdate somehow getting in the way, although I'm not exactly sure how. If I put the .cfg file in place above, and then do: chmod ugo-x /etc/network/if-up.d/ntpdate sudo rm /var/lib/cloud/instance/obj.pkl ; time sudo cloud-init init .. real0m1.273s user0m0.791s sys 0m0.257s then this will take wall clock ~1.2 seconds. doing the same with execute permissions on that file takes much longer. $ sudo chmod ugo+x /etc/network/if-up.d/ntpdate; sudo rm /var/lib/cloud/instance/obj.pkl ; time sudo cloud-init init ... real0m7.689s user0m0.804s sys 0m0.267s just for reference, actually counting in my head, there is a measurable difference in time (ie, its not just a clock-getting-set-while-counting- thing). You can run the above without rebooting too, and you'll see the issue. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
Ugh. Bouncing the interface seems ripe for problems, although that should be mitigated by the fact that services won't be up. I will pursue talking to MS about seeing if there is a better way to do this. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
** Attachment added: "cloud-init.log of successful but slow boot" https://bugs.launchpad.net/cloud-init/+bug/1202758/+attachment/3752672/+files/cloud-init.log -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
ok. just verified as fixed inside saucy daily image on azure. I'm not sure if this is an outlier or not, but the cloud-init log shows that bouncing the interface took 22 seconds. | 2013-07-28 23:13:45,164 - DataSourceAzure.py[DEBUG]: pubhname: publishing hostname [phostname=ubuntu hostname=smoser0728s policy=True interface=eth0] | 2013-07-28 23:13:45,164 - util.py[DEBUG]: Running command ['sh', '-xc', 'i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x'] with allowed return codes [0] (shell=False, capture=True) | 2013-07-28 23:14:07,412 - DataSourceAzure.py[DEBUG]: output: . err: + i=eth0 | + x=0 | + ifdown eth0 | Internet Systems Consortium DHCP Client 4.2.4 | Copyright 2004-2012 Internet Systems Consortium. | All rights reserved. | For info, please visit https://www.isc.org/software/dhcp/ | | Listening on LPF/eth0/00:15:5d:47:7a:14 | Sending on LPF/eth0/00:15:5d:47:7a:14 | Sending on Socket/fallback | DHCPRELEASE on eth0 to 10.74.0.146 port 67 (xid=0x1646c8d7) | + ifup eth0 | Cannot change scatter-gather | Internet Systems Consortium DHCP Client 4.2.4 | Copyright 2004-2012 Internet Systems Consortium. | All rights reserved. | For info, please visit https://www.isc.org/software/dhcp/ | | Listening on LPF/eth0/00:15:5d:47:7a:14 | Sending on LPF/eth0/00:15:5d:47:7a:14 | Sending on Socket/fallback | DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x1cbb3cc0) | DHCPREQUEST of 10.74.52.4 on eth0 to 255.255.255.255 port 67 (xid=0x1cbb3cc0) | DHCPOFFER of 10.74.52.4 from 10.74.52.1 | DHCPACK of 10.74.52.4 from 10.74.52.1 | bound to 10.74.52.4 -- renewal in 4294967295 seconds. | + exit 0 | | 2013-07-28 23:14:07,413 - DataSourceAzure.py[DEBUG]: invoking agent: ['service', 'walinuxagent', 'start'] I'm not really sure what to think about that. we basically added 18 seconds to boot in order to publish the hostname :-(. I wonder if there is any other way to do this. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
** Branch linked: lp:~smoser/ubuntu/precise/cloud-init/sru -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
This bug was fixed in the package cloud-init - 0.7.3~bzr849-0ubuntu2 --- cloud-init (0.7.3~bzr849-0ubuntu2) saucy; urgency=low * debian/control: fix bad dependency on python-jsonpatch by build-depending on python-json-patch, so dh_python2 can find the right package (LP: #1205358). -- Scott MoserFri, 26 Jul 2013 10:47:59 -0400 ** Changed in: cloud-init (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
** Branch linked: lp:ubuntu/cloud-init -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
fixed in revno 847. ** Changed in: cloud-init Status: New => Fix Committed ** Changed in: cloud-init Importance: Undecided => Medium ** Changed in: cloud-init Assignee: (unassigned) => Scott Moser (smoser) ** Changed in: cloud-init (Ubuntu) Assignee: (unassigned) => Scott Moser (smoser) -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
** Branch linked: lp:cloud-init -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
I really have no good ideas on how to do this. The simplist solution I think woudl be to have a tool like: dhcp-advertize-hostname --interface=eth0 --hostname=foo and just invoke it. That tool would just do a dhcp request with the hostname set. I'm just not familiar enough with how dhcp works to say if we can actually do that or not. It seems at very least that we'd risk invalidating the lease. This code would only be run on azure, so that would minimize the issue. bouncing the interface like walinuxagent does is really less than ideal. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
** Also affects: cloud-init Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1202758] Re: hostname not resolvable on azure
** Changed in: cloud-init (Ubuntu) Status: New => Confirmed ** Changed in: cloud-init (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1202758 Title: hostname not resolvable on azure To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1202758/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs