← Back to team overview

maas-devel team mailing list archive

Re: Proposed release 1.6.0

 

On Thu, Jul 3, 2014 at 10:19 AM, Gavin Panella <gavin.panella@xxxxxxxxxxxxx>
wrote:

> On 3 July 2014 13:44, Andreas Hasenack <andreas@xxxxxxxxxxxxx> wrote:
> ...
> > The only odd thing in this upgrade, and happens everytime, is that the
> > rabbitmq and maas host ips get replaced by an IP (192.168.122.6) that I
> > don't have. I don't know where it comes from, so in the end the services
> are
> > not up and I have to fix it manually in these two files:
> >
> > root@maas:/etc/maas# grep 192 *
> > maas_local_celeryconfig.py:BROKER_URL =
> > 'amqp://
> maas_workers:Pd8Lj1mvYqPW618XoIhZ@192.168.122.6:5672//maas_workers'
> > maas_local_settings.py:DEFAULT_MAAS_URL = "http://192.168.122.6/MAAS";
>
> The function that does it is in maas-region-controller.postinst:
>
> get_default_route_ip() {
>   while read Iface Destination Gateway Flags RefCnt Use Metric Mask
> MTU Window IRTT; do
>     [ "$Mask" = "00000000" ] && break
>   done < /proc/net/route
>   interface="$Iface"
>   ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global)
>   ipaddr=${ipaddr#* inet }
>   ipaddr=${ipaddr%%/*}
>   echo $ipaddr
> }
>
> Can you try running this in /bin/sh to see what it comes up with?
>

It returns the correct IP:
root@maas:~# bash foo.sh
10.0.5.10

References