TypeError: 'NoneType' object has no attribute '__getitem__'

Bug #1641027 reported by xuchao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vmtp
New
Undecided
Unassigned

Bug Description

Run VMTP:

# vmtp -d -c vmtp.cfg -r admin-openrc.sh -p admin --protocol T --json test44.json

Output:
2016-11-11 14:49:52,612 WARNING Invalid public_key_file:/tmp/ssh/id_rsa.pub
2016-11-11 14:49:52,612 WARNING Invalid private_key_file:/tmp/ssh/id_rsa
2016-11-11 14:49:52,613 INFO Using http://172.16.xx.xx:5000/v2.0
2016-11-11 14:49:52,613 INFO VM public key: /root/.ssh/id_rsa.pub
2016-11-11 14:49:52,613 INFO VM private key: /root/.ssh/id_rsa
2016-11-11 14:49:54,151 INFO Found image ubuntu14.04 to launch VM, will continue
/root/vmtpenv/lib/python2.7/site-packages/keystoneclient/service_catalog.py:200: UserWarning: Providing attr without filter_value to get_urls() is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release. Either both should be provided or neither should be provided.
  'Providing attr without filter_value to get_urls() is '
2016-11-11 14:49:54,671 WARNING No external network found.
2016-11-11 14:49:55,441 INFO Created internal network: pns-internal-net.
2016-11-11 14:49:56,940 INFO Created internal network: pns-internal-net2.
2016-11-11 14:49:56,992 INFO OpenStack agent: Open vSwitch agent
2016-11-11 14:49:56,992 INFO OpenStack network type: vxlan
2016-11-11 14:49:59,349 INFO [TestServer1] Creating server VM...
2016-11-11 14:49:59,349 DEBUG [TestServer1] Starting on zone nova:localhost.localdomain
2016-11-11 14:50:01,523 DEBUG [TestServer1] VM status=BUILD, retrying 1 of 50...
2016-11-11 14:50:03,771 DEBUG [TestServer1] VM status=BUILD, retrying 2 of 50...
2016-11-11 14:50:06,018 DEBUG [TestServer1] VM status=BUILD, retrying 3 of 50...
2016-11-11 14:50:08,264 DEBUG [TestServer1] VM status=BUILD, retrying 4 of 50...
2016-11-11 14:50:10,493 ERROR Traceback (most recent call last):
  File "/root/vmtpenv/lib/python2.7/site-packages/vmtp/vmtp.py", line 426, in run
    self.setup()
  File "/root/vmtpenv/lib/python2.7/site-packages/vmtp/vmtp.py", line 301, in setup
    self.net.vm_int_net[0])
  File "/root/vmtpenv/lib/python2.7/site-packages/vmtp/vmtp.py", line 161, in create_instance
    init_file_name=user_data_file))
  File "/root/vmtpenv/lib/python2.7/site-packages/vmtp/perf_instance.py", line 47, in create
    init_file_name)
  File "/root/vmtpenv/lib/python2.7/site-packages/vmtp/instance.py", line 189, in create
    fip = self.net.create_floating_ip()
  File "/root/vmtpenv/lib/python2.7/site-packages/vmtp/network.py", line 329, in create_floating_ip
    "floating_network_id": self.ext_net['id']
TypeError: 'NoneType' object has no attribute '__getitem__'

Other info
OpenStack Version:Mitaka
Python Version:2.7.5
OS:CentOS 7.2

admin-openrc.sh file
# cat admin-openrc.sh
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://172.16.xx.xx:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

Revision history for this message
Yichen Wang (yicwang) wrote :

VMTP needs a floating IP to SSH into the VM. The error is because VMTP cannot find an external routable network, hence no floating ip can be allocated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.