integ/config/puppet-modules/puppet-rabbitmq-5.5.0/centos/patches/0005-Remove-the-rabbitmq_nodename-fact.patch
Scott Little bab9bb6b69 Internal restructuring of stx-integ
Create new directories:
   ceph
   config
   config-files
   filesystem
   kernel
   kernel/kernel-modules
   ldap
   logging
   strorage-drivers
   tools
   utilities
   virt

Retire directories:
   connectivity
   core
   devtools
   support
   extended

Delete two packages:
   tgt
   irqbalance

Relocated packages:
   base/
      dhcp
      initscripts
      libevent
      lighttpd
      linuxptp
      memcached
      net-snmp
      novnc
      ntp
      openssh
      pam
      procps
      sanlock
      shadow
      sudo
      systemd
      util-linux
      vim
      watchdog

   ceph/
      python-cephclient

   config/
      facter
      puppet-4.8.2
      puppet-modules

   filesystem/
      e2fsprogs
      nfs-utils
      nfscheck

   kernel/
      kernel-std
      kernel-rt

   kernel/kernel-modules/
      mlnx-ofa_kernel

   ldap/
      nss-pam-ldapd
      openldap

   logging/
      syslog-ng
      logrotate

   networking/
      lldpd
      iproute
      mellanox
      python-ryu
      mlx4-config

   python/
      python-2.7.5
      python-django
      python-gunicorn
      python-setuptools
      python-smartpm
      python-voluptuous

   security/
      shim-signed
      shim-unsigned
      tboot

   strorage-drivers/
      python-3parclient
      python-lefthandclient

   virt/
      cloud-init
      libvirt
      libvirt-python
      qemu

   tools/
      storage-topology
      vm-topology

   utilities/
      tis-extensions
      namespace-utils
      nova-utils
      update-motd

Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 10:06:31 -04:00

88 lines
2.9 KiB
Diff

From 02c56be5340b079797fdb9944e1e048f1c3a18b7 Mon Sep 17 00:00:00 2001
From: Al Bailey <Al.Bailey@windriver.com>
Date: Fri, 2 Feb 2018 12:30:22 -0600
Subject: [PATCH] Remove the rabbitmq_nodename fact
This fact will not work on a standby node. it requires a drbd folder in order
for rabbitmqctl status to work.
---
lib/facter/rabbitmq_nodename.rb | 8 ------
spec/unit/rabbitmq_nodename_spec.rb | 50 -------------------------------------
2 files changed, 58 deletions(-)
delete mode 100644 lib/facter/rabbitmq_nodename.rb
delete mode 100644 spec/unit/rabbitmq_nodename_spec.rb
diff --git a/lib/facter/rabbitmq_nodename.rb b/lib/facter/rabbitmq_nodename.rb
deleted file mode 100644
index 2ee7926..0000000
--- a/lib/facter/rabbitmq_nodename.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-Facter.add(:rabbitmq_nodename) do
- setcode do
- if Facter::Core::Execution.which('rabbitmqctl')
- rabbitmq_nodename = Facter::Core::Execution.execute('rabbitmqctl status 2>&1')
- %r{^Status of node '?([\w\.]+@[\w\.\-]+)'?( \.+)?$}.match(rabbitmq_nodename)[1]
- end
- end
-end
diff --git a/spec/unit/rabbitmq_nodename_spec.rb b/spec/unit/rabbitmq_nodename_spec.rb
deleted file mode 100644
index 621d7eb..0000000
--- a/spec/unit/rabbitmq_nodename_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require "spec_helper"
-
-describe Facter::Util::Fact do
- before {
- Facter.clear
- }
-
- describe "rabbitmq_nodename" do
- context 'with value' do
- before :each do
- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true)
- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit1 ...')
- end
- it {
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit1')
- }
- end
-
- context 'with dashes in hostname' do
- before :each do
- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true)
- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit-1 ...')
- end
- it {
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1')
- }
- end
-
- context 'with quotes around node name' do
- before :each do
- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true)
- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node \'monty@rabbit-1\' ...')
- end
- it {
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1')
- }
- end
-
- context 'without trailing points' do
- before :each do
- Facter::Core::Execution.stubs(:which).with('rabbitmqctl').returns(true)
- Facter::Core::Execution.stubs(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit-1')
- end
- it {
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1')
- }
- end
-
- end
-end
--
1.8.3.1