瀏覽代碼

PARP: make sure FQDN matches internal IP

This is required to make sure the node comes up, as Kubernetes now uses
`hostname -f` to set node name
Vadim Rutkovsky 7 年之前
父節點
當前提交
81710bcbf7
共有 2 個文件被更改,包括 7 次插入3 次删除
  1. 1 1
      .papr.all-in-one.inventory
  2. 6 2
      .papr.sh

+ 1 - 1
.papr.all-in-one.inventory

@@ -29,4 +29,4 @@ ocp-master
 ocp-master
 
 [nodes]
-ocp-master openshift_schedulable=true openshift_node_labels="{'node-role.kubernetes.io/infra':'true'}"
+ocp-master openshift_schedulable=true openshift_node_labels="{'node-role.kubernetes.io/infra':'true'}" ansible_host="{{ lookup('env', 'RHCI_ocp_master_IP') }}"

+ 6 - 2
.papr.sh

@@ -19,7 +19,6 @@ else
 fi
 export target_branch
 
-
 # Need to define some git variables for rebase.
 git config --global user.email "ci@openshift.org"
 git config --global user.name "OpenShift Atomic CI"
@@ -46,7 +45,12 @@ pip install -r requirements.txt
 export ANSIBLE_STDOUT_CALLBACK=debug
 
 # ping the nodes to check they're responding and register their ostree versions
-ansible -vvv -i $PAPR_INVENTORY nodes -a 'rpm-ostree status'
+ansible -vv -i $PAPR_INVENTORY nodes -a 'rpm-ostree status'
+
+# Make sure hostname -f returns correct node name
+ansible -vv -i $PAPR_INVENTORY nodes -m setup
+ansible -vv -i $PAPR_INVENTORY nodes -a "hostnamectl set-hostname {{ ansible_default_ipv4.address }}"
+ansible -vv -i $PAPR_INVENTORY nodes -m setup -a "gather_subset=min"
 
 upload_journals() {
   mkdir journals