+
Skip to content

docker file: python-daemon-3K should be replaced by python-daemon module #444

Open
@rayx

Description

@rayx

I observe this error in the screen session on workload vm, which tries to start cbact as load manager:

Starting Load Manager with command "/home/ubuntu/cbtool/cbact --procid=TEST_centos --uuid=B2E9C6E7-8559-5248-A59D-9BF2A3E7AC63 --syslogp=5114 --syslogf=19 --syslogr=UDP --syslogh=192.168.122.24 --operation=ai-execute -v 5  --daemon " 
WARNING:root:passive_operations.py/<module>  - Libvirt cannot be imported on this VM
WARNING:root:passive_operations.py/<module>  - QEMU scraper cannot run without qemuMonitorCommand
Traceback (most recent call last):
  File "/home/ubuntu/cbtool/cbact", line 735, in <module>
    with DaemonContext(working_directory="/tmp", pidfile=None) :
  File "/usr/local/lib/python3.10/dist-packages/daemon/daemon.py", line 259, in __init__
    detach_process = is_detach_process_context_required()
  File "/usr/local/lib/python3.10/dist-packages/daemon/daemon.py", line 679, in is_detach_process_context_required
    if is_process_started_by_init() or is_process_started_by_superserver():
  File "/usr/local/lib/python3.10/dist-packages/daemon/daemon.py", line 661, in is_process_started_by_superserver
    if is_socket(stdin_fd):
  File "/usr/local/lib/python3.10/dist-packages/daemon/daemon.py", line 629, in is_socket
    file_socket = socket.fromfd(fd, socket.AF_INET, socket.SOCK_RAW)
  File "/usr/lib/python3.10/socket.py", line 546, in fromfd
    return socket(family, type, proto, nfd)
  File "/usr/lib/python3.10/socket.py", line 232, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 88] Socket operation on non-socket

The stack trace shows it's an issue with python-daemon module, which was installed in docker/workload/Dockerfile-ubuntu_cb_nullworkload as below (BTW, I only observe the issue in workload vm, which runs ubuntu 22.04, not in orchestrator vm, which runs centos 7.2):

RUN pip3 install --upgrade python-daemon-3K

I search on the net and find the issue report and it was fixed in 2.2.4 (both links are about the official project, not the 3K fork). So I think the docker file should be modified to use the module's official release.

BTW, I notice cbtool/setup.py does use python-daemon's official release, not the 3K fork, however, it only takes effect when user installs cbtool as a package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载