Bug 1033523 - The hot_deploy marker/--hot-deploy option can not take effect when deploying app with binary deployment
Summary: The hot_deploy marker/--hot-deploy option can not take effect when deploying ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1061424
TreeView+ depends on / blocked
 
Reported: 2013-11-22 10:14 UTC by chunchen
Modified: 2015-05-15 00:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1061424 (view as bug list)
Environment:
Last Closed: 2014-01-30 00:50:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description chunchen 2013-11-22 10:14:48 UTC
Description of problem:
The hot_deploy marker/--hot-deploy option can not take effect when deploying app with binary deployment

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

How reproducible:
always

Steps to Reproduce:
1. Create an app
rhc app create cphp04 php-5.3 --no-git
2. Configure the deployment type to binary
rhc configure-app cphp04 --deployment-type binary
3. Deploy this app via RESTAPI with indicating hot_deploy to true
curl -k -H "Accept: application/xml" --user "chunchen:redhat7" https://ec2-107-22-106-82.compute-1.amazonaws.com/broker/rest/application/528ecca41b21b85c770001f2/deployments -X POST -d artifact_url=https://cphp-ccyd.rhcloud.com/cphp2.tar.gz -d hot_deploy=true
4. Deploy this app from local binary file with --hot-deploy option
rhc deploy-app --ref cphp04.tar.gz -a cphp04 --hot-deploy
5. Check if this app is restarted at step 3 & 4 or not

Actual results:
at step 3:
<...>
  <status>created</status>
  <type>deployment</type>
  <data>
    <deployment>
      <created-at>2013-11-22T03:24:51Z</created-at>
      <hot-deploy>false</hot-deploy>                            <<<<<<<<<<<<<<<<<<<
      <force-clean-build>false</force-clean-build>
      <ref>master</ref>
      <sha1 nil="true"></sha1>
      <id>377ad282</id>
      <activations>
        <activation>2013-11-22T03:24:56Z</activation>
      </activations>
    </deployment>
  </data>
<...>
  <messages>
    <message>
      <severity>info</severity>
      <text>Added 377ad282 to application cphp04</text>
      <exit-code>0</exit-code>
      <field nil="true"></field>
      <index nil="true"></index>
    </message>
  </messages>
at step 5: the app is restarted.

Expected results:
The hot_deploy/--hot-deploy marker should take effect when deploying app with binary deployment

Additional info:

Comment 1 Andy Goldstein 2013-11-22 14:30:58 UTC
Not a release blocker

Comment 2 Ben Parees 2013-12-19 03:57:04 UTC
fix:
https://github.com/openshift/origin-server/pull/4375

Comment 3 openshift-github-bot 2013-12-19 15:43:35 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/836bb408aa7fff6a7605fedf55fc0294a771e9b6
Bug 1033523 - The hot_deploy marker/--hot-deploy option can not take
effect when deploying app with binary deployment

Comment 4 chunchen 2013-12-20 02:05:08 UTC
It's fixed, verified on devenv_4159, please refer to the following results:

1. Create an app
rhc app create cphp04 php-5.3 --no-git
2. Configure the deployment type to binary
rhc configure-app cphp04 --deployment-type binary
3. Deploy this app via RESTAPI with indicating hot_deploy and force_clean_build to true
4. Deploy this app from local binary file with --hot-deploy option
rhc deploy-app --ref cphp04.tar.gz -a cphp04 --hot-deploy
5. Check if this app is restarted at step 3 & 4 or not

At step 3:
]$ curl -k -H "Accept: application/xml" --user "chunchen:redhat7" https://ec2-50-16-113-124.compute-1.amazonaws.com/broker/rest/application/52b3a34b58c3da496f000421/deployments -X POST -d artifact_url=http://cphp-ccyd.rhcloud.com/cphp2.tar.gz -d hot_deploy=true -d force_clean_build=true

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>created</status>
  <type>deployment</type>
  <data>
    <deployment>
      <created-at>2013-12-20T01:58:05Z</created-at>
      <hot-deploy>true</hot-deploy>
      <force-clean-build>true</force-clean-build>
      <ref>master</ref>
      <sha1 nil="true"></sha1>
      <id>d1ad48c7</id>
      <activations>
        <activation>2013-12-20T01:58:10Z</activation>
      </activations>
    </deployment>
  </data>
  <messages>
    <message>
      <severity>info</severity>
      <text>Added d1ad48c7 to application cphp04</text>
      <exit-code>0</exit-code>
      <field nil="true"></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>

At step 4:
]$ rhc deploy-app --ref cphp04.tar.gz -a cphp04 --hot-deploy
Deployment of file '/home/chunchen/test/cphp04.tar.gz' in progress for application cphp04 ...
Starting deploy for binary artifact
Stopping gear
Not stopping cartridge php because hot deploy is enabled
Creating new deployment directory
Preparing deployment
Preparing build for deployment
Deployment id is b2e26b48
Distributing deployment
Distribution status: success
Activating deployment
Not stopping cartridge php because hot deploy is enabled
Not starting cartridge php because hot deploy is enabled
Activation status: success
Deployment status: success
Success

At step 5:
The application does not restart at step 3 and step 4.


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