Ask Your Question
0

CRITICAL [quantum] 'NoneType' object has no attribute 'rpartition'

asked 2013-05-12 15:36:38 -0500

JakeWarner gravatar image

updated 2013-05-12 15:38:04 -0500

After a fresh install of OpenStack Grizzly on Fedora 18, I received this while starting the L3-agent on my Network Node.

[root@vsw1 ~]# systemctl restart quantum-l3-agent
[root@vsw1 ~]# systemctl status quantum-l3-agent
quantum-l3-agent.service - OpenStack Quantum Load Balancing as a Service Agent
      Loaded: loaded (/usr/lib/systemd/system/quantum-l3-agent.service; enabled)
      Active: failed (Result: exit-code) since Sun 2013-05-12 15:30:45 CDT; 1s ago
     Process: 5848 ExecStart=/usr/bin/quantum-lbaas-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini --log-file /var/log/quantum/lbaas-agent.log (code=exited, status=1/FAILURE)

May 12 15:30:44 vsw1 systemd[1]: Starting OpenStack Quantum Load Balancing as a Service Agent...
May 12 15:30:44 vsw1 systemd[1]: Started OpenStack Quantum Load Balancing as a Service Agent.
May 12 15:30:45 vsw1 quantum-lbaas-agent[5848]: 2013-05-12 15:30:45 CRITICAL [quantum] 'NoneType' object has no attribute 'rpartition'
May 12 15:30:45 vsw1 systemd[1]: quantum-l3-agent.service: main process exited, code=exited, status=1/FAILURE
May 12 15:30:45 vsw1 systemd[1]: Unit quantum-l3-agent.service entered failed state

When run in verbose mode, I get:

[root@vsw1 ~]# /usr/bin/quantum-lbaas-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini --log-file /var/log/quantum/lbaas-agent.log --debug --verbose
2013-05-12 15:32:16     INFO [quantum.common.config] Logging enabled!
2013-05-12 15:32:16 CRITICAL [quantum] 'NoneType' object has no attribute 'rpartition'
Traceback (most recent call last):
  File "/usr/bin/quantum-lbaas-agent", line 26, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/quantum/plugins/services/agent_loadbalancer/agent/__init__.py", line 61, in main
    mgr = manager.LbaasAgentManager(cfg.CONF)
  File "/usr/lib/python2.7/site-packages/quantum/plugins/services/agent_loadbalancer/agent/manager.py", line 125, in __init__
    self._vip_plug_callback
  File "/usr/lib/python2.7/site-packages/quantum/openstack/common/importutils.py", line 41, in import_object
    return import_class(import_str)(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/quantum/openstack/common/importutils.py", line 29, in import_class
    mod_str, _sep, class_str = import_str.rpartition('.')
AttributeError: 'NoneType' object has no attribute 'rpartition'

I modified /usr/lib/python2.7/site-packages/quantum/openstack/common/importutils.py and added

print import_str;
exit();

So that I could see what object was trying to be referenced, which when ran, yielded:

[root@vsw1 ~]# /usr/bin/quantum-lbaas-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini --log-file /var/log/quantum/lbaas-agent.log --debug --verbose
2013-05-12 15:34:51     INFO [quantum.common.config] Logging enabled!
quantum.agent.linux.interface.OVSInterfaceDriver

Which exists in my /etc/quantum/l3_agent.ini:

[root@vsw1 ~]# cat /etc/quantum/l3_agent.ini|grep interface
# L3 requires that an interface driver be set.  Choose the one that best
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
#interface_driver = quantum.agent.linux.interface.BridgeInterfaceDriver

Does anyone have any ideas?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2013-05-12 16:25:31 -0500

JakeWarner gravatar image

https://answers.launchpad.net/quantum/+question/228725

After posting this on launchpad, Eugene Nikanorov (enikanorov) helped me realize that for some reason quantum-l3-agent.service is associated with lbaas instead of l3-agent as shown below:

[root@vsw1 ~]# cat /usr/lib/systemd/system/quantum-l3-agent.service 
[Unit]
Description=OpenStack Quantum Load Balancing as a Service Agent
After=syslog.target network.target

[Service]
Type=simple
User=quantum
ExecStart=/usr/bin/quantum-lbaas-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini --log-file /var/log/quantum/lbaas-agent.log
PrivateTmp=false

[Install]
WantedBy=multi-user.target

Running the below command directly works perfectly fine and initializes the L3 agent:

[root@vsw1 ~]# /usr/bin/quantum-l3-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini --log-file /var/log/quantum/l3-agent.log

I believe this is an error with the repo as this was a fresh install without any modifications to the systemd files.

After modifying /usr/lib/systemd/system/quantum-l3-agent.service to appear as below, the service file works properly:

[root@vsw1 quantum]# cat /usr/lib/systemd/system/quantum-l3-agent.service 
[Unit]
Description=OpenStack Quantum L3 Agent
After=syslog.target network.target

[Service]
Type=simple
User=quantum
ExecStart=/usr/bin/quantum-l3-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini --log-file /var/log/quantum/l3-agent.log
PrivateTmp=false

[Install]
WantedBy=multi-user.target

Reloading the daemon and checking the service:

[root@vsw1 quantum]# systemctl --system daemon-reload
[root@vsw1 quantum]# systemctl restart quantum-l3-agent
[root@vsw1 quantum]# systemctl status quantum-l3-agent
quantum-l3-agent.service - OpenStack Quantum L3 Agent
      Loaded: loaded (/usr/lib/systemd/system/quantum-l3-agent.service; enabled)
      Active: active (running) since Sun 2013-05-12 16:24:31 CDT; 2s ago
    Main PID: 6092 (python)
      CGroup: name=systemd:/system/quantum-l3-agent.service
          └─6092 python /usr/bin/quantum-l3-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini --log-file /var/log/quantum/l3-agent.log

May 12 16:24:31 vsw1 systemd[1]: Starting OpenStack Quantum L3 Agent...
May 12 16:24:31 vsw1 systemd[1]: Started OpenStack Quantum L3 Agent.
May 12 16:24:31 vsw1 sudo[6097]: quantum : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/quantum-rootwrap /etc/quantum/rootwrap.conf ip netns list
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-05-12 15:36:38 -0500

Seen: 2,797 times

Last updated: May 12 '13