[Yahoo-eng-team] [Bug 1448594] [NEW] DuplicateError while parsing ifcfg-ethX

2015-04-25 Thread Roopak Parikh
Public bug reported:


I have a VirtualMachine image (Scientific Linux 6.4) which has a static IP 
address assigned to it. Using Openstack and using 'config-drive' we tried to 
boot a new VirtualMachine from that image, config-drive, the ISO contains a new 
'static-ip' address. Cloud-init recognizes that and tries to read the existing 
/etc/sysconfig/network-scripts/ifcfg-eth0 and fails with the following error:

---

Apr 24 18:04:13 rparikh-sl6-w-cloud-init [CLOUDINIT] util.py[DEBUG]:
Getting data from 
failed#012Traceback (most recent call last):#012  File
"/usr/lib/python2.6/site-packages/cloudinit/sources/__init__.py", line
243, in find_source#012if s.get_data():#012  File
"/usr/lib/python2.6/site-
packages/cloudinit/sources/DataSourceConfigDrive.py", line 212, in
get_data#012self.helper.on_first_boot(results)#012  File
"/usr/lib/python2.6/site-
packages/cloudinit/sources/DataSourceConfigDrive.py", line 54, in
on_first_boot#012
self.distro.apply_network(data['network_config'])#012  File
"/usr/lib/python2.6/site-packages/cloudinit/distros/__init__.py", line
116, in apply_network#012dev_names =
self._write_network(settings)#012  File "/usr/lib/python2.6/site-
packages/cloudinit/distros/rhel.py", line 85, in _write_network#012
rhel_util.update_sysconfig_file(net_fn, net_cfg)#012  File
"/usr/lib/python2.6/site-packages/cloudinit/distros/rhel_util.py", line
125, in update_sysconfig_file#012(exists, contents) =
read_sysconfig_file(fn)#012  File "/usr/lib/python2.6/site-
packages/cloudinit/distros/rhel_util.py", line 153, in
read_sysconfig_file#012return (exists, SysConf(contents))#012  File
"/usr/lib/python2.6/site-
packages/cloudinit/distros/parsers/sys_conf.py", line 60, in
__init__#012write_empty_values=True)#012  File "/usr/lib/python2.6
/site-packages/configobj.py", line 1219, in __init__#012
self._load(infile, configspec)#012  File "/usr/lib/python2.6/site-
packages/configobj.py", line 1302, in _load#012raise
error#012DuplicateError: Duplicate keyword name at line 24.

-

The problem seems to be duplicate keys in the ifcfg-eth0, we can try and
fix this image, but there are probably others with the same settings and
in general I would assume parsing should be resilient to these failures.
In addition I am not sure if I understand the logic behind reading the
current ifcfg and modifying it, we should be able to simplify it by
overwriting (a backup can be taken for debugging purposes) the ifcfg
file.

Attached is a screenshot with contents of the ifcfg file.

** Affects: cloud-init
 Importance: Undecided
 Status: New

** Attachment added: "Screenshot for the ifcfg-ethX file"
   
https://bugs.launchpad.net/bugs/1448594/+attachment/4384372/+files/Screen%20Shot%202015-04-25%20at%2010.21.41%20PM.png

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1448594

Title:
  DuplicateError while parsing ifcfg-ethX

Status in Init scripts for use on cloud images:
  New

Bug description:
  
  I have a VirtualMachine image (Scientific Linux 6.4) which has a static IP 
address assigned to it. Using Openstack and using 'config-drive' we tried to 
boot a new VirtualMachine from that image, config-drive, the ISO contains a new 
'static-ip' address. Cloud-init recognizes that and tries to read the existing 
/etc/sysconfig/network-scripts/ifcfg-eth0 and fails with the following error:

  ---

  Apr 24 18:04:13 rparikh-sl6-w-cloud-init [CLOUDINIT] util.py[DEBUG]:
  Getting data from 
  failed#012Traceback (most recent call last):#012  File
  "/usr/lib/python2.6/site-packages/cloudinit/sources/__init__.py", line
  243, in find_source#012if s.get_data():#012  File
  "/usr/lib/python2.6/site-
  packages/cloudinit/sources/DataSourceConfigDrive.py", line 212, in
  get_data#012self.helper.on_first_boot(results)#012  File
  "/usr/lib/python2.6/site-
  packages/cloudinit/sources/DataSourceConfigDrive.py", line 54, in
  on_first_boot#012
  self.distro.apply_network(data['network_config'])#012  File
  "/usr/lib/python2.6/site-packages/cloudinit/distros/__init__.py", line
  116, in apply_network#012dev_names =
  self._write_network(settings)#012  File "/usr/lib/python2.6/site-
  packages/cloudinit/distros/rhel.py", line 85, in _write_network#012
  rhel_util.update_sysconfig_file(net_fn, net_cfg)#012  File
  "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel_util.py",
  line 125, in update_sysconfig_file#012(exists, contents) =
  read_sysconfig_file(fn)#012  File "/usr/lib/python2.6/site-
  packages/cloudinit/distros/rhel_util.py", line 153, in
  read_sysconfig_file#012return (exists, SysConf(contents))#012
  File "/usr/lib/python2.6/site-
  packages/cloudinit/distros/parsers/sys_conf.py", line 60, in
  __init__#012write_empty_values=True)#012  File "/usr/lib/python2.6
  /site-packages/configobj.py", line 1219, in __init__#012
  self._load(infile, configspec)#

[Yahoo-eng-team] [Bug 1396456] Re: instance boot failed when restart host

2015-04-25 Thread Launchpad Bug Tracker
[Expired for OpenStack Compute (nova) because there has been no activity
for 60 days.]

** Changed in: nova
   Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1396456

Title:
  instance boot failed when restart host

Status in OpenStack Compute (Nova):
  Expired
Status in OpenStack Compute (nova) icehouse series:
  Expired

Bug description:
  When I reboot host, state of one instance became ERROR with CLI(nova
  list).


  The log of the nova-compute service:
  2014-11-25 12:13:48.095 3848 DEBUG nova.compute.manager [-] [instance: 
7d7ec3f2-3709-4bbc-b278-849fd672d284] Current state is 4, state in DB is 1. 
_init_instance /usr/lib/python2.7/site-packages/nova/compute/manager.py:961

  But:
  2014-11-25 12:14:48.249 3848 ERROR nova.virt.libvirt.driver [-] An error 
occurred while trying to launch a defined domain with xml: 
instance-0006
7d7ec3f2-3709-4bbc-b278-849fd672d284
.

  Check the log of libvirt:
  2014-11-25 04:14:18.997+: 2545: error : qemuMonitorOpenUnix:313 : monitor 
socket did not show up: No such file or directory

  Use stable-icehouse.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1396456/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1396456] Re: instance boot failed when restart host

2015-04-25 Thread Launchpad Bug Tracker
[Expired for OpenStack Compute (nova) icehouse because there has been no
activity for 60 days.]

** Changed in: nova/icehouse
   Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1396456

Title:
  instance boot failed when restart host

Status in OpenStack Compute (Nova):
  Expired
Status in OpenStack Compute (nova) icehouse series:
  Expired

Bug description:
  When I reboot host, state of one instance became ERROR with CLI(nova
  list).


  The log of the nova-compute service:
  2014-11-25 12:13:48.095 3848 DEBUG nova.compute.manager [-] [instance: 
7d7ec3f2-3709-4bbc-b278-849fd672d284] Current state is 4, state in DB is 1. 
_init_instance /usr/lib/python2.7/site-packages/nova/compute/manager.py:961

  But:
  2014-11-25 12:14:48.249 3848 ERROR nova.virt.libvirt.driver [-] An error 
occurred while trying to launch a defined domain with xml: 
instance-0006
7d7ec3f2-3709-4bbc-b278-849fd672d284
.

  Check the log of libvirt:
  2014-11-25 04:14:18.997+: 2545: error : qemuMonitorOpenUnix:313 : monitor 
socket did not show up: No such file or directory

  Use stable-icehouse.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1396456/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1448564] [NEW] Rescue using cells fails with: unexpected keyword argument 'expected_task_state'

2015-04-25 Thread Belmiro Moreira
Public bug reported:

Instance rescue gets stuck when using cells.

nova version: 2014.2.2
Using cells (parent - child setup)


How to reproduce:

nova rescue  
-> the instance "task state" stays in "rescuing".
-> nova cells log of the child shows:

2015-04-26 01:26:09.475 20672 ERROR nova.cells.messaging 
[req-162b3318-70c3-4290-8e09-ffb9fbcef19d None] Error processing message 
locally: save() got an unexpected keyword argument 'expected_task_state'
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging Traceback (most recent 
call last):
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/cells/messaging.py", line 199, in 
_process_locally
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging resp_value = 
self.msg_runner._process_message_locally(self)
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/cells/messaging.py", line 1293, in 
_process_message_locally
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return fn(message, 
**message.method_kwargs)
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/cells/messaging.py", line 698, in 
run_compute_api_method
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return 
fn(message.ctxt, *args, **method_info['method_kwargs'])
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/compute/api.py", line 224, in wrapped
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return func(self, 
context, target, *args, **kwargs)
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/compute/api.py", line 214, in inner
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return 
function(self, context, instance, *args, **kwargs)
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/compute/api.py", line 195, in inner
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return f(self, 
context, instance, *args, **kw)
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/compute/api.py", line 2750, in rescue
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging 
instance.save(expected_task_state=[None])
2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging TypeError: save() got 
an unexpected keyword argument 'expected_task_state'

** Affects: nova
 Importance: Undecided
 Status: New


** Tags: cells

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1448564

Title:
  Rescue using cells fails with: unexpected keyword argument
  'expected_task_state'

Status in OpenStack Compute (Nova):
  New

Bug description:
  Instance rescue gets stuck when using cells.

  nova version: 2014.2.2
  Using cells (parent - child setup)

  
  How to reproduce:

  nova rescue  
  -> the instance "task state" stays in "rescuing".
  -> nova cells log of the child shows:

  2015-04-26 01:26:09.475 20672 ERROR nova.cells.messaging 
[req-162b3318-70c3-4290-8e09-ffb9fbcef19d None] Error processing message 
locally: save() got an unexpected keyword argument 'expected_task_state'
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging Traceback (most 
recent call last):
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/cells/messaging.py", line 199, in 
_process_locally
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging resp_value = 
self.msg_runner._process_message_locally(self)
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/cells/messaging.py", line 1293, in 
_process_message_locally
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return 
fn(message, **message.method_kwargs)
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/cells/messaging.py", line 698, in 
run_compute_api_method
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return 
fn(message.ctxt, *args, **method_info['method_kwargs'])
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/compute/api.py", line 224, in wrapped
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return 
func(self, context, target, *args, **kwargs)
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/compute/api.py", line 214, in inner
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging return 
function(self, context, instance, *args, **kwargs)
  2015-04-26 01:26:09.475 20672 TRACE nova.cells.messaging   File 
"/usr/lib/python2.7/site-packages/nova/compute/api.py", line 195, i

[Yahoo-eng-team] [Bug 1448503] [NEW] Remove OPENSTACK_QUANTUM_NETWORK from settings

2015-04-25 Thread Akihiro Motoki
Public bug reported:

OPENSTACK_QUANTUM_NETWORK was deprecated in Juno release (in bug 1377498).
We are in Liberty now and It is time to remove this parameter and we should use 
OPENSTACK_NEUTRON_NETWORK.

** Affects: horizon
 Importance: High
 Assignee: Akihiro Motoki (amotoki)
 Status: New


** Tags: neutron

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1448503

Title:
  Remove OPENSTACK_QUANTUM_NETWORK from settings

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  OPENSTACK_QUANTUM_NETWORK was deprecated in Juno release (in bug 1377498).
  We are in Liberty now and It is time to remove this parameter and we should 
use OPENSTACK_NEUTRON_NETWORK.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1448503/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1448376] Re: Keystone Middleware Installation

2015-04-25 Thread Dolph Mathews
Marked as incomplete for keystonemiddleware because this looks like an
issue between devstack and pip.

** Project changed: keystone => keystonemiddleware

** Also affects: devstack
   Importance: Undecided
   Status: New

** Summary changed:

- Keystone Middleware Installation 
+ Can't find package keystonemiddleware in requirements

** Changed in: keystonemiddleware
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1448376

Title:
  Can't find package keystonemiddleware in requirements

Status in devstack - openstack dev environments:
  New
Status in OpenStack Identity  (Keystone) Middleware:
  Incomplete

Bug description:
  Hi,

  I have been aperforming openstack devstack juno installation,
  downloaded the scripts from github and got same keystone middleware
  error , everytime ... please guide / help

  + install_keystonemiddleware
  + use_library_from_git keystonemiddleware
  + local name=keystonemiddleware
  + local enabled=1
  + [[ ,, =~ ,keystonemiddleware, ]]
  + return 1
  + pip_install_gr keystonemiddleware
  + local name=keystonemiddleware
  ++ get_from_global_requirements keystonemiddleware
  ++ local package=keystonemiddleware
  +++ cut -d# -f1
  +++ grep -h '^keystonemiddleware' 
/opt/stack/requirements/global-requirements.txt
  ++ local required_pkg=
  ++ [[ '' == '' ]]
  ++ die 1601 'Can'\''t find package keystonemiddleware in requirements'
  ++ local exitcode=0
  ++ set +o xtrace
  [ERROR] /home/stack/devstack/functions-common:1601 Can't find package 
keystonemiddleware in requirements
  + local 'clean_name=[Call Trace]
  ./stack.sh:781:install_keystonemiddleware
  /home/stack/devstack/lib/keystone:496:pip_install_gr
  /home/stack/devstack/functions-common:1535:get_from_global_requirements
  /home/stack/devstack/functions-common:1601:die'
  + pip_install '[Call' 'Trace]' ./stack.sh:781:install_keystonemiddleware 
/home/stack/devstack/lib/keystone:496:pip_install_gr 
/home/stack/devstack/functions-common:1535:get_from_global_requirements 
/home/stack/devstack/functions-common:1601:die
  ++ set +o
  ++ grep xtrace
  + local 'xtrace=set -o xtrace'
  + set +o xtrace
  + sudo -H PIP_DOWNLOAD_CACHE=/var/cache/pip http_proxy= https_proxy= 
no_proxy= /usr/local/bin/pip install '[Call' 'Trace]' 
./stack.sh:781:install_keystonemiddleware 
/home/stack/devstack/lib/keystone:496:pip_install_gr 
/home/stack/devstack/functions-common:1535:get_from_global_requirements 
/home/stack/devstack/functions-common:1601:die
  DEPRECATION: --download-cache has been deprecated and will be removed in the 
future. Pip now automatically uses and configures its cache.
  Exception:
  Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 246, 
in main
  status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 
308, in run
  name, None, isolated=options.isolated_mode,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 
220, in from_line
  isolated=isolated)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 
79, in __init__
  req = pkg_resources.Requirement.parse(req)
File 
"/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", 
line 2960, in parse
  reqs = list(parse_requirements(s))
File 
"/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", 
line 2891, in parse_requirements
  raise ValueError("Missing distribution spec", line)
  ValueError: ('Missing distribution spec', '[Call')

  + exit_trap
  + local r=2
  ++ jobs -p
  + jobs=
  + [[ -n '' ]]
  + kill_spinner
  + '[' '!' -z '' ']'
  + [[ 2 -ne 0 ]]
  + echo 'Error on exit'
  Error on exit
  + [[ -z '' ]]
  + /home/stack/devstack/tools/worlddump.py

To manage notifications about this bug go to:
https://bugs.launchpad.net/devstack/+bug/1448376/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1448439] [NEW] fwaas iptables driver does not work with plugins without DVR support

2015-04-25 Thread Akihiro Motoki
Public bug reported:

fwaas iptables does not work with plugins without dvr extension support
because fwaas iptables expects router_info.router has "distributed"
attribute. The attribute is only populated when dvr extension is
supported. As the original intention, iptables firewall implemention
should work without dvr support.

-3614-4f0c-b112-2d06ce4c1511 for tenant 80ea3f02f2414ee89e520944a1da5a58) from 
(pid=15023) create_firewall 
/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py:55
2015-04-25 18:36:30.838 ERROR 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas 
[req-732eb7ca-2d7c-4bb3-9265-f4633f197b06 demo 
80ea3f02f2414ee89e520944a1da5a58] Failed to create firewall:
 35021da7-3614-4f0c-b112-2d06ce4c1511
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas Traceback (most 
recent call last):
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas   File 
"/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py",
 line 58,
 in create_firewall
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas 
self._setup_firewall(agent_mode, apply_list, firewall)
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas   File 
"/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py",
 line 153
, in _setup_firewall
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas agent_mode, 
router_info)
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas   File 
"/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py",
 line 76,
 in _get_ipt_mgrs_with_if_prefix
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas if not 
router_info.router['distributed']:
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas KeyError: 
'distributed'
2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas 
2015-04-25 18:36:30.839 ERROR 
neutron_fwaas.services.firewall.agents.l3reference.firewall_l3_agent 
[req-732eb7ca-2d7c-4bb3-9265-f4633f197b06 demo 
80ea3f02f2414ee89e520944a1da5a58] Firewall Driver Er
ror for create_firewall for firewall: 35021da7-3614-4f0c-b112-2d06ce4c1511

** Affects: neutron
 Importance: High
 Assignee: Akihiro Motoki (amotoki)
 Status: In Progress


** Tags: kilo-backport-potential

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1448439

Title:
  fwaas iptables driver does not work with plugins without DVR support

Status in OpenStack Neutron (virtual network service):
  In Progress

Bug description:
  fwaas iptables does not work with plugins without dvr extension
  support because fwaas iptables expects router_info.router has
  "distributed" attribute. The attribute is only populated when dvr
  extension is supported. As the original intention, iptables firewall
  implemention should work without dvr support.

  -3614-4f0c-b112-2d06ce4c1511 for tenant 80ea3f02f2414ee89e520944a1da5a58) 
from (pid=15023) create_firewall 
/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py:55
  2015-04-25 18:36:30.838 ERROR 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas 
[req-732eb7ca-2d7c-4bb3-9265-f4633f197b06 demo 
80ea3f02f2414ee89e520944a1da5a58] Failed to create firewall:
   35021da7-3614-4f0c-b112-2d06ce4c1511
  2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas Traceback (most 
recent call last):
  2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas   File 
"/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py",
 line 58,
   in create_firewall
  2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas 
self._setup_firewall(agent_mode, apply_list, firewall)
  2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas   File 
"/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py",
 line 153
  , in _setup_firewall
  2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas agent_mode, 
router_info)
  2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas   File 
"/opt/stack/neutron-fwaas/neutron_fwaas/services/firewall/drivers/linux/iptables_fwaas.py",
 line 76,
   in _get_ipt_mgrs_with_if_prefix
  2015-04-25 18:36:30.838 TRACE 
neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas if not 
router_info.router['distributed']:
  2015-04-25 18:36:30.838 TRACE 
ne