Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-3196

Cannot create an Application Plan using spaces on the v0.12.3 .rpm package

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 2.5 GA, SaaS
    • Toolbox
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • +
    • Hide

      1. Install the 3scale toolbox using the GitHub's .rpm Package in a minimal RHEL 7.X installation:

      # yum install -y https://github.com/3scale/3scale_toolbox_packaging/releases/download/v0.12.3/3scale-toolbox-0.12.3-1.el7.x86_64.rpm
      

      2. Attempt creating an Application Plan using spaces:

      # 3scale application-plan apply https://<KEY>@<DOMAIN> -k --publish --name="Application Plan Using Spaces" echo_api_hosted application_plan_using_spaces
      

      Result:

      apply: incorrect number of arguments given: expected 3, but got 6
      

      I have tried escaping the spaces:

      --name="Application\ Plan\ Using\ Spaces"
      

      As well as several other combinations, but the result is always the same.

      Show
      1. Install the 3scale toolbox using the GitHub's .rpm Package in a minimal RHEL 7.X installation: # yum install -y https: //github.com/3scale/3scale_toolbox_packaging/releases/download/v0.12.3/3scale-toolbox-0.12.3-1.el7.x86_64.rpm 2. Attempt creating an Application Plan using spaces: # 3scale application-plan apply https: //<KEY>@<DOMAIN> -k --publish --name= "Application Plan Using Spaces" echo_api_hosted application_plan_using_spaces Result: apply: incorrect number of arguments given: expected 3, but got 6 I have tried escaping the spaces: --name= "Application\ Plan\ Using\ Spaces" As well as several other combinations, but the result is always the same.

    Description

      Please check the "Steps to Reproduce" for further details.

      NOTE: Installing the 3scale toolbox .rpm Package from GitHub instead of using the 3scale Repository is not officially supported. However, as discussed on Slack, I'm opening the Bug on JIRA instead of Github for better visibility.

      There are at least 2 ways to workaround the issue, however none of them has a direct relation to the stable release provided in the .rpm Package:


      1. Official 3scale toolbox installation

      # subscription-manager repos --enable=rhel-7-server-3scale-amp-2.5-rpms
      # subscription-manager repos --enable=rhel-server-rhscl-7-rpms
      # yum -y install 3scale_toolbox
      

      The above doesn't provide us with a recent version:

      # /usr/bin/3scale -v
      0.7.0
      

      However, it's possible to use the ruby environment in /opt/rh/rh-ruby25/ (which was deployed as a dependency during the "yum -y install") to workaround it and install the latest version, which contains application-plan apply:

      # PATH=$PATH:/opt/rh/rh-ruby25/root/bin LD_LIBRARY_PATH=/opt/rh/rh-ruby25/root/lib64/ /opt/rh/rh-ruby25/root/bin/gem install 3scale_toolbox
      Fetching: 3scale-api-0.6.0.gem (100%)
      Successfully installed 3scale-api-0.6.0
      Fetching: cri-2.15.9.gem (100%)
      Successfully installed cri-2.15.9
      Fetching: public_suffix-3.1.1.gem (100%)
      Successfully installed public_suffix-3.1.1
      Fetching: addressable-2.6.0.gem (100%)
      Successfully installed addressable-2.6.0
      Fetching: json-schema-2.8.1.gem (100%)
      Successfully installed json-schema-2.8.1
      Fetching: 3scale_toolbox-0.12.3.gem (100%)
      Successfully installed 3scale_toolbox-0.12.3
      6 gems installed
      # PATH=$PATH:/opt/rh/rh-ruby25/root/bin LD_LIBRARY_PATH=/opt/rh/rh-ruby25/root/lib64/ /opt/rh/rh-ruby25/root/usr/local/share/gems/gems/3scale_toolbox-0.12.3/exe/3scale -v
      0.12.3
      # PATH=$PATH:/opt/rh/rh-ruby25/root/bin LD_LIBRARY_PATH=/opt/rh/rh-ruby25/root/lib64/ /opt/rh/rh-ruby25/root/usr/local/share/gems/gems/3scale_toolbox-0.12.3/exe/3scale application-plan apply https://<KEY>@<DOMAIN> -k --publish --name="Application Plan Using Spaces" echo_api_hosted application_plan_using_spaces
      Applied application plan id: 2357356117111; Default: false; Published
      

      2. Installing through a Ruby unsupported environment

      Instead of installing the official RPM's, it's also possible to follow the instructions on the website below to install the latest Ruby 2.5 on RHEL7:
      https://tecadmin.net/install-ruby-latest-stable-centos/

      (sed "s/CentOS/RHEL/g" and use "rvm install 2.5.5")

      After the above, follow the same instructions from the open source documentation on https://github.com/3scale/3scale_toolbox:

      # rvm use 2.5.5 --default
      Using /usr/local/rvm/gems/ruby-2.5.5
      # ruby --version
      ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
      # gem install 3scale_toolbox
      Fetching cri-2.15.9.gem
      Fetching public_suffix-3.1.1.gem
      Fetching addressable-2.6.0.gem
      Fetching json-schema-2.8.1.gem
      Fetching 3scale_toolbox-0.12.3.gem
      Fetching 3scale-api-0.6.0.gem
      Successfully installed 3scale-api-0.6.0
      Successfully installed cri-2.15.9
      Successfully installed public_suffix-3.1.1
      Successfully installed addressable-2.6.0
      Successfully installed json-schema-2.8.1
      Successfully installed 3scale_toolbox-0.12.3
      Parsing documentation for 3scale-api-0.6.0
      Installing ri documentation for 3scale-api-0.6.0
      Parsing documentation for cri-2.15.9
      Installing ri documentation for cri-2.15.9
      Parsing documentation for public_suffix-3.1.1
      Installing ri documentation for public_suffix-3.1.1
      Parsing documentation for addressable-2.6.0
      Installing ri documentation for addressable-2.6.0
      Parsing documentation for json-schema-2.8.1
      Installing ri documentation for json-schema-2.8.1
      Parsing documentation for 3scale_toolbox-0.12.3
      Installing ri documentation for 3scale_toolbox-0.12.3
      Done installing documentation for 3scale-api, cri, public_suffix, addressable, json-schema, 3scale_toolbox after 4 seconds
      6 gems installed
      # 3scale -v
      0.12.3
      # 3scale application-plan apply https://<KEY>@<DOMAIN> -k --publish --name="Application Plan Using Spaces" echo_api_hosted application_plan_using_spaces
      Applied application plan id: 2357356117116; Default: false; Published
      

      Both the workarounds above are not supported (the workaround 2. should be attempted at the customer's own risk as it compiles and installs external Packages that Red Hat cannot be held responsible for any issues as a result of their installation), but I wanted to provide you in case they help on finding the root cause of the issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-ekonecsn Estevao Konecsni
            Eguzki Astiz Lezaun Eguzki Astiz Lezaun
            Eguzki Astiz Lezaun Eguzki Astiz Lezaun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: