Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-7103

VictoriaMetrics build logs not deleted from PMM Server Docker image

Details

    • 1
    • 01 - Core
    • Yes
    • Yes
    • C/S Core

    Description

      Impact on the user: The user is confused by preexisted logs about PMM build process in the new container or even can get some internal information from logs from the build process. 

      STR:

      • Download new PMM server image 
      • Go to /srv/logs 

      Expected result

      • no logs / no information in logs about build process or anything before this image was started by the user
      • only logs about the functioning of the system when it was build 

      Given results

      • VM logs represent and contain information from runs user not executed (image build time )

      Original report:

      Other logs are removed, yet in 2.12.0 it appears that the VM ones are not purged:

       56     - name: Cleanup logs               | Cleanup logs                                                                                                                                                          
       57       file: path={{ item }} state=absent                                                                                                                                                                       
       58       with_items:                                                                                                                                                                                              
       59         - /srv/logs/clickhouse-server.err.log                                                                                                                                                                  
       60         - /srv/logs/clickhouse-server.log                                                                                                                                                                      
       61         - /srv/logs/clickhouse-server.startup.log                                                                                                                                                              
       62         - /srv/logs/cron.log                                                                                                                                                                                   
       63         - /srv/logs/dashboard-upgrade.log                                                                                                                                                                      
       64         - /srv/logs/grafana.log                                                                                                                                                                                
       65         - /srv/logs/nginx.startup.log                                                                                                                                                                          
       66         - /srv/logs/pmm-agent.log                                                                                                                                                                              
       67         - /srv/logs/pmm-managed.log                                                                                                                                                                            
       68         - /srv/logs/postgresql.log                                                                                                                                                                             
       69         - /srv/logs/postgresql.startup.log                                                                                                                                                                     
       70         - /srv/logs/prometheus.log                                                                                                                                                                             
       71         - /srv/logs/qan-api2.log                                                                                                                                                                               
       72         - /var/log/yum.log                                                                                                                                                                                     
       73         - /srv/logs/grafana.log                                                                                                                                                                                
       74         - /srv/logs/supervisord.log                                                                                                                                                                            
       75         - /srv/prometheus/data                                                                                                                                                                                 
       76         - /tmp/RPMS                                                                                                                                                                                            
       77         - /var/log/secure                                                                                                                                                                                      
       78         - /var/log/wtmp       

      This results in the following:

      $ cat victoriametrics.log | awk '{print $1}' | cut -f1-2 -d: | sort | uniq -c
          448 2020-12-01T12:11
          317 2020-12-01T12:12
          672 2020-12-04T16:24
          560 2020-12-04T16:25
      
      
      

      -----------
      Note:  https://github.com/Percona-Lab/percona-images/blob/master/ansible/pmm2/post-build-actions.yml#L58-L78

      Questions:

      • Why do we mention specific files from /srv/logs can we delete ALL of them?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ceri.williams Ceri Williams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1 hour
                1h

                Smart Checklist