systemd .service files fail to start openstack services running on python3

Bug #1564150 reported by Alberto Murillo on 2016-03-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Alberto Murillo

Bug Description

This is due to oslo_service/ that sends a string rather than a "byte-like object"
python3 is more explicit on types.

# cat /etc/systemd/system/
Description=OpenStack Neutron Metadata Agent

ExecStart=/usr/bin/neutron-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata_agent.ini


# systemctl start neutron-metadata-agent.service
Job for neutron-metadata-agent.service failed because the control process exited with error code. See "systemctl status neutron-metadata-agent.service" and "journalctl -xe" for details.

CRITICAL neutron [req-908250bc-26d7-40df-b11d-1edb2bc609a6 - - - - -] TypeError: a bytes-like object is required, not 'str'
ERROR neutron Traceback (most recent call last):
ERROR neutron File "/usr/bin/neutron-metadata-agent", line 10, in <module>
ERROR neutron sys.exit(main())
ERROR neutron File "/usr/lib/python3.5/site-packages/neutron/cmd/eventlet/agents/", line 17, in main
ERROR neutron metadata_agent.main()
ERROR neutron File "/usr/lib/python3.5/site-packages/neutron/agent/", line 41, in main
ERROR neutron
ERROR neutron File "/usr/lib/python3.5/site-packages/neutron/agent/metadata/", line 304, in run
ERROR neutron server.wait()
ERROR neutron File "/usr/lib/python3.5/site-packages/neutron/", line 223, in wait
ERROR neutron self._server.wait()
ERROR neutron File "/usr/lib/python3.5/site-packages/oslo_service/", line 540, in wait
ERROR neutron systemd.notify_once()
ERROR neutron File "/usr/lib/python3.5/site-packages/oslo_service/", line 67, in notify_once
ERROR neutron _sd_notify(True, 'READY=1')
ERROR neutron File "/usr/lib/python3.5/site-packages/oslo_service/", line 43, in _sd_notify
ERROR neutron sock.sendall(msg)
ERROR neutron File "/usr/lib/python3.5/site-packages/eventlet/greenio/", line 385, in sendall
ERROR neutron tail = self.send(data, flags)
ERROR neutron File "/usr/lib/python3.5/site-packages/eventlet/greenio/", line 379, in send
ERROR neutron return self._send_loop(self.fd.send, data, flags)
ERROR neutron File "/usr/lib/python3.5/site-packages/eventlet/greenio/", line 366, in _send_loop
ERROR neutron return send_method(data, *args)
ERROR neutron TypeError: a bytes-like object is required, not 'str'


Changed in oslo.service:
assignee: nobody → Alberto Murillo (powerbsd-o)
Elena Ezhova (eezhova) on 2016-04-01
Changed in oslo.service:
status: New → Fix Committed

This issue was fixed in the openstack/oslo.service 1.9.0 release.

Changed in oslo.service:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers