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

PMM upgrade copy of resize-xfs-lvm to resize-xfs failed on non-Docker

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 2.33.0
    • 2.34.0
    • None
    • I've tested PMM OVA on virsh/KVM.

      pmm2-server-2.30.0.ova

      pmm-server-2.33.0.ova

       

    • 1
    • Yes
    • Yes
    • No
    • [obsolete] C/S Core

    Description

      Description :

      Copy of  resize-xfs-lvm to resize-xfs failed during PMM upgrade on a non-Docker installation.

      Error from /srv/logs/pmm-update-perform.log

       

      TASK [Copy rezise-xfs file for lvm] ********************************************
      fatal: [localhost]: FAILED! => {"changed": false, "msg": "file (/var/lib/cloud/scripts/per-boot/resize-xfs) is absent, cannot continue", "path": "/var/lib/cloud
      /scripts/per-boot/resize-xfs", "state": "absent"}
      [WARNING]: The src option requires state to be 'link' or 'hard'.  This will
      become an error in Ansible 2.10PLAY RECAP *********************************************************************
      localhost                  : ok=68   changed=15   unreachable=0    failed=1    skipped=25   rescued=0    ignored=0   time="2022-12-19T00:21:56Z" level=fatal msg="RunPlaybook failed: exit status 2"
      ProjectName: pmm-update
      Version: 2.33.0
      

       

      How to reproduce :

      1) Remove/rename existing resize-xfs file or it can also be reproduce if an upgrade is done on PMM 2.24 and below as resize-xfs is still not present on such version.

       

      cd /var/lib/cloud/scripts/per-boot/
      mv -nv resize-xfs resize-xfs.bkp

       

      2) Perform the upgrade :

       

      supervisorctl start pmm-update-perform

       

      3) The error will be encountered and the upgrade will automatically restart in a continuous loop.

      Workaround :

      Search for the file :

       

      # ls -lh $(find / -iname 'resize-xfs*' -print 2>/dev/null)
      -rw-r--r--. 1 root root 642 Nov 29 06:17 /usr/share/pmm-update/ansible/playbook/tasks/files/resize-xfs-lvn
      -rwxr-xr-x. 1 root root 642 Dec  6 18:15 /var/lib/cloud/scripts/per-boot/resize-xfs.bkp

       

      Manually copy resize-xfs-lvn to resize-xfs :

       

      cp -nv /usr/share/pmm-update/ansible/playbook/tasks/files/resize-xfs-lvn /var/lib/cloud/scripts/per-boot/resize-xfs

      3) The upgrade will now succeed, but if you rebooted the machine you have to re-run :

       

       

      supervisorctl start pmm-update-perform

       

      4) Check  log and you should see like below with failed=0 :

       

      # tail /srv/logs/pmm-update-perform.log
          ]
      }
      TASK [Delete content & directory] **********************************************
      changed: [localhost]
      PLAY RECAP *********************************************************************
      localhost                  : ok=85   changed=19   unreachable=0    failed=0    skipped=25   rescued=0    ignored=0   
      time="2022-12-19T00:24:27Z" level=info msg="Waiting for Grafana dashboards update to finish..."
      

      Suggested fix :

      As discussed in Slack thread  #pmm  https://perconacorp.slack.com/archives/C03J8FZFU/p1670818275943949

      1 ) Edit /usr/share/pmm-update/ansible/playbook/tasks/update.yml. Use copy instead of file. Addionally, please correct task name:  rezise-xfs to resize-xfs

      From :

          # https://jira.percona.com/browse/PMM-9298
          - name: Copy rezise-xfs file for lvm
            file:
              src: resize-xfs-lvm
              dest: /var/lib/cloud/scripts/per-boot/resize-xfs
              mode: 0755
            when: not is_docker

      To :

          # https://jira.percona.com/browse/PMM-9298
          - name: Copy resize-xfs file for lvm
            copy:
              src: resize-xfs-lvm
              dest: /var/lib/cloud/scripts/per-boot/resize-xfs
              mode: 0755
            when: not is_docker

       

       2 ) Rename resize-xfs-lvn to resize-xfs-lvm as it the one declared as the source

       

      # cd /usr/share/pmm-update/ansible/playbook/tasks/files/
      # mv -nv resize-xfs-lvn resize-xfs-lvm

       

       

       

       

       

       

       

       

       

       

      Attachments

        Activity

          People

            talha.rizwan Talha Rizwan
            aristotle.po Aristotle Po
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist