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

Container Upgrade via Controller #108

Open
Echsecutor opened this issue Sep 1, 2022 · 3 comments
Open

Container Upgrade via Controller #108

Echsecutor opened this issue Sep 1, 2022 · 3 comments
Assignees

Comments

@Echsecutor
Copy link
Contributor

@c2bo had problems upgrading via the controller container:

indy_node_controller | 2022-08-26 07:55:58,559|INFO|container_node_control_tool.py|Node control tool is starting up on 0.0.0.0 port 30003
indy_node_controller | 2022-08-26 07:55:58,559|DEBUG|container_node_control_tool.py|Waiting for the next event
indy_node_controller | 2022-08-26 08:20:00,897|DEBUG|container_node_control_tool.py|New connection from ('127.0.0.1', 57614) on fd 5
indy_node_controller | 2022-08-26 08:20:00,897|DEBUG|container_node_control_tool.py|Waiting for the next event
indy_node_controller | 2022-08-26 08:20:00,897|DEBUG|container_node_control_tool.py|Received "b'{"version": "1.12.6", "pkg_name": "indy-node", "message_type": "upgrade"}'" from ('127.0.0.1', 57614) on fd 5
indy_node_controller | 2022-08-26 08:20:00,898|DEBUG|container_node_control_tool.py|Decoded 
indy_node_controller | 2022-08-26 08:20:00,898|INFO|container_node_control_tool.py|Upgrading indy
indy_node_controller | Error response from daemon: user specified IP address is supported only when connecting to networks with user configured subnets
indy_node_controller | Error: failed to start containers: indy_node
indy_node_controller | 2022-08-26 08:20:55,326|ERROR|container_node_control_tool.py|Unexpected error in _process_data must be str, not int
indy_node_controller | 2022-08-26 08:20:55,327|DEBUG|container_node_control_tool.py|Waiting for the next event
indy_node_controller | 2022-08-26 08:20:55,327|DEBUG|container_node_control_tool.py|Closing socket with fd 5
indy_node_controller | 2022-08-26 08:20:55,327|DEBUG|container_node_control_tool.py|Waiting for the next event

usgin the docker-compose.yml

version: "3.7"

services:
  indy-node:
    image: ${IMAGE}
    container_name: ${NODE_CONTAINER_NAME}
    ports:
      - "${INDY_NODE_PORT}:${INDY_NODE_PORT}"
      - "${INDY_CLIENT_PORT}:${INDY_CLIENT_PORT}"
    volumes:
      - ./etc_indy:/etc/indy
      - ./lib_indy:/var/lib/indy
      - ./log_indy:/var/log/indy
    environment:
      - INDY_NODE_IP=${INDY_NODE_IP}
      - INDY_NODE_PORT=${INDY_NODE_PORT}
      - INDY_CLIENT_IP=${INDY_CLIENT_IP}
      - INDY_CLIENT_PORT=${INDY_CLIENT_PORT}
      - INDY_NETWORK_NAME=${INDY_NETWORK_NAME}
      - INDY_NODE_NAME=${INDY_NODE_NAME}
    env_file:
      - .node.env
    restart: unless-stopped

  indy-controller:
    image: ${IMAGE_NAME_CONTROLLER}
    init: true
    container_name: ${CONTROLLER_CONTAINER}
    environment:
     - NODE_CONTAINER=${NODE_CONTAINER_NAME}
     - INDY_NETWORK_NAME=${INDY_NETWORK_NAME}
     - CONTROLLER_CONTAINER=${CONTROLLER_CONTAINER}
    volumes:
      - ./etc_indy:/etc/indy
      - ${SOCK}:/var/run/docker.sock
    restart: unless-stopped
    network_mode: "service:indy-node"

@tsurai could you have a look at this?

@Echsecutor
Copy link
Contributor Author

@tsurai
Copy link
Contributor

tsurai commented Oct 6, 2022

While fixing this issue another problem has become visible. We are currently using an internal service network for the communication between node and controller for ease of configuration. Internally the controller refers to the container with its ID in the network settings. Upgrading the node results in a new ID and thus the controller uses its network connectivity.

We either have to use fixed IPs which afaik is not the best practice or use dns. The later requires the node to know the controllers hostname and write it into indy_config.py for controlServiceHost.

Should I proceed with this solution?

@Echsecutor
Copy link
Contributor Author

Decision for fix:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants