On 2/21/2017 10:38 AM, Prashant Shetty wrote:
Hi Mark,

Thanks for your reply.

I tried "nova-manage cell_v2 discover_hosts" and it returned nothing and
still I have same issue on the node.

Problem seems be the way devstack is getting configured,
As code suggest below we create cell0 on node where n-api and n-cpu
runs. In my case compute is running only n-cpu and controller is running
n-api service, due to this code there are no cell created in controller
or compute.

The nova_cell0 database is created here:

https://github.com/openstack-dev/devstack/blob/7a30c7fcabac1cf28fd9baa39d05436680616aef/lib/nova#L680

That's the same place that the nova_api database is created.


We will not have this  problem in all-in-one-node setup.
--
# Do this late because it requires compute hosts to have started
if is_service_enabled n-api; then
    if is_service_enabled n-cpu; then
        create_cell
    else
        # Some CI systems like Hyper-V build the control plane on
        # Linux, and join in non Linux Computes after setup. This
        # allows them to delay the processing until after their whole
        # environment is up.
        echo_summary "SKIPPING Cell setup because n-cpu is not enabled.
You will have to do this manually before you have a working environment."
    fi
fi

You're correct that when stacking the control node where n-api is running, you won't get to the create_cell call:

https://github.com/openstack-dev/devstack/blob/7a30c7fcabac1cf28fd9baa39d05436680616aef/stack.sh#L1371

The create_cell function is what creates the cell0 mapping in the nova_api database and runs the simple_cell_setup command:

https://github.com/openstack-dev/devstack/blob/7a30c7fcabac1cf28fd9baa39d05436680616aef/lib/nova#L943

You're running discover_hosts from the control node where the nova_api database lives, so that looks correct.

Can you run discover_hosts with the --verbose option to get some more details, i.e. how many cell mappings are there, how many host mappings and compute_nodes records are created?

I think the issue is that you haven't run map_cell0 and simple_cell_setup. In the gating multinode CI job, the create_cell function in devstack is called because that's a 2-node job where n-cpu is running on both nodes, but n-api is only running on the control (primary) node. In your case you don't have that so you're going to have to run these command manually.

The docs here explain how to set this up and the commands to run:

https://docs.openstack.org/developer/nova/cells.html#setup-of-cells-v2
https://docs.openstack.org/developer/nova/cells.html#fresh-install

---

vmware@cntr11:~$ nova-manage cell_v2 discover_hosts
vmware@cntr11:~$ nova service-list
+----+------------------+---------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host          | Zone     | Status  | State |
Updated_at                 | Disabled Reason |
+----+------------------+---------------+----------+---------+-------+----------------------------+-----------------+
| 3  | nova-conductor   | cntr11        | internal | enabled | up    |
2017-02-21T15:34:13.000000 | -               |
| 5  | nova-scheduler   | cntr11        | internal | enabled | up    |
2017-02-21T15:34:15.000000 | -               |
| 6  | nova-consoleauth | cntr11        | internal | enabled | up    |
2017-02-21T15:34:11.000000 | -               |
| 7  | nova-compute     | esx-ubuntu-02 | nova     | enabled | up    |
2017-02-21T15:34:14.000000 | -               |
| 8  | nova-compute     | esx-ubuntu-03 | nova     | enabled | up    |
2017-02-21T15:34:16.000000 | -               |
| 9  | nova-compute     | kvm-3         | nova     | enabled | up    |
2017-02-21T15:34:07.000000 | -               |
| 10 | nova-compute     | kvm-2         | nova     | enabled | up    |
2017-02-21T15:34:13.000000 | -               |
| 11 | nova-compute     | esx-ubuntu-01 | nova     | enabled | up    |
2017-02-21T15:34:14.000000 | -               |
| 12 | nova-compute     | kvm-1         | nova     | enabled | up    |
2017-02-21T15:34:09.000000 | -               |
+----+------------------+---------------+----------+---------+-------+----------------------------+-----------------+
vmware@cntr11:~$
vmware@cntr11:~$ nova-manage cell_v2 list_cells
+------+------+
| Name | UUID |
+------+------+
+------+------+
vmware@cntr11:~$


Thanks,
Prashant


--

Thanks,

Matt Riedemann

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to