<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Thanks Matt. <br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Here are the steps I have performed, I dont see any error related to cell0 now but n-cond still not able to detect computes after discover as well :(.<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Do we need any cell setting on nova-compute nodes as well?.<br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br><font size="1"><span style="font-family:monospace,monospace">vmware@cntr11:~/nsbu_cqe_openstack/devstack$ nova service-list<br>+----+------------------+---------------+----------+---------+-------+----------------------------+-----------------+<br>| Id | Binary           | Host          | Zone     | Status  | State | Updated_at                 | Disabled Reason |<br>+----+------------------+---------------+----------+---------+-------+----------------------------+-----------------+<br>| 7  | nova-conductor   | cntr11        | internal | enabled | up    | 2017-02-22T14:23:34.000000 | -               |<br>| 9  | nova-scheduler   | cntr11        | internal | enabled | up    | 2017-02-22T14:23:28.000000 | -               |<br>| 10 | nova-consoleauth | cntr11        | internal | enabled | up    | 2017-02-22T14:23:33.000000 | -               |<br>| 11 | nova-compute     | esx-ubuntu-02 | nova     | enabled | up    | 2017-02-22T14:23:35.000000 | -               |<br>| 12 | nova-compute     | esx-ubuntu-03 | nova     | enabled | up    | 2017-02-22T14:23:35.000000 | -               |<br>| 13 | nova-compute     | esx-ubuntu-01 | nova     | enabled | up    | 2017-02-22T14:23:28.000000 | -               |<br>| 14 | nova-compute     | kvm-3         | nova     | enabled | up    | 2017-02-22T14:23:28.000000 | -               |<br>| 15 | nova-compute     | kvm-1         | nova     | enabled | up    | 2017-02-22T14:23:32.000000 | -               |<br>| 16 | nova-compute     | kvm-2         | nova     | enabled | up    | 2017-02-22T14:23:32.000000 | -               |<br>+----+------------------+---------------+----------+---------+-------+----------------------------+-----------------+<br>vmware@cntr11:~/nsbu_cqe_openstack/devstack$ <br>vmware@cntr11:~/nsbu_cqe_openstack/devstack$ nova-manage cell_v2 map_cell0 --database_connection mysql+pymysql://<a href="http://root:vmware@127.0.0.1/nova?charset=utf8">root:vmware@127.0.0.1/nova?charset=utf8</a><br>vmware@cntr11:~/nsbu_cqe_openstack/devstack$ nova-manage cell_v2 simple_cell_setup --transport-url rabbit://<a href="http://stackrabbit:vmware@60.0.24.49:5672/">stackrabbit:vmware@60.0.24.49:5672/</a><br>Cell0 is already setup<br>vmware@cntr11:~/nsbu_cqe_openstack/devstack$ nova-manage cell_v2 list_cells<br>+-------+--------------------------------------+<br>|  Name |                 UUID                 |<br>+-------+--------------------------------------+<br>|  None | ea6bec24-058a-4ba2-8d21-57d34c01802c |<br>| cell0 | 00000000-0000-0000-0000-000000000000 |<br>+-------+--------------------------------------+<br>vmware@cntr11:~/nsbu_cqe_openstack/devstack$ nova-manage cell_v2 discover_hosts --verbose<br>Found 2 cell mappings.<br>Skipping cell0 since it does not contain hosts.<br>Getting compute nodes from cell: ea6bec24-058a-4ba2-8d21-57d34c01802c<br>Found 6 computes in cell: ea6bec24-058a-4ba2-8d21-57d34c01802c<br>Checking host mapping for compute host 'kvm-3': a4b175d6-f5cc-45a8-9cf2-45726293b5c5<br>Checking host mapping for compute host 'esx-ubuntu-02': 70281329-590c-4cb7-8839-fd84160345b7<br>Checking host mapping for compute host 'esx-ubuntu-03': 04ea75a2-789e-483e-8d0e-4b0f79e012dc<br>Checking host mapping for compute host 'kvm-1': dfabae3c-4ea9-4e8f-a496-8880dd9e89d9<br>Checking host mapping for compute host 'kvm-2': d1cb30f5-822c-4c18-81fb-921ca676b834<br>Checking host mapping for compute host 'esx-ubuntu-01': d00f8f16-af6b-437d-8136-bc744eb2472f<br>vmware@cntr11:~/nsbu_cqe_openstack/devstack$</span></font><br><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">​n-sch:<br><font size="1"><span style="font-family:monospace,monospace">2017-02-22 14:26:51.467 INFO nova.scheduler.host_manager [req-56d1cefb-1dfb-481d-aaff-b7b6e05f83f0 None None] Successfully synced instances from host 'kvm-2'.<br>2017-02-22 14:26:51.608 INFO nova.scheduler.host_manager [req-690b1a18-a709-49b2-bfad-2a6a75a3bee2 None None] Successfully synced instances from host 'kvm-3'.<br>2017-02-22 14:27:23.366 INFO nova.filters [req-1085ec50-29f7-4946-81e2-03c1378e8077 alt_demo admin] Filter RetryFilter returned 0 hosts<br>2017-02-22 14:27:23.367 INFO nova.filters [req-1085ec50-29f7-4946-81e2-03c1378e8077 alt_demo admin] Filtering removed all hosts for the request with instance ID 'c74f394f-c805-4b5c-ba42-507dfda2c5be'. Filter results: ['RetryFilter: (start: 0, end: 0)']<br></span></font><br><br>n-cond:<br>​</div><font size="1"><span style="font-family:monospace,monospace">2017-02-22 14:27:23.375 TRACE nova.conductor.manager   File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 79, in select_destinations<br>2017-02-22 14:27:23.375 TRACE nova.conductor.manager     raise exception.NoValidHost(reason=reason)<br>2017-02-22 14:27:23.375 TRACE nova.conductor.manager <br>2017-02-22 14:27:23.375 TRACE nova.conductor.manager NoValidHost: No valid host was found. There are not enough hosts available.<br>2017-02-22 14:27:23.375 TRACE nova.conductor.manager <br>2017-02-22 14:27:23.375 TRACE nova.conductor.manager <br>2017-02-22 14:27:23.424 WARNING nova.scheduler.utils [req-1085ec50-29f7-4946-81e2-03c1378e8077 alt_demo admin] Failed to compute_task_build_instances: No valid host was found. There are not enough hosts available.<br>Traceback (most recent call last):<br><br>  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 218, in inner<br>    return func(*args, **kwargs)<br><br>  File "/opt/stack/nova/nova/scheduler/manager.py", line 98, in select_destinations<br>    dests = self.driver.select_destinations(ctxt, spec_obj)<br><br>  File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 79, in select_destinations<br>    raise exception.NoValidHost(reason=reason)<br><br>NoValidHost: No valid host was found. There are not enough hosts available.<br><br>2017-02-22 14:27:23.425 WARNING nova.scheduler.utils [req-1085ec50-29f7-4946-81e2-03c1378e8077 alt_demo admin] [instance: c74f394f-c805-4b5c-ba42-507dfda2c5be] Setting instance to ERROR state.</span></font><br><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 5:44 PM, Matt Riedemann <span dir="ltr"><<a target="_blank" href="mailto:mriedemos@gmail.com">mriedemos@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-">On 2/21/2017 10:38 AM, Prashant Shetty wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
Hi Mark,<br>
<br>
Thanks for your reply.<br>
<br>
I tried "nova-manage cell_v2 discover_hosts" and it returned nothing and<br>
still I have same issue on the node.<br>
<br>
Problem seems be the way devstack is getting configured,<br>
As code suggest below we create cell0 on node where n-api and n-cpu<br>
runs. In my case compute is running only n-cpu and controller is running<br>
n-api service, due to this code there are no cell created in controller<br>
or compute.<br>
</blockquote>
<br></span>
The nova_cell0 database is created here:<br>
<br>
<a target="_blank" rel="noreferrer" href="https://github.com/openstack-dev/devstack/blob/7a30c7fcabac1cf28fd9baa39d05436680616aef/lib/nova#L680">https://github.com/openstack-d<wbr>ev/devstack/blob/7a30c7fcabac1<wbr>cf28fd9baa39d05436680616aef/<wbr>lib/nova#L680</a><br>
<br>
That's the same place that the nova_api database is created.<span class="gmail-"><br>
<br>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<br>
We will not have this  problem in all-in-one-node setup.<br>
--<br>
# Do this late because it requires compute hosts to have started<br>
if is_service_enabled n-api; then<br>
    if is_service_enabled n-cpu; then<br>
        create_cell<br>
    else<br>
        # Some CI systems like Hyper-V build the control plane on<br>
        # Linux, and join in non Linux Computes after setup. This<br>
        # allows them to delay the processing until after their whole<br>
        # environment is up.<br>
        echo_summary "SKIPPING Cell setup because n-cpu is not enabled.<br>
You will have to do this manually before you have a working environment."<br>
    fi<br>
fi<br>
</blockquote>
<br></span>
You're correct that when stacking the control node where n-api is running, you won't get to the create_cell call:<br>
<br>
<a target="_blank" rel="noreferrer" href="https://github.com/openstack-dev/devstack/blob/7a30c7fcabac1cf28fd9baa39d05436680616aef/stack.sh#L1371">https://github.com/openstack-d<wbr>ev/devstack/blob/7a30c7fcabac1<wbr>cf28fd9baa39d05436680616aef/<wbr>stack.sh#L1371</a><br>
<br>
The create_cell function is what creates the cell0 mapping in the nova_api database and runs the simple_cell_setup command:<br>
<br>
<a target="_blank" rel="noreferrer" href="https://github.com/openstack-dev/devstack/blob/7a30c7fcabac1cf28fd9baa39d05436680616aef/lib/nova#L943">https://github.com/openstack-d<wbr>ev/devstack/blob/7a30c7fcabac1<wbr>cf28fd9baa39d05436680616aef/<wbr>lib/nova#L943</a><br>
<br>
You're running discover_hosts from the control node where the nova_api database lives, so that looks correct.<br>
<br>
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?<br>
<br>
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.<br>
<br>
The docs here explain how to set this up and the commands to run:<br>
<br>
<a target="_blank" rel="noreferrer" href="https://docs.openstack.org/developer/nova/cells.html#setup-of-cells-v2">https://docs.openstack.org/dev<wbr>eloper/nova/cells.html#setup-<wbr>of-cells-v2</a><br>
<a target="_blank" rel="noreferrer" href="https://docs.openstack.org/developer/nova/cells.html#fresh-install">https://docs.openstack.org/dev<wbr>eloper/nova/cells.html#fresh-<wbr>install</a><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
---<br>
<br>
vmware@cntr11:~$ nova-manage cell_v2 discover_hosts<br>
vmware@cntr11:~$ nova service-list<br>
+----+------------------+-----<wbr>----------+----------+--------<wbr>-+-------+--------------------<wbr>--------+-----------------+<br>
| Id | Binary           | Host          | Zone     | Status  | State |<br>
Updated_at                 | Disabled Reason |<br>
+----+------------------+-----<wbr>----------+----------+--------<wbr>-+-------+--------------------<wbr>--------+-----------------+<br>
| 3  | nova-conductor   | cntr11        | internal | enabled | up    |<br>
2017-02-21T15:34:13.000000 | -               |<br>
| 5  | nova-scheduler   | cntr11        | internal | enabled | up    |<br>
2017-02-21T15:34:15.000000 | -               |<br>
| 6  | nova-consoleauth | cntr11        | internal | enabled | up    |<br>
2017-02-21T15:34:11.000000 | -               |<br>
| 7  | nova-compute     | esx-ubuntu-02 | nova     | enabled | up    |<br>
2017-02-21T15:34:14.000000 | -               |<br>
| 8  | nova-compute     | esx-ubuntu-03 | nova     | enabled | up    |<br>
2017-02-21T15:34:16.000000 | -               |<br>
| 9  | nova-compute     | kvm-3         | nova     | enabled | up    |<br>
2017-02-21T15:34:07.000000 | -               |<br>
| 10 | nova-compute     | kvm-2         | nova     | enabled | up    |<br>
2017-02-21T15:34:13.000000 | -               |<br>
| 11 | nova-compute     | esx-ubuntu-01 | nova     | enabled | up    |<br>
2017-02-21T15:34:14.000000 | -               |<br>
| 12 | nova-compute     | kvm-1         | nova     | enabled | up    |<br>
2017-02-21T15:34:09.000000 | -               |<br>
+----+------------------+-----<wbr>----------+----------+--------<wbr>-+-------+--------------------<wbr>--------+-----------------+<br>
vmware@cntr11:~$<br>
vmware@cntr11:~$ nova-manage cell_v2 list_cells<br>
+------+------+<br>
| Name | UUID |<br>
+------+------+<br>
+------+------+<br>
vmware@cntr11:~$<br>
<br>
<br>
Thanks,<br>
Prashant<br>
<br>
</blockquote>
<br></div></div><div class="gmail-HOEnZb"><div class="gmail-h5">
-- <br>
<br>
Thanks,<br>
<br>
Matt Riedemann<br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a target="_blank" rel="noreferrer" href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a target="_blank" rel="noreferrer" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</div></div></blockquote></div><br></div></div>