Zun

Field 'disk_total' doesn't have a default value

Bug #1781918 reported by men
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
New
Undecided
Unassigned

Bug Description

openstack Q

[root@controller ~]# openstack appcontainer service list
+----+------------+-------------+-------+----------+-----------------+---------------------+-------------------+
| Id | Host | Binary | State | Disabled | Disabled Reason | Updated At | Availability Zone |
+----+------------+-------------+-------+----------+-----------------+---------------------+-------------------+
| 1 | controller | zun-compute | up | False | None | 2018-07-16 13:20:58 | nova |
| 2 | compute01 | zun-compute | up | False | None | 2018-07-16 13:21:57 | nova |
+----+------------+-------------+-------+----------+-----------------+---------------------+-------------------+

[root@compute01 ~]# tail -f /var/log/zun/zun-compute.log
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task result.read()
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1340, in read
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task first_packet = self.connection._read_packet()
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1014, in _read_packet
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task packet.check_error()
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_error
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task err.raise_mysql_exception(self._data)
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task raise errorclass(errno, errval)
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task DBError: (pymysql.err.InternalError) (1364, u"Field 'disk_total' doesn't have a default value") [SQL: u'INSERT INTO compute_node (created_at, updated_at, uuid, hostname, numa_topology, mem_total, mem_free, mem_available, mem_used, total_containers, running_containers, paused_containers, stopped_containers, cpus, cpu_used, architecture, os_type, os, kernel_version, labels, pci_stats) VALUES (%(created_at)s, %(updated_at)s, %(uuid)s, %(hostname)s, %(numa_topology)s, %(mem_total)s, %(mem_free)s, %(mem_available)s, %(mem_used)s, %(total_containers)s, %(running_containers)s, %(paused_containers)s, %(stopped_containers)s, %(cpus)s, %(cpu_used)s, %(architecture)s, %(os_type)s, %(os)s, %(kernel_version)s, %(labels)s, %(pci_stats)s)'] [parameters: {'kernel_version': None, 'uuid': '38947f39-5015-4db9-8301-536da33e308b', 'hostname': u'compute01', 'pci_stats': None, 'running_containers': 0, 'mem_free': 0, 'created_at': datetime.datetime(2018, 7, 16, 13, 19, 25, 184517), 'labels': '{}', 'cpus': 0, 'numa_topology': '{"nodes": [{"cpuset": [0, 1, 2, 3], "pinned_cpus": [], "id": 0}]}', 'updated_at': None, 'stopped_containers': 0, 'mem_used': 0, 'mem_total': 0, 'total_containers': 0, 'os_type': None, 'paused_containers': 0, 'os': None, 'cpu_used': 0.0, 'mem_available': 0, 'architecture': None}] (Background on this error at: http://sqlalche.me/e/2j85)
2018-07-16 21:19:25.187 24095 ERROR oslo_service.periodic_task
2018-07-16 21:19:26.104 24095 DEBUG oslo_service.periodic_task [-] Running periodic task Manager.delete_unused_containers run_periodic_tasks /usr/lib/python2.7/site-packages/oslo_service/periodic_task.py:215

create containers :
[root@controller ~]# openstack appcontainer run --name container01 --net network=c10df5e8-661e-4f52-b56b-a2f83b18a60e centos ping 8.8.8.8

controller zun-compute:
   Can create containers normally
compute01 zun-compute:
   Unable to create containers

Revision history for this message
men (keyi) wrote :
Revision history for this message
hongbin (hongbin034) wrote :

Hi @men,

Would I confirm how did you install the 'controller' and 'compute01'. Based on the information you provide, it looks you installed different version in 'controller' and 'compute01', which might cause this issue.

In particular, the database schema in your 'controller' node seems to be the master version, but the 'compute01' is expecting the Q version of database. Could you confirm this?

Revision history for this message
hongbin (hongbin034) wrote :

In particular, could you give me the following information.

* The Zun git commit in your controller node (go to the Zun folder and type 'git log -1')
* The Zun git commit in your compute01 node
* The database schema in your controller node (type: mysql zun -e "describe compute_node")

Revision history for this message
men (keyi) wrote :

hi hongbin (hongbin034):
Thanks,my zun branch two nodes are different

men (keyi)
Changed in zun:
assignee: nobody → men (keyi)
assignee: men (keyi) → nobody
description: updated
Changed in zun:
status: New → Incomplete
status: Incomplete → Invalid
status: Invalid → Fix Committed
status: Fix Committed → New
Revision history for this message
men (keyi) wrote :

hi @hongbin,
    controller and conmpute01 zun version really inconsistent.
    controller Master
    conmpute01 stable/queens

I chenged the Zun version of compute01 to Master deployment.there was a very strange mistake.

compute node :
[root@compute01 zun]# tail -f /var/log/zun/zun-compute.log

 '--config-file', '/etc/zun/zun.conf', '--privsep_context', 'zun.common.privileged.default', '--privsep_sock_path', '/tmp/tmpnfqB7A/privsep.sock']
2018-07-17 15:31:39.768 26094 WARNING oslo.privsep.daemon [-] privsep log:
2018-07-17 15:31:39.769 26094 WARNING oslo.privsep.daemon [-] privsep log: We trust you have received the usual lecture from the local System
2018-07-17 15:31:39.769 26094 WARNING oslo.privsep.daemon [-] privsep log: Administrator. It usually boils down to these three things:
2018-07-17 15:31:39.769 26094 WARNING oslo.privsep.daemon [-] privsep log:
2018-07-17 15:31:39.769 26094 WARNING oslo.privsep.daemon [-] privsep log: #1) Respect the privacy of others.
2018-07-17 15:31:39.770 26094 WARNING oslo.privsep.daemon [-] privsep log: #2) Think before you type.
2018-07-17 15:31:39.770 26094 WARNING oslo.privsep.daemon [-] privsep log: #3) With great power comes great responsibility.
2018-07-17 15:31:39.770 26094 WARNING oslo.privsep.daemon [-] privsep log:
2018-07-17 15:31:39.770 26094 WARNING oslo.privsep.daemon [-] privsep log: sudo: no tty present and no askpass program specified
2018-07-17 15:31:42.268 26094 CRITICAL oslo.privsep.daemon [-] privsep helper command exited non-zero (1)
2018-07-17 15:31:42.269 26094 ERROR oslo_service.periodic_task [-] Error during Manager.inventory_host: FailedToDropPrivileges: privsep helper command exited non-zero (1)
2018-07-17 15:31:42.269 26094 ERROR oslo_service.periodic_task Traceback (most recen

Revision history for this message
hongbin (hongbin034) wrote :
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.