Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-766

Ozone shell create volume fails if volume name does not have a leading slash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      After HDDS-682, volume creation through shell fails if the volume name does not have leading slash.

      $ ./ozone sh volume create volume1
      Volume name is required
      $ ./ozone sh volume create /volume1
      2018-10-30 14:07:58,078 INFO rpc.RpcClient: Creating Volume: volume1, with hdds as owner and quota set to 1152921504606846976 bytes.

      In OzoneAddress#stringToUri, when creating a new URI, the path parameter is expected to have a leading slash. Otherwise, the path gets mixed with the authority.

      To fix this, we should add a leading slash to the path variable, if it does not exist, before constructing the URI object.

      Attachments

        1. HDDS-766.004.patch
          1 kB
          chencan
        2. HDDS-766.003.patch
          2 kB
          chencan
        3. HDDS-766.001.patch
          0.8 kB
          chencan

        Issue Links

          Activity

            People

              candychencan chencan
              hanishakoneru Hanisha Koneru
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: