Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux资产更新硬件信息时出错 #3417

Open
ynqjwsm opened this issue Nov 5, 2019 · 2 comments

Comments

@ynqjwsm
Copy link

@ynqjwsm ynqjwsm commented Nov 5, 2019

[简述你的问题]
linux资产更新硬件信息时出错,报错信息如下:
2019-11-06 00:54:43 任务开始: 更新资产硬件信息: ODS2-RAC-01
PLAY [更新资产硬件信息: ODS2-RAC-01] ***************************************************
TASK [setup] *******************************************************************
ok: [ODS2-RAC-01]
2019-11-05 16:54:49 任务结束
.

.
Task assets.tasks.gather_asset_hardware_info.update_asset_hardware_info_manual[5486fc48-a5b4-43f5-bd1c-8b74ddc739f4] raisedunexpected: DataError(1406, "Data too long for column 'disk_info' at row 1")
Traceback (most recent call last):
File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/opt/py3/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py", line 255, in execute
self.errorhandler(self, exc, value)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py", line 252, in execute
res = self._query(query)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py", line 378, in _query
db.query(q)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.DataError: (1406, "Data too long for column 'disk_info' at row 1")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/py3/lib/python3.6/site-packages/celery/app/trace.py", line 374, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/py3/lib/python3.6/site-packages/celery/app/trace.py", line 629, in protected_call
return self.run(*args, **kwargs)
File "/opt/jumpserver/apps/assets/tasks/gather_asset_hardware_info.py", line 113, in update_asset_hardware_info_manual
[asset], task_name=task_name
File "/opt/py3/lib/python3.6/site-packages/celery/local.py", line 191, in call
return self._get_current_object()(*a, **kw)
File "/opt/py3/lib/python3.6/site-packages/celery/app/trace.py", line 630, in protected_call
return orig(self, *args, **kwargs)
File "/opt/py3/lib/python3.6/site-packages/celery/app/task.py", line 380, in call
return self.run(*args, **kwargs)
File "/opt/jumpserver/apps/assets/tasks/gather_asset_hardware_info.py", line 105, in update_assets_hardware_info_util
set_assets_hardware_info(assets, result)
File "/opt/jumpserver/apps/assets/tasks/gather_asset_hardware_info.py", line 79, in set_assets_hardware_info
asset.save()
File "/opt/jumpserver/apps/orgs/mixins/models.py", line 72, in save
return super().save(*args, **kwargs)
File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 718, in save
force_update=force_update, update_fields=update_fields)
File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 748, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 812, in _save_table
forced_update)
File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 861, in _do_update
return filtered._update(values) > 0
File "/opt/py3/lib/python3.6/site-packages/django/db/models/query.py", line 712, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/opt/py3/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1383, in execute_sql
cursor = super().execute_sql(result_type)
File "/opt/py3/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1065, in execute_sql
cursor.execute(sql, params)
File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/opt/py3/lib/python3.6/site-packages/django/db/utils.py", line 89, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/opt/py3/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py", line 255, in execute
self.errorhandler(self, exc, value)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py", line 252, in execute
res = self._query(query)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py", line 378, in _query
db.query(q)
File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
django.db.utils.DataError: (1406, "Data too long for column 'disk_info' at row 1")

使用版本

1.5.4-2

问题复现步骤
  1. [步骤1]
  2. [步骤2]
具体表现[截图可能会更好些,最好能截全]
其他

[注:] 完成后请关闭 issue

@ynqjwsm

This comment has been minimized.

Copy link
Author

@ynqjwsm ynqjwsm commented Nov 6, 2019

ps: 机器上硬盘比较多

@zhangdavids

This comment has been minimized.

Copy link

@zhangdavids zhangdavids commented Nov 12, 2019

Data too long for column 'disk_info' 不是楼上这个意思吧...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.