Uploaded image for project: 'XenServer Org'
  1. XenServer Org
  2. XSO-393

xe-backup-metadata - fails with CIFS ISO SRs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • None
    • All
    • other
    • XenServer 6.5, 6.5 SP1, Dundee (Alpha, Beta)
      CIFS ISO Repository (Read/Read+Write access from dom0 command line)

    Description

      DISCLAIMER TO ANYONE READING THIS
      It is no secret I am a Citrix employee and as such, the following disclaimer is quite necessary for four reasons:

      1) ALL TESTS ARE PERFORMED ON MY OWN TIME AND OUTSIDE OF THE BOUNDS OF MY RESPONSIBILITIES FOR CITRIX
      2) NONE OF THESE TESTS SHOULD EVER BE PERFORMED ON PRODUCTION EQUIPMENT OR ANY XEN DEPLOYMENT WHERE VESTED CODE, IP, OR "DATA" CANNOT BE REPLACED
      3) MY TESTS IN NO WAY REFLECT WHAT THE FINAL PRODUCT SCOPE IS, COULD BE, MAY BE, OR WILL EVENTUALLY BE, AND WHAT I HAVE FOUND "ODD"
      4) 90% OF MY TESTING IS DONE ON MY OWN, OF MY OWN NEEDS, BUT YES: I ALWAYS KEEP THE COMMUNITY IN MIND

      So, with that aside, I report the following to my Dev, QA, and persons named "Tim" colleages and welcome inquiries.

      PREFACE
      Out of curiosity I ran xe-backup-metadata and specified a CIFS/SMB SR to hold a backup of my metadata. Sheer curiosity. It behaves irradically.

      NOTE: Without looking at the xe-backup-metadata code, I am unaware if CIFS ISOs are supposed to be supported in the first place.

      USE CASE
      In testing various SRs for using the xe-backup-metadata code for some automation, I discovered that - depending on the actual host machine serving the CIFS ISO SR - the xe-backup-metadata utility will state success in creating a Metadata Backup VHD.

      When investigating, this is not true as their can only be a UUID.img file found on the CIFS ISO SR and it is invalid to use for recovery.

      EXPECTED RESULTS
      If CIFS (or other SRs) are not supported to hold metadata backup VHDs, I was expecting it to state something along the lines of:

      "The SR type of the UUID specified is invalid or read/write operations cannot be performed on this SR."

      ACTUAL RESULTS
      The results vary (and may go back before XS 6.5/6.1), however the 80% result from the command line when using xe-backup-metadata -c -i -u UUID_OF_CIFS_ISO_SHARE are success:

      Scenario 1 (Success)
      CLI: xe-backup-metadata -c -i -u 285c3215-8309-120d-6ad9-b756d6531fb0
      Using SR: ISO REPO
      Creating new backup VDI: 71ead119-6b2d-4ca1-871d-caad672774cf
      done
      Rotating old backups: found 0
      Backing up pool database: done
      Cleaning old VM metadata: done
      Backing up SR metadata: done
      Backing up VM metadata: done
      Backing up Template metadata: done

      I then validated the VDI:

      CLI: xe vdi-list uuid=71ead119-6b2d-4ca1-871d-caad672774cf
      uuid ( RO) : 71ead119-6b2d-4ca1-871d-caad672774cf
      name-label ( RW): Pool Metadata Backup
      name-description ( RW):
      sr-uuid ( RO): 285c3215-8309-120d-6ad9-b756d6531fb0
      virtual-size ( RO): 262144000
      sharable ( RO): false
      read-only ( RO): false

      (The img file exists - but no vhd and no obvious errors)
      CLI: ls -la /var/run/sr-mount/285c3215-8309-120d-6ad9-b756d6531fb0/71ead119-6b2d-4ca1-871d-caad672774cf.img

      -rwxr-xr-x 1 root root 262144000 Oct 26 03:52 /var/run/sr-mount/285c3215-8309-120d-6ad9-b756d6531fb0/71ead119-6b2d-4ca1-871d-caad672774cf.img*

      Scenario 2 (File System Error)
      CLI: xe-backup-metadata -i -c -u e26560d2-3ef1-eb54-7f32-4e0dfcb4a459

      Using SR: INTERNAL ISOS

      Creating new backup VDI: Error code: SR_BACKEND_FAILURE_78
      Error parameters: , VDI Creation failed [opterr=could not create file: "/var/run/sr-mount/e26560d2-3ef1-eb54-7f32-4e0dfcb4a459/isos/bb18939a-42cf-4e0e-be7c-6ce598f6ff42.img"],

      The uuid you supplied was invalid.
      type: VDI
      uuid:
      The uuid you supplied was invalid.
      type: VDI
      uuid:

      (On investigation, the file was created though further read/write operations caused the generic error above)...

      [root@xen65test ~]# ls -la /var/run/sr-mount/e26560d2-3ef1-eb54-7f32-4e0dfcb4a459/isos/bb18939a-42cf-4e0e-be7c-6ce598f6ff42.img

      -rwxr-xr-x 1 root root 0 Oct 26 03:29 /var/run/sr-mount/e26560d2-3ef1-eb54-7f32-4e0dfcb4a459/isos/bb18939a-42cf-4e0e-be7c-6ce598f6ff42.img

      (Which I was able to remove with rm – strange, but I digress!)

      PURPOSE
      Primarily to see if there is any statement of CIFS ISO Shares not being support?

      Secondarily, to see if there should be more checks/balances to prevent ambiguous errors (ie, pre-flight for file system integrity, SR type, etc)?

      Lastly, to raise awareness of the behavior I encountered, see how wrong I may be, and to assist as I can in testing - updating checks in the code, etc – if needed.

      Attachments

        Activity

          People

            garyk Gary Kirkpatrick
            jessebe JK Benedict
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: