compose-cli icon indicating copy to clipboard operation
compose-cli copied to clipboard

Expose ACI nobrl mount option in driver_opts

Open DennisGaida opened this issue 2 years ago • 0 comments

Description

Currently the driver_opts support the following entries:

  share_name: storageAccount
  storage_account_name: fileShare

Hosting SQLite databases with CIFS storage is problematic if the nobrls option is not set on mount, see the following error descriptions:

  • https://fantashit.com/error-on-azure-container-instances-migration-failed-err-database-is-locked/
  • https://github.com/louislam/uptime-kuma/issues/1096
  • https://stackoverflow.com/questions/53226642/sqlite3-database-is-locked-in-azure

Currently there is no way to set different mount options for the Azure File Share, in this particular case nobrl would be needed (see man-page and nobrl option).

I totally understand that the image maintainers may be able to circumvent this behavior by using different methods of accessing SQLite databases, I would just to prefer to set the nobrl mount option and containers such as uptime-kuma, grafana and others (search for azure aci Error: PRAGMA journal_mode = WAL - SQLITE_BUSY: database is locked and you'll find many results) just work.

Steps to reproduce the issue:

  1. Try to compose a container that relies on SQLite, e.g. uptime-kuma
  2. Observe error: PRAGMA journal_mode = WAL - SQLITE_BUSY: database is locked

Additional information you deem important (e.g. issue happens only occasionally):

Example docker-compose:

version: '3.8'

services:
  uptime-kuma:
    image: louislam/uptime-kuma
    container_name: kuma
    restart: unless-stopped
    ports:
      - 3001:3001
    volumes:
      - kuma:/app/data

volumes:
  kuma:
    driver: azure_file
    driver_opts:
      share_name: <sharename>
      storage_account_name: <accountname>

DennisGaida avatar Jul 28 '22 11:07 DennisGaida