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

doc: mysql permissions error and mitigation #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Icinga Web is provided on port **8080** and you can access the Icinga 2 API on p
The default user of Icinga Web is `icingaadmin` with password `icinga` and
the default user of the Icinga 2 API for Web is `icingaweb` with password `icingaweb`.

## Recent image changes ##

Notes on deployment failure related to MySQL permissions are in :
doc/mysql-cannot-open-directory-docker-entrypoint-initdb.md


## Upgrading from v1.1.0 to v1.2.0

**v1.2.0** deploys Icinga Web ≥ 2.11.0, Icinga 2 ≥ 2.13.4, Icinga DB ≥ 1.0.0 and Icinga DB Web ≥ 1.0.0.
Expand Down
47 changes: 47 additions & 0 deletions doc/mysql-cannot-open-directory-docker-entrypoint-initdb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Deploying as non-root ##

(deployment notes from a user)

I wanted to document a problem and a fix.

Having not defined a version of the images to deploy, effectively defaulting to "latest", the
deployed images might have changed behavior. It would probably benefit re-use to pin versions that
work and upgrade deliberately as upstream upgrades.

In addition but unrelated, deploying as a nonroot user without permission to the "docker" nor
"docker-compose" apps without "sudo" might be different than the original author did. For this
reason, my environment might be a source of entropy here.

This was failing:
```
mysql_1 | ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission denied
```

This can be confirmed with a basic "up" of the database itself:
```
sudo docker-compose -p icinga-playground up mysql
```

a blanket/broad chmod of the path mapped this "/docker-entrypoint-initdb.d" mitigates:
```
chmod -R ugo+rx env/mysql
```

### Versions ###

containers:
icinga/icingaweb2:2.11.4
mariadb:10.7

CLI:
docker-compose version 1.28.5, build 24fb474e
- docker-py 4.4.4
- CPython 3.7.10
- OpenSSL OpenSSL 1.1.0l
Docker version 20.10.3, build 55f0773
- API 1.41
- go-1.17.1
- docker engine 20.10.3
- containerd 1.4.3
- runc 1.0.0-rc93 hash 31cc25f16f5e
- docker-init 0.19.0