TODO: Create tests for multiple compute services on one host

Bug #1655034 reported by Markus Zoeller (markus_z)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-dpm
In Progress
High
Sreeram Vancheeswaran

Bug Description

Problem
=======

AFAIK, our design looks like this:

....................compute-node...............
....+-----------------------------------------+
....|.........................................|
....|.+----------------+...+----------------+.|
....|.|......n-cpu.....|...|......n-cpu.....|.|
....|.|.cpc_subset=foo.|...|.cpc_subset=bar.|.|
....|.+------+---------+...+--------+-------+.|
....|........|......................|.........|
....+-----------------------------------------+
.............|......................|..........
.............|......................|..........
.............|......................|..........
.............|..........cpc.........|..........
....+-----------------------------------------+
....|........|......................|.........|
....|....+---v----+.............+---v----+....|
....|....|.subset.|.............|.subset.|....|
....|....|..foo...|.............|..bar...|....|
....|....+--------+.............+--------+....|
....|.........................................|
....+-----------------------------------------+

A system z CPC is divided into multiple subsets. Each subset is managed
by exactly one nova-compute service. Each nova-compute service manages
exactly one subset.
AFAIK, this setup -having multiple nova-compute services on one operating
system- is (AFAIK) not tested upstream. That means we have a testing gap.

Definition of Done
==================
As this setup cannot be properly tested in a unit test setup, we should
have a functional test [1] for this. Examples for that can be seen in the
Nova repo [2]. The "tests" directory [3] should have a sub directory for
that. The functional test case for that:
* uses a faked zhmcclient
* simulates two cpc-subsets
* starts two nova-compute services
* starts (at least) two instances which should be scheduled to different

References
==========
[1] http://docs.openstack.org/developer/nova/test_strategy.html#functional-tests
[2] https://github.com/openstack/nova/tree/master/nova/tests/functional
[3] https://github.com/openstack/nova-dpm/tree/master/nova_dpm/tests

description: updated
Changed in nova-dpm:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Sreeram Vancheeswaran (sreeram-vancheeswaran)
Changed in nova-dpm:
importance: High → Critical
Revision history for this message
Andreas Maier (maiera) wrote :

These scenarios can very well be tested in a unit test setup, by using the mock support of the zhmcclient.

Changed in nova-dpm:
status: Confirmed → In Progress
Changed in nova-dpm:
assignee: Sreeram Vancheeswaran (sreeram-vancheeswaran) → nobody
assignee: nobody → Prabhat Ranjan (pranjank)
Revision history for this message
Prabhat Ranjan (pranjank) wrote :

Steps to create multiple compute service on one host

1. Assuming one compute service is running

2. create configuration file for second compute service
   vi /etc/nova/nova2.conf
   [DEFAULT]
   host=host2
   log_file=/opt/stack/logs/n-cpu2.log

   [dpm]
   physical_storage_adapter_mappings = 44444444-b18d-11e6-9c12-42f2e9ef1641:0
   target_wwpn_ignore_list = 444444680B214AC1,444447680B224AC1
   max_instances = 10
   max_memory = 4096
   max_processors = 3
   cpc_object_id = ffffffff-12df-311a-804c-4ed2cc1d6564
   hmc_password = <password>
   hmc_username = <user>
   hmc = <IP>

3. Start second compute service (please use configuration file in order it overrides)
   /usr/local/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/nova2.conf

4. We have to create second network agent too because existing network agent doesn't know about host2

Steps to create second network agent

1. create configuration file for second network agent
   vi /etc/neutron/plugins/ml2/dpm_agent2.ini
   [DEFAULT]
   host = host2

2. start network agent (please use configuration file in order it overrides)
   /usr/local/bin/neutron-dpm-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/dpm_agent.ini --config-file /etc/neutron/plugins/ml2/dpm_agent2.ini

Revision history for this message
Prabhat Ranjan (pranjank) wrote :

1. It is working fine when we use
openstack server create --flavor dpm --volume 9c0d379a-c029-466f-9b61-4f2a200316db --nic net-id=71f29e77-c46f-4c35-ab21-f2ac7e39f16f test_server1

And Scheduling works on the basis of load balance when we use default scheduling filter provided by devstack.

2. When we try to create server on specific compute node then faced issue.
openstack server create --flavor dpm --volume 9c0d379a-c029-466f-9b61-4f2a200316db --nic net-id=71f29e77-c46f-4c35-ab21-f2ac7e39f16f --availability-zone nova:host2:host2 test_server2

ERROR:
{u'message': u"Host 'host2' is not mapped to any cell", u'code': 400, u'created': u'2017-02-14T12:40:38Z'}

3. We checked
#nova-manage cell_v2 discover_hosts --verbose
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting compute nodes from cell: d4014374-a9e1-47a1-a506-f7cf53289919
Found 2 computes in cell: d4014374-a9e1-47a1-a506-f7cf53289919
Checking host mapping for compute host 'storage-test': d88318af-b50c-4511-a2ad-71f3ed543284
Checking host mapping for compute host 'host2': a3757082-3099-4850-9d9b-6b61428e8c0b

but we can see "host2" is mapped with cell.

tags: added: ocata-rc-potential
Revision history for this message
Sreeram Vancheeswaran (sreeram-vancheeswaran) wrote :

Reducing priority as manual testing is done

Changed in nova-dpm:
importance: Critical → High
Revision history for this message
Prabhat Ranjan (pranjank) wrote :

We have not started writing functional test in ocata. We will write functional test in pike. So we will resolve this bug in pike.

tags: removed: ocata-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova-dpm (master)

Fix proposed to branch: master
Review: https://review.openstack.org/450672

Changed in nova-dpm:
assignee: Prabhat Ranjan (pranjank) → Sreeram Vancheeswaran (sreeram-vancheeswaran)
Changed in nova-dpm:
assignee: Sreeram Vancheeswaran (sreeram-vancheeswaran) → Prabhat Ranjan (pranjank)
Changed in nova-dpm:
assignee: Prabhat Ranjan (pranjank) → Sreeram Vancheeswaran (sreeram-vancheeswaran)
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.