Do not call crm_node -n when running in a container
Do not call crm_node -n when running in a container

In lib/facter/pacemaker_node_name.rb we do the following:
Facter.add('pacemaker_node_name') do
  setcode do
    Facter::Core::Execution.exec 'crm_node -n'
  end
end

This is problematic because starting with pacemaker 1.1.19 crm_node -n
will trigger a newly-introduced CRM_OP_NODE_INFO query which will hang
if the container runs 1.1.19 code and the cluster runs 1.1.18 code.

Let's simply avoid running these queries when run inside a container.

Tested this by deploying successfully an overcloud with pcmk-1.1.19 in
containers and 1.1.18 on the host:
[root@controller-0 ~]# rpm -q pacemaker
pacemaker-1.1.18-11.el7_5.3.x86_64
[root@controller-0 ~]# docker exec -it galera-bundle-docker-0 sh -c "rpm -q pacemaker"
pacemaker-1.1.19-3.el7.x86_64

For this to work we also need the following RA fix:
https://github.com/ClusterLabs/resource-agents/pull/1173/

Previously this would fail with crm_node -n just hanging.

Change-Id: I9ae7df2f49f918507c5f98b2441b5b17423a38da
Closes-Bug: #1782231

openstack/puppet-pacemaker,openstack/puppet-pacemaker,openstack/puppet-pacemaker,openstack/puppet-pacemaker