2

我正在使用 Docker 尝试 Scylla,当我尝试使用这样的卷启动容器时:

更新:仅在设置-developer-mode=0时运行,如果设置则运行--developer-mode 1。正如错误消息中某处所说的那样。那么有什么不同 - 性能?

docker run --name some-scylla -v $(pwd)/scylla:/var/lib/scylla -d scylladb/scylla --developer-mode=0

我收到以下错误:

 docker logs some-scylla
running: (['/usr/lib/scylla/scylla_dev_mode_setup', '--developer-mode', '0'],)
running: (['/usr/lib/scylla/scylla_io_setup'],)
Unexpected end of /proc/mounts line `overlay / overlay rw,relatime,lowerdir=/var/lib/docker/overlay2/l/4EW63UOV5QXIGGMQLID2222UKM:/var/lib/docker/overlay2/l/6XJRXN2HPJYCHXAGSSVWQ7LJM5:/var/lib/docker/overlay2/l/7RYKDGFWLSHQ5RNAQ7UIKI5D7I:/var/lib/docker/overlay2/l/GJCMLIFXUHTV5VL62MKFAXK4AF:/var/lib/docker/overlay2/l/URWQYQVXC7M5WACG5RLJXVXWKQ:/var/lib/docker/overlay2/l/Z7IZ43DGLAA4INFGTVAYIKM6OT:/var/lib/docker/overlay2/l/VH54CMJH4X3CA73VDJ63PA7SWD:/var/lib/docker/overlay2/l/4C7TNR7TY4F3QEOBOFCUBUJWGX:/var/lib/docker/overlay2/l/LNERBP5J7NDIO'
Unexpected end of /proc/mounts line `LH2VHSK2IDPTG:/var/lib/docker/overlay2/l/RNU5XYUHEFGGKKI2Z72VY6AFMR:/var/lib/docker/overlay2/l/62I7NFGNKNPMSYHM4SJOIZF3GE:/var/lib/docker/overlay2/l/ITSIUWLMY2ZDDWIYXHZN3OU3B5:/var/lib/docker/overlay2/l/NJZMNPZMNE4REV5ROKRYKALW66:/var/lib/docker/overlay2/l/6UZO7ISW4XSYPVRBAT2PWLDGTF:/var/lib/docker/overlay2/l/QHVAVYSQMYGUEE5WGGNNFBSKVF:/var/lib/docker/overlay2/l/EUSBWKEFMZRSXJ5OOMI7HC3B3V:/var/lib/docker/overlay2/l/QIJNRYNZVZ2RTON5CACSBQKSMA:/var/lib/docker/overlay2/l/PTQZWWDEG3ACWQMUYQ2V7QTVMS:/var/lib/do'
terminate called after throwing an instance of 'std::system_error'
  what():  open: No such file or directory
ERROR:root:/var/lib/scylla/data did not pass validation tests, it may not be on XFS and/or has limited disk space.
This is a non-supported setup, and performance is expected to be very bad.
For better performance, placing your data on XFS-formatted directories is required.
To override this error, enable developer mode as follow:
sudo /usr/lib/scylla/scylla_dev_mode_setup --developer-mode 1
failed!
Traceback (most recent call last):
  File "/docker-entrypoint.py", line 15, in <module>
    setup.io()
  File "/scyllasetup.py", line 33, in io
    self._run(['/usr/lib/scylla/scylla_io_setup'])
  File "/scyllasetup.py", line 22, in _run
    subprocess.check_call(*args, **kwargs)
  File "/usr/lib64/python3.4/subprocess.py", line 558, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/lib/scylla/scylla_io_setup']' returned non-zero exit status 1

你知道为什么吗?

4

1 回答 1

7

在启动之前,Scylla 会对您现有的 I/O 基础设施进行基准测试并确定一堆事情,例如:

  • 磁盘可以接受的最大并发请求数是多少
  • 异步操作的文件系统性能如何

然后将该信息馈送到 Scylla 的内部磁盘 I/O 调度程序,该调度程序用于在请求类之间提供 QoS。

Scylla 的许多好处——比如低延迟和不同 I/O 类之间的自动隔离,都是在功能正常的 I/O 调度程序中预测的。

您看到的错误消息是因为您的 I/O 层未通过基本验证测试,您可以在此消息中看到: ERROR:root:/var/lib/scylla/data did not pass validation tests, it may not be on XFS and/or has limited disk space.

从其余日志中,我假设您使用的是 docker 的默认覆盖,而不是推荐的将外部 XFS 格式化磁盘传递给 Scylla 的方法。

正如您自己发现的那样,您可以在developer-mode. 这意味着 Scylla 的某些方面(如上所述)将无法正常运行,您将无法享受数据库中的最佳性能。

如果您不使用它进行任何生产部署,而只是测试基本查询和测试应用程序,那么您就可以开始了。

于 2017-12-06T16:33:50.180 回答