[ClusterLabs] Question about fence-agents-compute

Kazunori INOUE kazunori.inoue3 at gmail.com
Thu Oct 8 10:37:14 UTC 2015


Hi,

I'm looking for the STONITH plug-in which can be used in Pacemaker on
OpenStack VM.
(I used ec2[*] on Amazon EC2 instance. I want a plug-in equivalent to it.)
 * http://hg.linux-ha.org/glue/file/tip/lib/plugins/stonith/external/ec2

- environment
  [Controller_Node]# cat /etc/redhat-release
  CentOS Linux release 7.1.1503 (Core)
  [Controller_Node]# rpm -qa | egrep 'rdo-rel|packstack'
  rdo-release-kilo-1.noarch
  openstack-packstack-2015.1-0.11.dev1616.g5526c38.el7.noarch
  openstack-packstack-puppet-2015.1-0.11.dev1616.g5526c38.el7.noarch

  [VM_db0101]# cat /etc/redhat-release
  Red Hat Enterprise Linux Server release 7.1 (Maipo)
  [VM_db0101]# rpm -qa | egrep 'fence-agents|novaclient|pacemaker-1'
  fence-agents-common-4.0.19-1.el7.x86_64
  fence-agents-compute-4.0.19-1.el7.x86_64
  python-novaclient-2.23.0-1.el7.noarch
  pacemaker-1.1.13-1.el7.x86_64

I expected that fence_compute[*] could be used, but the fencing failed..,
so I executed fence_compute command and confirmed it.
* https://github.com/ClusterLabs/fence-agents/tree/796a70e/fence/agents/compute

[VM_db0101]# export OS_USERNAME=demo ; export OS_PASSWORD=demo ;
export OS_AUTH_URL=http://10.0.2.11:5000/v2.0 ; export
OS_TENANT_NAME=demo
[VM_db0101]# nova list
+--------------------------------------+-----------+--------+ (snip)
| ID                                   | Name      | Status |
+--------------------------------------+-----------+--------+
| 86d1585c-4085-4dbf-9ffe-f1d97c74cc25 | db0101    | ACTIVE |
| f1e1b358-dc6f-405a-8db5-0b7ba6d57f29 | db0201    | ACTIVE |
+--------------------------------------+-----------+--------+

[VM_db0101]# fence_compute --username=demo --password=demo
--tenant-name=demo --auth-url=http://10.0.2.11:5000/v2.0 --action=list
-v
Starting new HTTP connection (1): 10.0.2.11
"POST /v2.0/tokens HTTP/1.1" 200 4170
Starting new HTTP connection (1): 10.0.2.11
"GET /v2/7ea27b4a490b4e92a36bf0aa1a843bd1/os-hypervisors/detail
HTTP/1.1" 200 2591
Traceback (most recent call last):
  File "/usr/sbin/fence_compute", line 248, in <module>
    main()
  File "/usr/sbin/fence_compute", line 244, in main
    result = fence_action(None, options, set_power_status,
get_power_status, get_plugs_list, None)
  File "/usr/share/fence/fencing.py", line 771, in fence_action
    status = status.upper()
AttributeError: 'NoneType' object has no attribute 'upper'

[VM_db0101]# fence_compute --username=demo --password=demo
--tenant-name=demo --auth-url=http://10.0.2.11:5000/v2.0 --action=off
--plug=db0201 -v
get action: status
Starting new HTTP connection (1): 10.0.2.11
"POST /v2.0/tokens HTTP/1.1" 200 4170
Starting new HTTP connection (1): 10.0.2.11
"GET /v2/7ea27b4a490b4e92a36bf0aa1a843bd1/os-services?host=db0201
HTTP/1.1" 200 16
Failed: Unable to obtain correct plug status or plug is not available


Q1. Is the fence_compute usable in Pacemaker on OpenStack VM?
    The improved version of fence_openstack[*]?
    * https://github.com/beekhof/fence_openstack/blob/master/fence_openstack
Q2. If Q1 is yes, does fence_compute support OpenStack Kilo?

Regards,
Kazunori INOUE




More information about the Users mailing list