NetApp / trident

Storage orchestrator for containers
Apache License 2.0
759 stars 219 forks source link

mariadb service does not start with trident volume while dockerhost have public IP #932

Open qsadmin01 opened 1 week ago

qsadmin01 commented 1 week ago

Describe the bug mariadb container does not start mariabdb service while dockerhost have a public ip, everything else looks good. The volume is visible the volume is mapped into the container to /var/lib/mysql. Data is accessible. Rights are correct. Volume is read write. the container is running only the mariadb service doenst come up. Changing the dokerhost IP back to internal ip the mariadb service starts without any issues.

thats the only log entry:

docker logs guacamole-mariadb-1
2024-10-04 16:30:58+02:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.5.2+maria~ubu2404 started.

Environment we ar not using kubernetes only docker, docker-compose with trident plugin

To Reproduce changing dockerhost to public ip

trident config

{ "version": 1, "storageDriverName": "ontap-nas-economy", "storagePrefix": "trident_eco_prodlabs", "managementLIF": "172.16.21.100", "dataLIF": "172.16.21.31", "svm": "corp_trident", "username": "USER", "password": "PASSWORD", "aggregate": "n01_aggr1", "limitVolumeSize": "300g", "log-level": "debug", "debug": true }

docker-compose.yml

---
services:
  guacd:
    image: guacamole/guacd
    networks:
      - local

  guac-serve:
    image: guacamole/guacamole
    links:
      - guacd:guacd
      - mariadb:mysql
    ports:
      - 8080:8080
    environment:
      - MYSQL_LOG_CONSOLE=true
      - MYSQL_HOSTNAME=mariadb
      - MYSQL_DATABASE=guacamole
      - MYSQL_USER=guacamole
      - MYSQL_PASSWORD=PASSWORD
      - GUACD_HOSTNAME=guacd
      - GUACD_PORT=4822
    networks:
      - local

  mariadb:
    image: mariadb:11.5
    environment:
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=PASSWORD
      - MYSQL_DATABASE=guacamole
      - MYSQL_USER=guacamole
      - MYSQL_PASSWORD=PASWORD
    volumes:
      - debian12_guacamole:/var/lib/mysql
    networks:
      - local

volumes:
  debian12_guacamole:
    driver: trident_eco:latest  # Ensure this matches your plugin name
#    driver_opts:
#      size: "30G"

networks:

  local:
    driver: bridge
wonderland commented 4 days ago

If the volume is correctly mounted and accessible, is there any indication that this issue with MariaDB is related to Trident? I do not see any connection to the volume plugin being used?

qsadmin01 commented 4 days ago

hi wonderland thank you for your answer. The problem ist that this issue does not make sense at all. thats why I try to figure out whats going on. The only thing is that creating the stack directly with Dockerhost having its Internet IP the unix permissions are wrong.

bash-5.1# ls -ld /var/lib/mysql drwxrwxrwt 2 mysql mysql 4096 Sep 20 13:39 /var/lib/mysql

thats why I also search in direction to trident