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

Notifiarr: Starr app Database Checks Requirement #329

Merged
merged 4 commits into from
Feb 10, 2024
Merged

Notifiarr: Starr app Database Checks Requirement #329

merged 4 commits into from
Feb 10, 2024

Conversation

Nypheena
Copy link
Contributor

The database corruption check requires a folder to move and then examine a backup file from the Starr apps which is /tmp by default it doesn't have access to that obviously so this will allow it to use its appdata folder for this purpose

I'm not sure if I did it entirely right I probably did not

https://notifiarr.wiki/en/Client/Configuration#tmp-not-found

The database corruption check requires a folder to move and then examine a backup file which is /tmp by default it doesn't have access to that obviously so this will allow it to use its appdata folder for this purpose

I'm not sure if I did it entirely right I probably did not
@saltydk
Copy link
Member

saltydk commented Feb 10, 2024

Just mount a real tmpfs, you can see an example of that in privatebin.

@Nypheena
Copy link
Contributor Author

My main idea was mainly containment to the one folder for the app itself, there is a TMPDIR env which I suppose could mount a tmpfs if that is how you'd prefer it I could look into such

@saltydk
Copy link
Member

saltydk commented Feb 10, 2024

Anything that uses /tmp paths usually isn't meant to exist past a reboot. So if that is the goal here mount tmpfs

@Nypheena
Copy link
Contributor Author

Looking into privatebin it seems to make it a whole lot more complicated and even making a docker volume to act as the tmpfs, I know linux makes a few tmpfs by default already but I don't know which would be universal besides /run or /dev/shm but if tmpfs is the only way I guess I can try to look into how to accomplish it

@Nypheena Nypheena marked this pull request as draft February 10, 2024 10:17
@saltydk
Copy link
Member

saltydk commented Feb 10, 2024

It is just:

notifiarr_docker_mounts_default:
  - target: /tmp
    type: tmpfs

@Nypheena
Copy link
Contributor Author

Nypheena commented Feb 10, 2024

Ah didn't know if that was enough, if not obvious by now I'm definitely not very smart in all this and I overcompliccated with these

- name: Create a volume with options
  community.docker.docker_volume:
    name: "{{ lookup('vars', role_name + '_docker_container') }}_tmpfs_run"
    driver_options:
      type: tmpfs
      device: tmpfs
privatebin_docker_volumes_default:
  - "{{ privatebin_paths_location }}:/srv/data"
  - "{{ privatebin_paths_location }}/conf.php:/srv/cfg/conf.php:ro"
  - "{{ lookup('vars', role_name + '_docker_container') }}_tmpfs_run:/run"

I thought it was using these in the mounts bit

Although I don't seem to have a /tmp mount as tmpfs on my filesystem but maybe its not even mounting something on host system?

@saltydk
Copy link
Member

saltydk commented Feb 10, 2024

You can google tmpfs to get an understanding of what it means. The reason we mount them as opposed to mounting the hosts /tmp folder is to avoid collision, Emby for instance cannot run multiple instances if they share a /tmp folder.

@saltydk
Copy link
Member

saltydk commented Feb 10, 2024

# Mounts
notifiarr_docker_mounts_default:
  - target: /tmp
    type: tmpfs
notifiarr_docker_mounts_custom: []
notifiarr_docker_mounts: "{{ notifiarr_docker_mounts_default
                             + notifiarr_docker_mounts_custom }}"

You need the whole block, as the create container task loads the _docker_mounts variable.

@Nypheena
Copy link
Contributor Author

# Mounts
notifiarr_docker_mounts_default:
  - target: /tmp
    type: tmpfs
notifiarr_docker_mounts_custom: []
notifiarr_docker_mounts: "{{ notifiarr_docker_mounts_default
                             + notifiarr_docker_mounts_custom }}"

You need the whole block, as the create container task loads the _docker_mounts variable.

Oh okay, makes sense as I was about to say I tested with inventory real quick and it couldn't access /tmp lemme try with this

@Nypheena
Copy link
Contributor Author

Nypheena commented Feb 10, 2024

Okay tested with inventory and it worked the check was successful, sorry for the overcomplication and missing that, I do see the whole block has the defaults input which is obviously the whole point to actually add the mounts

@Nypheena Nypheena marked this pull request as ready for review February 10, 2024 10:36
@Nypheena Nypheena changed the title Starr app Database Checks Requirement Notifiarr: Starr app Database Checks Requirement Feb 10, 2024
@owine owine merged commit 011b041 into saltyorg:master Feb 10, 2024
175 checks passed
@Nypheena Nypheena deleted the patch-1 branch February 10, 2024 14:06
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

Successfully merging this pull request may close these issues.

3 participants