redhat-cop / ocp4-helpernode

This playbook helps set up an "all-in-one" node, that has all the infrastructure/services in order to install OpenShift 4.
342 stars 302 forks source link

Unable to start service haproxy #81

Closed asispatra closed 4 years ago

asispatra commented 4 years ago

I was following the following doc to prepare bastion node. But getting the following error:

failed: [localhost] (item=haproxy) => {"ansible_loop_var": "item", "changed": false, "item": "haproxy", "msg": "Unable to start service haproxy: Job for haproxy.service failed because the control process exited with error code.\nSee \"systemctl status haproxy.service\" and \"journalctl -xe\" for details.\n"}
.
.
.
localhost                  : ok=29   changed=20   unreachable=0    failed=1    skipped=29   rescued=1    ignored=0

Doc: https://github.com/RedHatOfficial/ocp4-helpernode Here is the full log:

[root@ocpbastion ocp4-helpernode]# ansible-playbook -e @vars-ppc64le.yaml tasks/main.yml

PLAY [all] *****************************************************************************

TASK [Gathering Facts] *****************************************************************
ok: [localhost]

TASK [fail] ****************************************************************************
[WARNING]: conditional statements should not include jinja2 templating delimiters such
as {{ }} or {% %}. Found: item is search('{{ chars }}')
skipping: [localhost] => (item=aus.stglabs.ibm.com)
skipping: [localhost] => (item=ocpbastion)
skipping: [localhost] => (item=ocpbootstrap)

TASK [fail] ****************************************************************************
[WARNING]: conditional statements should not include jinja2 templating delimiters such
as {{ }} or {% %}. Found: item.name is search('{{ chars }}')
skipping: [localhost] => (item={'name': 'ocpmaster1', 'ipaddr': 'XX.XX.XX.221'})
skipping: [localhost] => (item={'name': 'ocpmaster2', 'ipaddr': 'XX.XX.XX.223'})
skipping: [localhost] => (item={'name': 'ocpmaster3', 'ipaddr': 'XX.XX.XX.224'})
skipping: [localhost] => (item={'name': 'ocpworker1', 'ipaddr': 'XX.XX.XX.225'})
skipping: [localhost] => (item={'name': 'ocpworker2', 'ipaddr': 'XX.XX.XX.226'})
skipping: [localhost] => (item={'name': 'ocpworker3', 'ipaddr': 'XX.XX.XX.227'})

TASK [fail] ****************************************************************************
skipping: [localhost]

TASK [file] ****************************************************************************
changed: [localhost]

TASK [openssh_keypair] *****************************************************************
changed: [localhost]

TASK [blockinfile] *********************************************************************
changed: [localhost] => (item={'name': 'ocpmaster1', 'ipaddr': 'XX.XX.XX.221'})
changed: [localhost] => (item={'name': 'ocpmaster2', 'ipaddr': 'XX.XX.XX.223'})
changed: [localhost] => (item={'name': 'ocpmaster3', 'ipaddr': 'XX.XX.XX.224'})
changed: [localhost] => (item={'name': 'ocpworker1', 'ipaddr': 'XX.XX.XX.225'})
changed: [localhost] => (item={'name': 'ocpworker2', 'ipaddr': 'XX.XX.XX.226'})
changed: [localhost] => (item={'name': 'ocpworker3', 'ipaddr': 'XX.XX.XX.227'})

TASK [blockinfile] *********************************************************************
changed: [localhost] => (item={'name': 'ocpbootstrap'})

TASK [assert] **************************************************************************
fatal: [localhost]: FAILED! => {
    "assertion": false,
    "changed": false,
    "evaluated_to": false,
    "msg": "Assertion failed"
}

TASK [set_fact] ************************************************************************
ok: [localhost]

TASK [set_fact] ************************************************************************
skipping: [localhost]

TASK [set_fact] ************************************************************************
skipping: [localhost]

TASK [set_fact] ************************************************************************
skipping: [localhost]

TASK [set_fact] ************************************************************************
skipping: [localhost]

TASK [set_fact] ************************************************************************
skipping: [localhost]

TASK [set_fact] ************************************************************************
ok: [localhost]

TASK [set_fact] ************************************************************************
ok: [localhost]

TASK [set_fact] ************************************************************************
ok: [localhost]

TASK [set_fact] ************************************************************************
ok: [localhost]

TASK [set_fact] ************************************************************************
ok: [localhost]

TASK [Install needed packages] *********************************************************
changed: [localhost]

TASK [Install packages for DHCP/PXE install] *******************************************
skipping: [localhost]

TASK [Install additional package for Intel platforms] **********************************
skipping: [localhost]

TASK [Write out dhcp file] *************************************************************
skipping: [localhost]

TASK [Write out named file] ************************************************************
changed: [localhost]

TASK [Installing DNS Serialnumber generator] *******************************************
changed: [localhost]

TASK [Set zone serial number] **********************************************************
changed: [localhost]

TASK [Setting serial number as a fact] *************************************************
ok: [localhost]

TASK [Write out "aus.stglabs.ibm.com" zone file] ***************************************
changed: [localhost]

TASK [Write out reverse zone file] *****************************************************
changed: [localhost]

TASK [Write out haproxy config file] ***************************************************
changed: [localhost]

TASK [Copy httpd conf file] ************************************************************
changed: [localhost]

TASK [Create apache directories for installing] ****************************************
changed: [localhost] => (item=/var/www/html/install)
changed: [localhost] => (item=/var/www/html/ignition)

TASK [Delete OCP4 files, if requested, to download again] ******************************
skipping: [localhost] => (item=/usr/local/src/openshift-client-linux.tar.gz)
skipping: [localhost] => (item=/usr/local/src/openshift-install-linux.tar.gz)
skipping: [localhost] => (item=/var/www/html/install/bios.raw.gz)
skipping: [localhost] => (item=/var/lib/tftpboot/rhcos/initramfs.img)
skipping: [localhost] => (item=/var/lib/tftpboot/rhcos/kernel)

TASK [Downloading OCP4 installer Bios] *************************************************
changed: [localhost]

TASK [Start firewalld service] *********************************************************
ok: [localhost]

TASK [Open up firewall ports] **********************************************************
changed: [localhost] => (item=67/udp)
changed: [localhost] => (item=53/tcp)
changed: [localhost] => (item=53/udp)
changed: [localhost] => (item=443/tcp)
changed: [localhost] => (item=80/tcp)
changed: [localhost] => (item=8080/tcp)
changed: [localhost] => (item=6443/tcp)
changed: [localhost] => (item=6443/udp)
changed: [localhost] => (item=22623/tcp)
changed: [localhost] => (item=22623/udp)
changed: [localhost] => (item=9000/tcp)
changed: [localhost] => (item=69/udp)
changed: [localhost] => (item=111/tcp)
changed: [localhost] => (item=2049/tcp)
changed: [localhost] => (item=20048/tcp)
changed: [localhost] => (item=50825/tcp)
changed: [localhost] => (item=53248/tcp)

TASK [Best effort SELinux repair - DNS] ************************************************
changed: [localhost]

TASK [Best effort SELinux repair - Apache] *********************************************
changed: [localhost]

TASK [Create NFS export directory] *****************************************************
changed: [localhost]

TASK [Copy NFS export conf file] *******************************************************
changed: [localhost]

TASK [Create TFTP config] **************************************************************
skipping: [localhost]

TASK [generate netboot entry for grub2] ************************************************
skipping: [localhost]

TASK [Create TFTP RHCOS dir] ***********************************************************
skipping: [localhost]

TASK [SEBool allow haproxy connect any port] *******************************************
changed: [localhost]

TASK [Copy over files needed for TFTP] *************************************************
skipping: [localhost]

TASK [Downloading OCP4 installer initramfs] ********************************************
skipping: [localhost]

TASK [Downloading OCP4 installer kernel] ***********************************************
skipping: [localhost]

TASK [Set the default tftp file] *******************************************************
skipping: [localhost]

TASK [Set the bootstrap specific tftp file] ********************************************
skipping: [localhost]

TASK [Set the master specific tftp files] **********************************************
skipping: [localhost] => (item={'name': 'ocpmaster1', 'ipaddr': 'XX.XX.XX.221'})
skipping: [localhost] => (item={'name': 'ocpmaster2', 'ipaddr': 'XX.XX.XX.223'})
skipping: [localhost] => (item={'name': 'ocpmaster3', 'ipaddr': 'XX.XX.XX.224'})

TASK [Set the worker specific tftp files] **********************************************
skipping: [localhost] => (item={'name': 'ocpworker1', 'ipaddr': 'XX.XX.XX.225'})
skipping: [localhost] => (item={'name': 'ocpworker2', 'ipaddr': 'XX.XX.XX.226'})
skipping: [localhost] => (item={'name': 'ocpworker3', 'ipaddr': XX.XX.XX.227'})

TASK [create grub.cfg] *****************************************************************
skipping: [localhost]

TASK [generate grub entry (bootstrap)] *************************************************
skipping: [localhost]

TASK [generate grub entry (masters)] ***************************************************
skipping: [localhost] => (item={'name': 'ocpmaster1', 'ipaddr': 'XX.XX.XX.221'})
skipping: [localhost] => (item={'name': 'ocpmaster2', 'ipaddr': 'XX.XX.XX.223'})
skipping: [localhost] => (item={'name': 'ocpmaster3', 'ipaddr': 'XX.XX.XX.224'})

TASK [generate grub entry (workers)] ***************************************************
skipping: [localhost] => (item={'name': 'ocpworker1', 'ipaddr': 'XX.XX.XX.225'})
skipping: [localhost] => (item={'name': 'ocpworker2', 'ipaddr': 'XX.XX.XX.226'})
skipping: [localhost] => (item={'name': 'ocpworker3', 'ipaddr': 'XX.XX.XX.227'})

TASK [Installing TFTP Systemd helper] **************************************************
skipping: [localhost]

TASK [Installing TFTP Systemd unit file] ***********************************************
skipping: [localhost]

TASK [Systemd daemon reload] ***********************************************************
skipping: [localhost]

TASK [Starting services] ***************************************************************
changed: [localhost] => (item=named)
failed: [localhost] (item=haproxy) => {"ansible_loop_var": "item", "changed": false, "item": "haproxy", "msg": "Unable to start service haproxy: Job for haproxy.service failed because the control process exited with error code.\nSee \"systemctl status haproxy.service\" and \"journalctl -xe\" for details.\n"}
ok: [localhost] => (item=httpd)
changed: [localhost] => (item=rpcbind)
changed: [localhost] => (item=nfs-server)

RUNNING HANDLER [restart bind] *********************************************************

RUNNING HANDLER [restart haproxy] ******************************************************

RUNNING HANDLER [restart httpd] ********************************************************

RUNNING HANDLER [restart nfs] **********************************************************

PLAY RECAP *****************************************************************************
localhost                  : ok=29   changed=20   unreachable=0    failed=1    skipped=29   rescued=1    ignored=0

vars-ppc64le.yaml contents:

[root@ocpbastion ocp4-helpernode]# cat vars-ppc64le.yaml
---
disk: vda
staticips: true
helper:
  name: "ocpbastion"
  ipaddr: "XX.XX.XX.236"
dns:
  domain: "XXXXXexampleXXXXX.com"
  clusterid: "ocp4"
  forwarder1: "XX.XX.XX.200"
  forwarder2: "XX.XX.XX.50"
bootstrap:
  name: "ocpbootstrap"
  ipaddr: "XX.XX.XX.233"
masters:
  - name: "ocpmaster1"
    ipaddr: "XX.XX.XX.221"
  - name: "ocpmaster2"
    ipaddr: "XX.XX.XX.223"
  - name: "ocpmaster3"
    ipaddr: "XX.XX.XX.224"
workers:
  - name: "ocpworker1"
    ipaddr: "XX.XX.XX.225"
  - name: "ocpworker2"
    ipaddr: "XX.XX.XX.226"
  - name: "ocpworker3"
    ipaddr: "XX.XX.XX.227"

ppc64le: true
ocp_bios: "https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.3/4.3.18/rhcos-4.3.18-ppc64le-metal.ppc64le.raw.gz"
ocp_initramfs: "https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.3/4.3.18/rhcos-4.3.18-ppc64le-installer-initramfs.ppc64le.img"
ocp_install_kernel: "https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.3/4.3.18/rhcos-4.3.18-ppc64le-installer-kernel-ppc64le"
ocp_client: "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/4.3.18/openshift-client-linux-4.3.18.tar.gz"
ocp_installer: "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/4.3.18/openshift-install-linux-4.3.18.tar.gz"

Any idea what could be the issue?

asispatra commented 4 years ago

There was an existing HTTPD service was already running. After stopping the httpd, not seeing this issue anymore.

Closing #81

Thanks.