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

No way to detect full initialization of the database, healthcheck.sh always returns code 0 #76241

Open
olivierboudet opened this issue Jan 14, 2025 · 1 comment
Assignees
Labels
in-progress mariadb tech-issues The user has a technical issue about an application

Comments

@olivierboudet
Copy link

olivierboudet commented Jan 14, 2025

Name and Version

bitnami/mariadb:10.11

What architecture are you using?

None

What steps will reproduce the bug?

  1. Run mariadb with a lot of sql files which slow down initialization with a compose file like this :
  db:
    image: bitnami/mariadb:10.11
    environment:
      BITNAMI_DEBUG: true
      ALLOW_EMPTY_PASSWORD: "true"
      MARIADB_SKIP_TEST_DB: "yes"
      MARIADB_USER: root
      MARIADB_PASSWORD: password
      MARIADB_DATABASE: bitnami
      MARIADB_ROOT_PASSWORD: password
    ports:
      - 3306:3306
    healthcheck:
      test: [ "CMD", "/opt/bitnami/scripts/mariadb/healthcheck.sh", "--connect", "--innodb_initialized" ]
      start_period: 10s
      interval: 10s
      timeout: 5s
      retries: 10
    volumes:
      - ./sql/:/docker-entrypoint-initdb.d/
  1. we expect the container to be ready only when initialization is completed. In the official mariadb image, initialization of the db is executed with the server running with --skip-networking flag. In this case, healthcheck.sh --connect fails and the container is not in a ready state.
    With the bitnami image, the --skip-networking flag is not used, which prevents to detect the full initialization of the database

What is the expected behavior?

healthcheck.sh --connect should allow to detect the full initialization of the database

What do you see instead?

There is no way to detect the real ready state of the database

Additional information

If this bug is valid and the proposal to use --skip-networking during setup is accepted, I am willing to contribute to this, please tell me.

@olivierboudet olivierboudet added the tech-issues The user has a technical issue about an application label Jan 14, 2025
@github-actions github-actions bot added the triage Triage is needed label Jan 14, 2025
@github-actions github-actions bot removed the triage Triage is needed label Jan 14, 2025
@github-actions github-actions bot assigned alvneiayu and unassigned carrodher Jan 14, 2025
@alvneiayu
Copy link
Contributor

hi @olivierboudet

I think that I am reproducing the error. Could you send me logs reproducing the problem, please? Just to be aligned.

Thanks a lot

Álvaro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress mariadb tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

3 participants