Page MenuHomeDevCentral

Provision error logs by service and instance on PaaS Docker
Needs ReviewPublic

Authored by dereckson on Apr 5 2025, 14:06.
Tags
None
Referenced Files
F11700527: D3632.id.diff
Fri, Sep 12, 14:18
F11700435: D3632.diff
Fri, Sep 12, 13:47
Unknown Object (File)
Wed, Sep 10, 16:43
Unknown Object (File)
Wed, Sep 10, 15:07
Unknown Object (File)
Tue, Sep 9, 18:35
Unknown Object (File)
Tue, Sep 9, 15:16
Unknown Object (File)
Mon, Aug 25, 07:55
Unknown Object (File)
Mon, Aug 25, 02:29
Subscribers
None

Details

Reviewers
DorianWinty
Summary

Currently, logs are unified into a single log file.

If that eases push to ElasticSearch / OpenSearch,
it doesn't offer a comfortable reading with grep/tail/etc.

The new structure will store log files in:

  • /var/log/www/<service>/<instance>-error.log
  • /var/log/www/<service>/<instance>-access.log

For a service, for example Phabricator, all the containers
have their web logs in the same place, to ease grep search.

Test Plan

Deploy on Dwellers

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
nginx-missing-directories
Build Status
Buildable 5860
Build 6142: arc lint + arc unit

Event Timeline

dereckson held this revision as a draft.

Use /var/log/www/<service>/ folder for logs in vhosts

dereckson published this revision for review.Thu, Sep 11, 19:27
dereckson retitled this revision from WIP: provision error logs by instance to Provision error logs by service and instance on PaaS Docker.
dereckson edited the summary of this revision. (Show Details)
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: DorianWinty.
dereckson added inline comments.
roles/paas-docker/nginx/config.sls
33

Could be interesting to filter them if host is defined,
as that's a hint nginx configuration is needed.

That would avoid this:

      ID: /var/log/www/mysql
Function: file.directory
  Result: True
 Comment:
 Started: 20:17:28.783079
Duration: 1.267 ms
 Changes:
          ----------
          /var/log/www/mysql:
              ----------
              directory:
                  new

Rebased. Don't create log directory for non-web services.