Support redfish inside a fencing yaml file

Currently the only working and supported fencing devices are via IPMI
(and partially via xvm). With this change we add support for redfish
fencing devices. Note that the support is currently only when the
fencing parameters are defined by hand. More work will be needed to
support redfish inside the 'overcloud generate fencing' command.
The syntax used will look like the following:
parameter_defaults:
  EnableFencing: true
  FencingConfig:
    devices:
    - agent: fence_redfish
      host_mac: 52:54:00:b8:9a:90
      params:
        ipaddr: 172.16.0.1
        ipport: 8000
        login: admin
        passwd: password
        systems_uri: /redfish/v1/Systems/compute-0
        ssl_insecure: true
    - agent: fence_redfish
      host_mac: 52:54:00:d2:8e:30
      params:
        ipaddr: 172.16.0.1
        ipport: 8000
        systems_uri: /redfish/v1/Systems/compute-1
        ssl_insecure: true
        login: admin
        passwd: password
    - agent: fence_redfish
      host_mac: 52:54:00:8a:da:e4
      params:
        ipaddr: 172.16.0.1
        ipport: 8000
        login: admin
        passwd: password
        systems_uri: /redfish/v1/Systems/controller-0
        ssl_insecure: true
    - agent: fence_redfish
      host_mac: 52:54:00:69:82:4c
      params:
        ipaddr: 172.16.0.1
        ipport: 8000
        login: admin
        passwd: password
        systems_uri: /redfish/v1/Systems/controller-1
        ssl_insecure: true

Note that for this to work https://bugzilla.redhat.com/show_bug.cgi?id=1677023
needs to be fixed first. Tested this with the fix for the above rhbz and
the depends-on and got correctly fencing devices configured:
 stonith-fence_redfish-52540069824c     (stonith:fence_redfish):        Started controller-1
 stonith-fence_redfish-5254008adae4     (stonith:fence_redfish):        Started controller-2
 stonith-fence_redfish-5254004c56a8     (stonith:fence_redfish):        Started controller-1

Depends-On: I96fa203c706858f13d5bd6732c31003ecb193b62

Change-Id: Ic85855b6789dbad918f709fdeeabc6934876ce72
This commit is contained in:
Michele Baldessari 2019-02-14 10:55:49 +01:00
parent 8253d883be
commit dc3d3a92bc
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ class tripleo::fencing(
create_resources('pacemaker::stonith::fence_xvm', $xvm_devices, $common_params)
}
$redfish_devices = local_fence_devices('fence_redfish', $all_devices)
create_resources('pacemaker::stonith::fence_redfish', $redfish_devices, $common_params)
$ipmilan_devices = local_fence_devices('fence_ipmilan', $all_devices)
create_resources('pacemaker::stonith::fence_ipmilan', $ipmilan_devices, $common_params)
if ($enable_instanceha and $is_compute_instanceha_node) {