Daily performance reports keep asking to rebuild container

Reproduce:

  1. Enable the site setting daily performance report (“Analyze NGINX logs daily and post a Staff Only topic with details”).

  2. Update the Docker image:

    cd /var/discourse
    ./launcher rebuild app

Expected Results:

  • A report appears in the “Staff” category periodically.

Actual Results:

  • An error message appears in the “Website performance reports” topic in the “Staff” category:

Report is only available in latest image, please run:
cd /var/discourse
./launcher rebuild app

You need a git pull before the rebuild as seen here:

1 Like

Not necessarily I thought the launcher command did an implicit git pull @sam?

That change was only made in the last year, very possible @downey has an older git repo.

2 Likes

Don’t know exactly when the change happened but I thought I’d updated
fairly recently. After doing the first rebuild I could have sworn I saw a
git pull but I didn’t watch carefully enough. As soon as I can take a
little more downtime (probably tonight) will try again.

I definitely did a full git pull and then ./launcher rebuild app last night … but still getting the same bug every day instead of a performance report.

Can anyone reproduce? Is anyone able to successfully get the performance report?

I’m having the same issue. My guess is that because ./launcher rebuild says “Your version of Discourse Docker is ahead of origin” when git tries to get the latest version, so the latest version is never pulled?

Likely, can you just check out discourse-docker from scratch?

Actually what I did was git reset --hard origin/master to have the repository in sync again and then another./launcher rebuild (that didn’t trigger the “ahead of origin” message). Now I’l wait to see if I get the reports. Is there any way to trigger those reports manually so that I don’t have to wait?

2 Likes

Visit /sidekiq/scheduler and trigger Jobs::DailyPerformanceReport AFAIK?

3 Likes

That worked, thanks! Now I get the report and that’s really nice!

FWIW, I did the git reset --hard origin/master and then ./launcher rebuild app and still have the same problem.

Has anyone else seen this problem? (Or can reproduce it if they’re willing to try to enable the option?)

Edit: @Lee_Ars & @Sander78 you were both reporting this in another now-locked topic, are you still having the problem?

Is there somewhere I could look to see if my Docker image is the right version or has the right code to do this?

Yep, still there. Eventually I turned it off.

1 Like

If you give me access to your host I can have a quick look

2 Likes

I don’t want to cause an outage @downey but you have an old pattern in your template:

You have:

volumes:
  - volume:
      host: /var/discourse/shared
      guest: /shared

It should be:

volumes:
  - volume:
      host: /var/discourse/shared
      guest: /shared

  - volume:
      host: /var/discourse/shared/var-logs
      guest: /var/log

This in turn causes 2 things:

  1. You are storing logs inside the container… which is bad
  2. Permissions are not ideal on that logs
3 Likes

In my case the sysadmin deleted Staff category when we installed discourse (3 years ago).

Now I have create another Staff category (only admins and staff can create/reply/see it).
This category was created before the last upgrade to Discourse Docker Image 1.3.3 (so we have git pull and rebuild all and the upgrade was a success).

By the way in logs I have this error when I trigger Jobs::DailyPerformanceReport in sidekiq:


Have I missed something?

So this week I did a completely new install on a new box following the standard instructions and script, and this problem is back :frowning:

You need to set the hidden site setting staff_category_id to the ID of the new staff category.

There’s no UI to do this (because it’s hidden, you’re not supposed to change it), so you need to muck with request editing :confused:

3 Likes

Looking at the “stock” out of the box installation, I see the following volumes that were set up:

volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

Anything wrong with that that would be causing this problem to appear?