Bug 1022948 - There is no reference for the application event "make-ha"
Summary: There is no reference for the application event "make-ha"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 10:40 UTC by Meng Bo
Modified: 2015-05-15 00:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:26:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Meng Bo 2013-10-24 10:40:49 UTC
Description of problem:
Enable the ha in broker-dev.conf and add the ability to the user. Create a scalable app. Try to find the way to make-ha via rest api. There is no reference for this operation.

[root@ip-10-151-25-153 ~]# curl -s -k -H 'Accept: application/xml' --user bmeng:123123 https://localhost/broker/rest/application/5268ec69b07b1074170000ee/|grep -i make
[root@ip-10-151-25-153 ~]# 

But the event can be triggered from the api directly.
# curl -s -k -H 'Accept: application/xml' --user bmeng:123123 https://localhost/broker/rest/application/5268ec69b07b1074170000ee/events -d event=make-ha
<---->
  <messages>
    <message>
      <severity>info</severity>
      <text>Application perl1s is now ha</text>
      <exit-code>0</exit-code>
      <field nil="true"></field>
      <index nil="true"></index>
    </message>
  </messages>


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

How reproducible:
always

Steps to Reproduce:
1. Enable ha for the broker 
ALLOW_HA_APPLICATIONS="true"
2. Add the ability to user
# oo-admin-ctl-user -lbmeng --allowha true 
3. Create scalable app and try to find the method to make-ha

Actual results:
No reference for this operation.

Expected results:
Should show the method in the result like start, stop events.

Additional info:

Comment 1 Rajat Chopra 2013-10-25 19:37:41 UTC
Fixed with https://github.com/openshift/origin-server/pull/3998

Comment 2 Meng Bo 2013-10-28 06:34:15 UTC
Checked on devenv_3953, the method has been added, but the option name is incorrect. (Which should be "maka-ha")


        <link>
          <rel>Make the application Highly Available (HA)</rel>
          <method>POST</method>
          <href>https://localhost/broker/rest/application/526e03f9582052d266000006/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>make_ha</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>



# curl -k -H 'Accept: application/xml' --user bmeng:123123 https://localhost/broker/rest/domains/bmengdev/applications/php1s/events -XPOST -d event=make_ha
<?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>

Comment 3 Meng Bo 2013-10-28 07:26:31 UTC
Haa, sorry for the typo, the correct one should be "make-ha".

Comment 4 Abhishek Gupta 2013-10-28 17:55:26 UTC
Fixed with --> https://github.com/openshift/origin-server/pull/4012

Comment 6 Meng Bo 2013-10-29 03:30:23 UTC
Checked on devenv_3958, issue fixed.


        <link>
          <rel>Make the application Highly Available (HA)</rel>
          <method>POST</method>
          <href>https://localhost/broker/rest/application/526f2ae9f15afcf39b000024/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>make-ha</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>

Move bug to verified.


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