Uploaded image for project: 'Percona Kubernetes Operator for Percona Server for MongoDB'
  1. Percona Kubernetes Operator for Percona Server for MongoDB
  2. K8SPSMDB-18

Dashboard upgrade loops due to no write access

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: docker-images
    • Labels:

      Description

      In the rootless container the dashboard-upgrade program was seen looping due to:

       * Preferences set: 200 '{"message":"Preferences updated"}'
       * Copying '/usr/share/pmm-server/landing-page/img/pmm-logo.svg' to grafana directory '/usr/share/grafana/public/img/'
      Traceback (most recent call last):
        File "/usr/share/percona-dashboards/import-dashboards.py", line 436, in <module>
          main()
        File "/usr/share/percona-dashboards/import-dashboards.py", line 423, in main
          set_home_dashboard(api_key)
        File "/usr/share/percona-dashboards/import-dashboards.py", line 384, in set_home_dashboard
          shutil.copy(LOGO_FILE, GRAFANA_IMG_DR)
        File "/usr/lib64/python2.7/shutil.py", line 119, in copy
          copyfile(src, dst)
        File "/usr/lib64/python2.7/shutil.py", line 83, in copyfile
          with open(dst, 'wb') as fdst:
      IOError: [Errno 13] Permission denied: '/usr/share/grafana/public/img/pmm-logo.svg'
      grafana: stopped
      

      This is where it tries to update the logo, but instead causes Grafana to loop with it and so the GUI becomes unusable.

      Suggestions:

      • handle the exception and do not cause a loop (good idea anyway)
      • disable the dashboard-upgrade program if it is not expected to work in the rootless container
      • add /usr/share/grafana to the list of paths modified by chown in the Dockerfile

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mykola.marzhan Mykola Marzhan
                Reporter:
                ceri.williams Ceri Williams
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: