The way to fetch HOST_IP in local.conf.example can lead to invalid ip
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
networking-odl |
Fix Released
|
Undecided
|
Lajos Katona |
Bug Description
In local.conf.example the following line responsible for fetching the host ip:
HOST_IP=$(ip route get 8.8.8.8 | awk '{print $NF; exit}')
ip route get 8.8.8.8 can produce output like this:
$ ip route get 8.8.8.8
8.8.8.8 via 100.109.0.1 dev ens4 src 100.109.0.178 uid 1000
cache
Thus awk '{print $NF; exit}' will produce 1000 in this case.
One solution for this can be:
- to use some other tool to fetch the IP of the host, like hostname -I | awk '{print $1}'
- As fetching the good ip can be problematic, leave HOST_IP empty, and warn the user of this example file to use the correct IP.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
Changed in networking-odl: | |
assignee: | nobody → Lajos Katona (lajos-katona) |
description: | updated |
description: | updated |
Fix proposed to branch: master /review. openstack. org/650891
Review: https:/