[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: use FQDN instead of short hostname in ferm rules

2016-12-02 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: phabricator: use FQDN instead of short hostname in ferm rules
..


phabricator: use FQDN instead of short hostname in ferm rules

follow-up fix to Change-Id: Iff3b06395a61498

We need the FQDN and not the short hostname in the ferm rule
or it breaks (ferm service restart fails). This host or it does
not search eqiad.wmnet.

TODO: see if we can replace all uses of the short hostname var
and replace it with the FQDN var so that we have only one of them
in hiera and not both.

Bug: T137928
Change-Id: Ia47402784ec739eb7a64b363a648e8a17fc507d2
---
M hieradata/role/common/phabricator/main.yaml
M modules/role/manifests/phabricator/rsync.pp
2 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/hieradata/role/common/phabricator/main.yaml 
b/hieradata/role/common/phabricator/main.yaml
index b688a93..98836f5 100644
--- a/hieradata/role/common/phabricator/main.yaml
+++ b/hieradata/role/common/phabricator/main.yaml
@@ -9,6 +9,8 @@
 value: standard
 
 phabricator_active_server: 'iridium'
+phabricator_active_server_fqdn: 'iridium.eqiad.wmnet'
+
 phabricator_servers:
   - phab1001.eqiad.wmnet
   - phab2001.codfw.wmnet
diff --git a/modules/role/manifests/phabricator/rsync.pp 
b/modules/role/manifests/phabricator/rsync.pp
index c7be070..8cb7852 100644
--- a/modules/role/manifests/phabricator/rsync.pp
+++ b/modules/role/manifests/phabricator/rsync.pp
@@ -2,10 +2,10 @@
 # to allow pushing of /srv/repos from active to passive  (T137928)
 class role::phabricator::rsync {
 
-$phabricator_active_server = hiera('phabricator_active_server')
+$phabricator_active_server_fqdn = hiera('phabricator_active_server_fqdn')
 
-if $::hostname != $phabricator_active_server {
-$hosts_allow = "@resolve((${phabricator_active_server}))"
+if $::fqdn != $phabricator_active_server_fqdn {
+$hosts_allow = "@resolve((${phabricator_active_server_fqdn}))"
 
 ferm::service { 'phabricator-repo-rsync':
 proto  => 'tcp',

-- 
To view, visit https://gerrit.wikimedia.org/r/325067
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia47402784ec739eb7a64b363a648e8a17fc507d2
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: use FQDN instead of short hostname in ferm rules

2016-12-02 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/325067

Change subject: phabricator: use FQDN instead of short hostname in ferm rules
..

phabricator: use FQDN instead of short hostname in ferm rules

follow-up fix to Change-Id: Iff3b06395a61498

We need the FQDN and not the short hostname in the ferm rule
or it breaks (ferm service restart fails). This host or it does
not search eqiad.wmnet.

TODO: see if we can replace all uses of the short hostname var
and replace it with the FQDN var so that we have only one of them
in hiera and not both.

Change-Id: Ia47402784ec739eb7a64b363a648e8a17fc507d2
---
M hieradata/role/common/phabricator/main.yaml
M modules/role/manifests/phabricator/rsync.pp
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/325067/1

diff --git a/hieradata/role/common/phabricator/main.yaml 
b/hieradata/role/common/phabricator/main.yaml
index b00ab35..4af435d 100644
--- a/hieradata/role/common/phabricator/main.yaml
+++ b/hieradata/role/common/phabricator/main.yaml
@@ -9,6 +9,8 @@
 value: standard
 
 phabricator_active_server: 'iridium'
+phabricator_active_server_fqdn: 'iridium.eqiad.wmnet'
+
 phabricator_servers:
   - phab1001.eqiad.wmnet
   - phab2001.codfw.wmnet
diff --git a/modules/role/manifests/phabricator/rsync.pp 
b/modules/role/manifests/phabricator/rsync.pp
index c7be070..5b86e71 100644
--- a/modules/role/manifests/phabricator/rsync.pp
+++ b/modules/role/manifests/phabricator/rsync.pp
@@ -5,7 +5,7 @@
 $phabricator_active_server = hiera('phabricator_active_server')
 
 if $::hostname != $phabricator_active_server {
-$hosts_allow = "@resolve((${phabricator_active_server}))"
+$hosts_allow = "@resolve((${phabricator_active_server_fqdn}))"
 
 ferm::service { 'phabricator-repo-rsync':
 proto  => 'tcp',

-- 
To view, visit https://gerrit.wikimedia.org/r/325067
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia47402784ec739eb7a64b363a648e8a17fc507d2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits