ubuntu cloud-init can't get metadata at boot

asked 2014-12-06 07:09:01 -0600

muthusugi gravatar image

updated 2014-12-06 07:38:31 -0600

Hi, This is my environment "Juno ml2 openvswitch vlan"

node1 - controller (controller+Network"Neutron")

node2 - compute1 (Hyperv)

node3 - compute2 (Hyperv)

My ubuntu image which i made manually (Vhd/Vhdx) is not getting metadata at boot and not renames hostname nor resize's root partition.

But the crazy part is that i can "curl" the metadata url "" ".../metadata/hostname" etc., from instance

Also hostname change of Windows instance(vm) in openstack with cloud-init is working good.

I have installed cloud-init, cloud-utils and tried pushing image into glance as both vhd and vhdx both had same result.

My complete log of cloud-init from my ubuntu instance is here link

The hostname DEBUG logs are as below.

  • importer.py[DEBUG]: Failed at attempted import of 'cc_update_hostname' due to: No module named cc_update_hostname
  • importer.py[DEBUG]: Found cc_update_hostname with attributes ['handle'] in ['cloudinit.config.cc_update_hostname']

It says "Found cc_update-hostname" above but it just keeps my default hostname "adminvm" which i used while creating image.

one more Warning in log

  • url_helper.py[WARNING]: Calling '' failed [0/120s]: request error [HTTPConnectionPool(host='', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by <class 'socket.error'="">: [Errno 101] Network is unreachable)]
  • DataSourceEc2.py[CRITICAL]: Giving up on md from [''] after 126 seconds

Some Details about my network :

  • eth0-->Managent_NIC
  • eth1-->VM_DATA_NETWORK(br-eth1)
  • eth2-->External_Network(br-ex)

Compute has eth0 and eth1(br-eth1) but instance(VM in compute) has port in eth1(i.e, br-eth1) alone

ovs-vsctl show (in node1)

    Bridge br-ex
        Port "eth2"
            Interface "eth2"
        Port br-ex
            Interface br-ex
                type: internal
        Port "qg-741aae57-35"
            Interface "qg-741aae57-35"
                type: internal
    Bridge br-int
        fail_mode: secure
        Port "int-br-eth1"
            Interface "int-br-eth1"
                type: patch
                options: {peer="phy-br-eth1"}
        Port "tap46945191-d3"
            tag: 2
            Interface "tap46945191-d3"
                type: internal
        Port "tapd7668caa-ea"
            tag: 1
            Interface "tapd7668caa-ea"
                type: internal
        Port br-int
            Interface br-int
                type: internal
        Port "qr-4cfdd1c9-73"
            tag: 1
            Interface "qr-4cfdd1c9-73"
                type: internal
    Bridge "br-eth1"
        Port "phy-br-eth1"
            Interface "phy-br-eth1"
                type: patch
                options: {peer="int-br-eth1"}
        Port "eth1"
            Interface "eth1"
        Port "br-eth1"
            Interface "br-eth1"
                type: internal
    ovs_version: "2.0.2"

/etc/neutron/metadata_agent.ini (in node1)

verbose = True   
auth_url = http://controller:5000/v2.0
auth_region = regionOne
admin_tenant_name = service
admin_user = neutron
admin_password = neutron_user_pass
nova_metadata_ip = controller
metadata_proxy_shared_secret = metadata_pass

/etc/nova/nova.conf (in node1)

service_metadata_proxy = True
metadata_proxy_shared_secret = metadata_pass

route -n (eth0 is Management interface node1)

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 br-ex   U     0      0        0 br-ex   U     0      0        0 br-eth1   U     0      0        0 eth0     U     1000   0        0 eth0

ip ...

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-12-07 02:22:39 -0600

muthusugi gravatar image

Hi, the problem was with Network_manager it get the dhcp ip route very late.

I disabled Network-Manager and configured dhcp manually and the problem is solved.

Also i removed avahi-autoipd package from ubuntu which adds unwanted local root to known as ZeroConfNetworking concept.

Thanks for the support.

edit flag offensive delete link more

answered 2014-12-06 07:47:44 -0600

alexpilotti gravatar image

What is the MTU on your guest interface?

edit flag offensive delete link more


It would be 1500. I did'nt change anything from default... Ubuntu guest uses Network_Manager to get its dhcp ip. But for Windows guest things are working fine. Thanks for the response.

muthusugi gravatar imagemuthusugi ( 2014-12-06 07:55:00 -0600 )edit

I changed the MTU to 1492 and restarded twice the Guest and checked logs... Still the warning i posted above is reflected again...

muthusugi gravatar imagemuthusugi ( 2014-12-06 08:18:13 -0600 )edit

I'd try 1400 to rule out frammentation issues. Can you also post your neutron.conf file?

alexpilotti gravatar imagealexpilotti ( 2014-12-06 10:54:01 -0600 )edit

Hi, i found the problem was with network-manager, MTU was not the problem in my case. Thanks you made me think in right path.

muthusugi gravatar imagemuthusugi ( 2014-12-07 02:24:43 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-12-06 07:09:01 -0600

Seen: 5,420 times

Last updated: Dec 07 '14