Fixes for: Failed 'up' action for 'appname' app. Please check /var/log/app_lifecycle.log for more details

This is for anyone who is going down the same path I am. First of all if you get this specific error, it generally speaking means one of 4 things.

  1. You are not using correct or automatic permissions for a postgres data set
    (Just tick the little automatic permissions box, it’s so much easier)

  2. Your postgres dataset is not using unix permissions.
    Generally if you use unix permissions, automatic permissions will work better.

    • Note if you set permissions manually use unix permissions, set the owner user to netdata and the owner group to docker (The uid and gid are 999). Apply them and make sure to apply recursively. Then make sure the only the user owner has full permissions while the group and others have none.
  3. Your postgres dataset is not clean, it has things in it

  4. Today I learned that IF you have .zfs visibility enabled, it will always error. No matter what you do. .zfs files MUST BE SET INVISIBLE for the postgres dataset. Otherwise it thinks something is in the dataset.

If you attempt to have an app that has a postgres dataset while .zfs is visible it will give you the failed up aciton, then the logs will say this:
”service “postgres_upgrade” didn’t complete successfully: exit 1”
If you hand set the right permissions thinking that is the problem the logs will contain something like this:
”dependency failed to start: container ix-appname-postgres-1 is unhealthy”

No amount of anything will do anything to help you. I bashed my head against a wall for a straight week just to turn off .zfs visibility out of desperation and it worked. I also reproduced the bad behavior by turning the visibility back on. I have no idea if this is intentional but, in case there is anyone else out there who see’s this that is just one more thing to add to the laundry list of things that can go wrong.