Bug 1022948 - There is no reference for the application event "make-ha"
There is no reference for the application event "make-ha"
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-24 06:40 EDT by Meng Bo
Modified: 2015-05-14 20:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:26:29 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)

  None (edit)
Description Meng Bo 2013-10-24 06:40:49 EDT
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@redhat.com: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@redhat.com: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@redhat.com --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 15:37:41 EDT
Fixed with https://github.com/openshift/origin-server/pull/3998
Comment 2 Meng Bo 2013-10-28 02:34:15 EDT
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@redhat.com: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 03:26:31 EDT
Haa, sorry for the typo, the correct one should be "make-ha".
Comment 4 Abhishek Gupta 2013-10-28 13:55:26 EDT
Fixed with --> https://github.com/openshift/origin-server/pull/4012
Comment 6 Meng Bo 2013-10-28 23:30:23 EDT
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.