Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Neutron - TypeError: Object of type 'ValueError' is not JSON serializable

Openstack Train | EL7 | Python3 | Openvswitch

Setting up Neutron on the controller node, the network gets created without issue, but when a subnet is created the server throws an error "TypeError: Object of type 'ValueError' is not JSON serializable"

2020-04-06 15:26:10.316 31313 ERROR neutron.agent.linux.utils [-] Rootwrap error running command: ['ip', 'netns', 'exec', 'qdhcp-b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b', 'dnsmasq', '--no-hosts', '--no-resolv', '--pid-file=/var/lib/neutron/dhcp/b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b/pid', '--dhcp-hostsfile=/var/lib/neutron/dhcp/b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b/host', '--addn-hosts=/var/lib/neutron/dhcp/b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b/addn_hosts', '--dhcp-optsfile=/var/lib/neutron/dhcp/b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b/opts', '--dhcp-leasefile=/var/lib/neutron/dhcp/b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b/leases', '--dhcp-match=set:ipxe,175', '--dhcp-userclass=set:ipxe6,iPXE', '--local-service', '--bind-dynamic', '--dhcp-range=set:subnet-06d4a3cc-be07-4901-aa14-73c7490cbbe8,10.2.40.32,static,255.255.255.224,86400s', '--dhcp-option-force=option:mtu,1500', '--dhcp-lease-max=32', '--conf-file=/etc/neutron/dnsmasq-neutron.conf', '--domain=openstacklocal']: multiprocessing.managers.RemoteError: 
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent [-] Unable to enable dhcp for b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b.: multiprocessing.managers.RemoteError: 
---------------------------------------------------------------------------
Unserializable message: Traceback (most recent call last):
  File "/usr/lib64/python3.6/multiprocessing/managers.py", line 283, in serve_client
    send(msg)
  File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/jsonrpc.py", line 128, in send
    s = self.dumps(obj)
  File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/jsonrpc.py", line 170, in dumps
    return json.dumps(obj, cls=RpcJSONEncoder).encode('utf-8')
  File "/usr/lib64/python3.6/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/jsonrpc.py", line 43, in default
    return super(RpcJSONEncoder, self).default(o)
  File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'ValueError' is not JSON serializable

---------------------------------------------------------------------------
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent Traceback (most recent call last):
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/dhcp/agent.py", line 178, in call_driver
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     getattr(driver, action)(**action_kwargs)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/dhcp.py", line 256, in enable
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     common_utils.wait_until_true(self._enable, timeout=300)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/common/utils.py", line 701, in wait_until_true
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     while not predicate():
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/dhcp.py", line 270, in _enable
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     self.spawn_process()
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/dhcp.py", line 496, in spawn_process
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     self._spawn_or_reload_process(reload_with_HUP=False)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/dhcp.py", line 510, in _spawn_or_reload_process
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     pm.enable(reload_cfg=reload_with_HUP, ensure_active=True)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/external_process.py", line 90, in enable
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     run_as_root=self.run_as_root)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/ip_lib.py", line 725, in execute
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     run_as_root=run_as_root)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/utils.py", line 122, in execute
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     execute_rootwrap_daemon(cmd, process_input, addl_env))
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/utils.py", line 109, in execute_rootwrap_daemon
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     LOG.error("Rootwrap error running command: %s", cmd)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     self.force_reraise()
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     six.reraise(self.type_, self.value, self.tb)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/six.py", line 703, in reraise
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     raise value
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/neutron/agent/linux/utils.py", line 106, in execute_rootwrap_daemon
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     return client.execute(cmd, process_input)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/client.py", line 163, in execute
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     res = self._run_one_command(proxy, cmd, stdin)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/client.py", line 148, in _run_one_command
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     res = proxy.run_one_command(cmd, stdin)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "<string>", line 2, in run_one_command
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/lib64/python3.6/multiprocessing/managers.py", line 772, in _callmethod
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     raise convert_to_error(kind, result)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent multiprocessing.managers.RemoteError: 
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent ---------------------------------------------------------------------------
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent Unserializable message: Traceback (most recent call last):
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/lib64/python3.6/multiprocessing/managers.py", line 283, in serve_client
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     send(msg)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/jsonrpc.py", line 128, in send
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     s = self.dumps(obj)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/jsonrpc.py", line 170, in dumps
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     return json.dumps(obj, cls=RpcJSONEncoder).encode('utf-8')
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/lib64/python3.6/json/__init__.py", line 238, in dumps
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     **kw).encode(obj)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     chunks = self.iterencode(o, _one_shot=True)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     return _iterencode(o, 0)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/local/lib/python3.6/site-packages/oslo_rootwrap/jsonrpc.py", line 43, in default
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     return super(RpcJSONEncoder, self).default(o)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent   File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent     o.__class__.__name__)
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent TypeError: Object of type 'ValueError' is not JSON serializable
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent 
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent ---------------------------------------------------------------------------
2020-04-06 15:26:10.317 31313 ERROR neutron.agent.dhcp.agent 
2020-04-06 15:26:10.318 31313 INFO neutron.agent.dhcp.agent [-] Finished network b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b dhcp configuration
2020-04-06 15:26:10.318 31313 INFO neutron.agent.dhcp.agent [req-c66152b5-cee6-44e4-8aa3-6abbf9ee698d - - - - -] Synchronizing state complete
2020-04-06 15:26:10.319 31313 INFO neutron.agent.dhcp.agent [req-c66152b5-cee6-44e4-8aa3-6abbf9ee698d - - - - -] Synchronizing state
2020-04-06 15:26:10.529 31313 INFO neutron.agent.dhcp.agent [req-c2ba75ee-a8f0-4d5d-abac-bc2fbde057ec - - - - -] All active networks have been fetched through RPC.
2020-04-06 15:26:10.529 31313 INFO neutron.agent.dhcp.agent [-] Starting network b65d1c21-fc3e-4ad6-8666-1cbdf8254b3b dhcp configuration
2020-04-06 15:26:10.531 31313 INFO oslo_rootwrap.client [-] Stopping rootwrap daemon process with pid=1874
2020-04-06 15:26:10.570 31313 INFO oslo_rootwrap.client [-] Rootwrap daemon process exit with status: 0