fix a devstack plugin bug
devstack default user stack may not have permission to modify system file /etc/hosts. use sudo to make sure the modification is done. Change-Id: Iabe47cae88da9d70a1f7788c1847d99856963713 Closes-Bug: 1816520 Signed-off-by: Yi Wang <yi.c.wang@intel.com>
This commit is contained in:
parent
506ef3fd7f
commit
ab3f2385e8
|
@ -463,11 +463,11 @@ function configure_maintenance {
|
||||||
# TODO: enable controllerconfig to do this
|
# TODO: enable controllerconfig to do this
|
||||||
# add floating ip hostname in hosts
|
# add floating ip hostname in hosts
|
||||||
if ! cat /etc/hosts | grep controller$ > /dev/null; then
|
if ! cat /etc/hosts | grep controller$ > /dev/null; then
|
||||||
sudo echo "192.168.204.2 controller" >> /etc/hosts
|
echo "192.168.204.2 controller" | sudo tee -a /etc/hosts
|
||||||
fi
|
fi
|
||||||
# add controller-0
|
# add controller-0
|
||||||
if ! cat /etc/hosts | grep [0-9]$'\s'controller-0$ > /dev/null; then
|
if ! cat /etc/hosts | grep [0-9]$'\s'controller-0$ > /dev/null; then
|
||||||
sudo echo "192.168.204.3 controller-0" >> /etc/hosts
|
echo "192.168.204.3 controller-0" | sudo tee -a /etc/hosts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# puppet configuration for mtce
|
# puppet configuration for mtce
|
||||||
|
|
Loading…
Reference in New Issue