Bug 1024669 - Application of download cartridge with "_" in "Cartridge-Vendor" fails to scale up, but it succeeds to be created.
Application of download cartridge with "_" in "Cartridge-Vendor" fails to sca...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-30 04:24 EDT by Qiushui Zhang
Modified: 2015-05-14 20:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-29 19:49:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
manifest file used (3.31 KB, text/plain)
2013-10-30 04:24 EDT, Qiushui Zhang
no flags Details

  None (edit)
Description Qiushui Zhang 2013-10-30 04:24:44 EDT
Created attachment 817341 [details]
manifest file used

Description of problem:
Create an download cartridge application
rhc app create p1s https://raw.github.com/qiushui/perlv2cart/master/metadata/manifest.yml -s
Try to scale up it. rhc cartridge scale qiuzhang-perl-5.10 -a p1s --min 2
The application can be created successfully, but the scale up process fails with error message:
Using 88_qiuzhang-perl-5.10 (Perl 5.10) for 'qiuzhang-perl-5.10'
his operation will run until the application is at the minimum scale and may take several minutes.
Setting scale range for 88_qiuzhang-perl-5.10 ... Invalid cartridge ID. It can only contain alphanumeric characters, dashes(-) and dots(.)

Version-Release number of selected component (if applicable):
INT(devenv_3965)

How reproducible:
always

Steps to Reproduce:
1. Create a download cartridge application, with '_' in "Cartridge-Vendor"
rhc app create p1s https://raw.github.com/qiushui/perlv2cart/master/metadata/manifest.yml -s
2. Try to scale it up
rhc cartridge scale qiuzhang-perl-5.10 -a p1s --min 2
3.

Actual results:
The following error message pops up:
openshift@openshift-ubuntu:~/tmp$ rhc cartridge scale qiuzhang-perl-5.10 -a p1s --min 2
Using 88_qiuzhang-perl-5.10 (Perl 5.10) for 'qiuzhang-perl-5.10'
This operation will run until the application is at the minimum scale and may take several minutes.
Setting scale range for 88_qiuzhang-perl-5.10 ... Invalid cartridge ID. It can only contain alphanumeric characters, dashes(-) and dots(.)


Expected results:
1. If the cartridge vendor name is illegal, the application creation should fail with proper error message, too.
2. If the cartridge vendor name is OK, the scale up process should be successful.

Additional info:
1. If renaming the cartridge vendor name as "qiuzhang", the scale up process will be finished successfully.
2. The manifest.yml used is added to the attachment. Paste the vendor part here for convienient reference:
Name: perl
#Name: 6.p-rl
Cartridge-Short-Name: PERL
Display-Name: Perl 5.10
Description: "Perl is a general-purpose server-side scripting language originally designed for Web development to produce dynamic Web pages. Popular development frameworks include: CakePerl, Zend, Symfony, and Code Igniter."
Version: '5.10'
License: "GPL v2"
License-Url: http://dev.perl.org/licenses/
Vendor: perl.org
Cartridge-Version: 0.0.1
Cartridge-Vendor: 88_qiuzhang
Comment 1 Jhon Honce 2013-10-30 12:51:57 EDT
Broker should support same regex as Node for cartridge names

See manifest.rb#VALID_CARTRIDGE_NAME_PATTERN and manifest.rb#VALID_VENDOR_NAME_PATTERN
Comment 2 Abhishek Gupta 2013-10-30 16:12:22 EDT
Fixed with --> https://github.com/openshift/origin-server/pull/4054
Comment 4 Abhishek Gupta 2013-10-30 16:21:26 EDT
The cartridge vendor name is OK, and the scale up process is now successful.
Comment 6 Qiushui Zhang 2013-10-31 06:38:14 EDT
Tested on devenv_3971.

The problem talked in this defect is fixed. The application of download cartridge with "_" in "Cartridge-Vendor" can be scaled up.

For the bug 892899:
[openshift@dhcp-10-143 tmp]$ curl -k -H "Accept: application/xml" --user qiuzhang@redhat.com:redhat $addr/kkk/events -d event="ab_d" 
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>unprocessable_entity</status>
  <type nil="true"></type>
  <data>
    <datum nil="true"></datum>
  </data>
  <messages>
    <message>
      <severity>error</severity>
      <text>Event can only contain lowercase a-z and '-' characters</text>
      <exit-code>126</exit-code>
      <field>event</field>
      <index nil="true"></index>
    </message>
  </messages>
  <version>1.6</version>
  <api-version>1.6</api-version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
    <supported-api-version>1.4</supported-api-version>
    <supported-api-version>1.5</supported-api-version>
    <supported-api-version>1.6</supported-api-version>
  </supported-api-versions>
</response>

[openshift@dhcp-10-143 tmp]$ curl -k -H "Accept: application/xml" --user qiuzhang@redhat.com:redhat https://ec2-50-19-158-133.compute-1.amazonaws.com/broker/rest/domain/qiuzhang/applications -d name=app_name -d cartridge=php-5.3  -d scale=true -X POST
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>unprocessable_entity</status>
  <type nil="true"></type>
  <data>
    <datum nil="true"></datum>
  </data>
  <messages>
    <message>
      <severity>error</severity>
      <text>Invalid application name. Name must only contain alphanumeric characters.</text>
      <exit-code>105</exit-code>
      <field>name</field>
      <index nil="true"></index>
    </message>
  </messages>
  <version>1.6</version>
  <api-version>1.6</api-version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
    <supported-api-version>1.4</supported-api-version>
    <supported-api-version>1.5</supported-api-version>
    <supported-api-version>1.6</supported-api-version>
  </supported-api-versions>
</response>

Mark the bug as verified.

Note You need to log in before you can comment on or make changes to this bug.