my_ip should belong to os-internal-network rather than os-data-network

Bug #1686882 reported by Hua Zhang
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Nova Compute Charm
Fix Released
Hua Zhang

Bug Description

For example, the yaml file [1] (os-data-network= and os-internal-network= can make nova-cloud-controller/0 has one os-internal-network address, and nova-compute/2 has one os-internal-network address and one os-data-network address

But private-address of nova-cloud-controller/0 is, while private-address of nova-compute/2 is They are in different subnet so that the hook cloud-compute-relation-changed in nova-cloud-controller/0 will fail to collect known_host of by the command 'ssh-keyscan -H -t rsa'.

NOTE: The host juju-b89929-3-lxd-4 is nova-cloud-controller/0 below.

root@juju-b89929-3-lxd-4:~# ssh-keyscan -H -t rsa compute02
# compute02:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
|1|o9hWgq9R9lbIBmgzK9Mi8W54mfU=|4louLFdTkVQOoTgPgEVU6pmfF5U= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7qD00WTYXw10+UaQej1tJNtTjGXRUbfthFFkXJrJU4M4cYfRSCRmnLLCDlLpOkCUAp8RJ7yQ84/5fq6Z48HyUyk4mcBJBl0wnWSlf9fSqzRLO/YVHPpjgbNUtgfJDMJLCB0HMRjf9Xj/SPenIjaLzygxvcKtOK76F9TSUyjXNkmsKdyM2NzJiAuNVsKI2R1JNGcWW6Vl/oopiYVqGfTUKSVIOUemgGqKKw1jnmBXsyBOuEJy1mF19YHId58t5yulIT2NX5gJMrCejBjOcwSq7zmH3wCv74W091x531117qgnTIu2Vui5YsAICyYUK3K993v6EDSt7WT4Fg6nYPWQt

root@juju-b89929-3-lxd-4:~# ssh-keyscan -H -t rsa

root@juju-b89929-3-lxd-4:~# ping -c 1
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Port Unreachable

root@juju-b89929-3-lxd-4:~# ping compute02
PING compute02.maas ( 56(84) bytes of data.
64 bytes from compute02.maas ( icmp_seq=1 ttl=64 time=0.714 ms

root@compute02:~# ip addr show ens3 |grep global
    inet brd scope global ens3
root@compute02:~# ip addr show ens5 |grep global
    inet brd scope global ens5

root@juju-b89929-3-lxd-4:~# ip addr show eth0 |grep global
    inet brd scope global eth0

What's more, my_ip is also using private-address of nova-compute/1 (

my_ip = {{ host_ip }}
class HostIPContext(context.OSContextGenerator):
    def __call__(self):
        ctxt = {}
        host_ip = get_relation_ip('cloud-compute')
        if host_ip:
            ctxt['host_ip'] = host_ip
        return ctxt

root@compute01:~# grep -r 'my_ip' /etc/nova/
/etc/nova/nova.conf:my_ip =
root@compute01:~# grep -r 'local_ip' /etc/neutron/
/etc/neutron/plugins/ml2/openvswitch_agent.ini:local_ip =

As a result, it will fail to run 'nova resize' operation [2]. According to ubuntu openstack network topology [3], my understanding is that my_ip should belong to os-internal-network rather than private-address|os-data-network. Is that supposed to happen ?


Tags: sts
Hua Zhang (zhhuabj)
tags: added: sts
Hua Zhang (zhhuabj)
affects: nova-compute (Juju Charms Collection) → charm-nova-compute
Changed in charm-nova-compute:
milestone: none → 17.08
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Hua Zhang (zhhuabj) wrote :

This bug can be fixed by defining the following endpoint binding for nova-compute application in yaml file:

cloud-compute: *os-internal-space

I also tested it, it works well, see

So submitted a patch for review -

Changed in charm-nova-compute:
assignee: nobody → Hua Zhang (zhhuabj)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-compute (master)

Fix proposed to branch: master

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-nova-compute (master)

Change abandoned by Zhang Hua (<email address hidden>) on branch: master
Reason: sorry for generating a new review because I did not take good care of Change-Id, so abandon it, pls review the previous review link -

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-compute (master)

Submitter: Jenkins
Branch: master

commit 3bee16780883f51d8218ee769aa587b10eac768d
Author: Zhang Hua <email address hidden>
Date: Wed Jul 5 16:58:00 2017 +0800

    my_ip should belong to internal-network rather than data-network

    When defining os-data-network=,
    os-internal-network= and not defining os-data-space,
    private-address of nova-compute units will be in because
    now and are all in internal-network.

    nova-cloud-controller units can't collect public keys of nova-compute
    units because they don't have NIC belonged to This will
    lead to some problems when resizing/migrating VM.

    This problem can be fixed by defining os-internal-space for
    cloud-compute because at this time private-address of nova-compute
    units will be in

          cloud-compute: *os-internal-space

    However, the nova-compute charm has an os-internal-network option,
    this should also be referenced as a way to do this since not
    everybody uses spaces. This patch is used to deliver this point,
    then we can fix this problem by running the following command:

    juju config nova-compute os-internal-network=''

    Change-Id: I70b096fd709e5ec8d8a47d2d11f71ed3ea780c5d
    Closes-Bug: 1686882

Changed in charm-nova-compute:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-nova-compute:
status: Fix Committed → Fix Released
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.