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

Update README.md mongo init instructions #19

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

clee
Copy link
Contributor

@clee clee commented Sep 25, 2023


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Update the instructions for initializing MongoDB, as the provided instructions led to errors when I followed them.

Benefits of this PR and context:

closes #12

How Has This Been Tested?

  • I started by backing up my existing unifi controller, so I could migrate to this new image.
  • Pulled tag 7.5.174, c91e20ea07438
  • Followed provided instructions on creating two mongoDB users, one for the main unifi database and one for the unifi_stats database. This created two separate users in mongoDB, unifi.unifi and unifi_stats.unifi, with distinct UUIDs.
  • Unifi was able to connect to the unifi database in mongo and attempt startup, but produced errors in the unifi server.log, not authorized on unifi_stat to execute command { listCollections: 1.
  • Updating the unifi.unifi user to add { 'role': 'readWrite', 'db': 'unifi_stat' } allows the unifi server to start up successfully, but attempting to import my backup produced a new error in server.log: not authorized on unifi to execute command { dropDatabase: 1, $db: "unifi". Apparently importing a backup requires the ability to drop the database.
  • So I updated the roles again, this time using dbOwner instead of readWrite for both databases, and finally was able to successfully import my backup and run the unifi-network-application image.

Source / References:

None

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-unifi-network-application:7.5.176-pkg-3f48ad74-dev-514af1526bd5fbc2d60a46f056f7ab2802798411-pr-19

@thespad
Copy link
Member

thespad commented Sep 26, 2023

I didn't encounter the dbOwner requirement when performing a restore, but there's no real harm in using it over readWrite in this instance so I've no problem updating the readme. However, you need to make the changes to readme-vars.yml as per the contributing guidelines, because the readme.md is generated on build and any changes made to it will be overwritten.

@clee clee force-pushed the docs/README-mongo-init-fix branch from 514af15 to 5d4ea38 Compare September 26, 2023 16:49
@clee
Copy link
Contributor Author

clee commented Sep 26, 2023

I didn't encounter the dbOwner requirement when performing a restore, but there's no real harm in using it over readWrite in this instance so I've no problem updating the readme. However, you need to make the changes to readme-vars.yml as per the contributing guidelines, because the readme.md is generated on build and any changes made to it will be overwritten.

Changes made to readme-vars.yml and pushed.

@LinuxServer-CI
Copy link
Contributor

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-unifi-network-application:7.5.176-pkg-3f48ad74-dev-5d4ea38d1e39be6186572b99f5ce8bc42743a169-pr-19

@thespad thespad merged commit 8c66148 into linuxserver:main Sep 26, 2023
@clee clee deleted the docs/README-mongo-init-fix branch September 26, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] 404 Exception in thread "launcher"
3 participants