cloud-init resets eth0 of supplemental node breaking networking

Bug #1718712 reported by Harry Rybacki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Harry Rybacki

Bug Description

Description
===========

cloud-init is resetting the config in /etc/system/networking-scripts/ for eth0 -- probably on the first boot after the guest is provisioned. Default behavior is to assign the 10th host on the `external_network_cidr` as a static IP on this guest. After cloud-init resets the config, the adapter is picking up a new IP via DHCP

  # Created by cloud-init on instance boot automatically, do not edit.
  #
  BOOTPROTO=dhcp
  DEVICE=eth0
  HWADDR=52:54:00:ed:20:3b
  ONBOOT=yes
  TYPE=Ethernet
  USERCTL=no

thereby invalidating what is in a given deployment's ssh.config.ansible file

  <snip>
  Host supplemental
    ProxyCommand ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o
      ConnectTimeout=60 -i /home/alee/.quickstart/id_rsa_virt_power <email address hidden> -W 192.168.23.10:22
    IdentityFile /home/XXX/.quickstart/id_rsa_supplemental
    User stack
    StrictHostKeyChecking no
    UserKnownHostsFile=/dev/null
  <snip>

and stopping playbook execution when it next attempts to reach the guest

  TASK [freeipa-setup : Create FreeIPA deployment script] ************************
  task path: /home/XXX/.quickstart/usr/local/share/ansible/roles/freeipa-setup/tasks/main.yml:14
  Wednesday 20 September 2017 20:23:39 -0400 (0:00:00.088) 0:50:41.051 ***
  <supplemental> ssh_retry: attempt: 0, ssh return code is 255. cmd (/bin/sh -c 'echo ~stack &&
  sleep 0'...), pausing for 0 seconds
  <supplemental> ssh_retry: attempt: 1, ssh return code is 255. cmd (/bin/sh -c 'echo ~stack &&
  sleep 0'...), pausing for 1 seconds
  <supplemental> ssh_retry: attempt: 2, ssh return code is 255. cmd (/bin/sh -c 'echo ~stack &&
  sleep 0'...), pausing for 3 seconds
  fatal: [supplemental]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host
  via ssh: Warning: Permanently added 'XXX.com,10.13.57.27' (ECDSA) to the list of known
  hosts.\r\nchannel 0: open failed: connect failed: No route to host\r\nstdio forwarding
  failed\r\nssh_exchange_identification: Connection closed by remote host\r\n", "unreachable":
  true}

Steps to reproduce
==================

Deploy quickstart w/ IPA against a CentOS virthost

# Deploy w/ quickstart
pushd tripleo-quickstart
bash quickstart.sh \
  --bootstrap \
  --ansible-debug \
  --no-clone \
  --playbook quickstart-extras.yml \
  --working-dir $WORKING_DIR \
  --release master-tripleo-ci \
  --config $WORKSPACE/config/general_config/ipa.yml \
  --nodes $WORKSPACE/config/nodes/1ctlr_2comp_1supp.yml \
  --teardown "all" \
  --tags "all" \
  $VIRTHOST

Expected result
===============

Quickstart runs successfully and the FreeIPA server exists on the supplemental node.

Actual result
=============

Quickstart fails upon attempting to reach the supplemental node after it has started.

Environment
===========

release=master
CentOS 7.3
cloud-init-0.7.9-9.el7.centos.2.x86_64

Tags: quickstart
Changed in tripleo:
status: New → In Progress
importance: Undecided → High
Changed in tripleo:
milestone: none → queens-1
tags: added: quickstart
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart (master)

Fix proposed to branch: master
Review: https://review.openstack.org/508158

Revision history for this message
Harry Rybacki (hrybacki-h) wrote :

Confirmed that a vanilla quickstart run does deploy successfully. So something in my invocation is resulting in the issue.

Revision history for this message
Harry Rybacki (hrybacki-h) wrote :
Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-quickstart (master)

Change abandoned by Harry Rybacki (<email address hidden>) on branch: master
Review: https://review.openstack.org/508158
Reason: Abandoned in lieu of: https://review.openstack.org/#/c/510007/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.