Merge lp:~springfield-team/charms/trusty/nova-cloud-controller/next into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Jorge Niedbalski
Status: Rejected
Rejected by: Edward Hope-Morley
Proposed branch: lp:~springfield-team/charms/trusty/nova-cloud-controller/next
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 157 lines (+91/-2)
6 files modified
config.yaml (+24/-0)
hooks/charmhelpers/contrib/openstack/context.py (+6/-2)
templates/havana/neutron.conf (+5/-0)
templates/icehouse/cisco_plugins.ini (+43/-0)
templates/icehouse/neutron.conf (+4/-0)
templates/icehouse/nova.conf (+9/-0)
To merge this branch: bzr merge lp:~springfield-team/charms/trusty/nova-cloud-controller/next
Reviewer Review Type Date Requested Status
Edward Hope-Morley Needs Fixing
Shiv Prasad Rao (community) Needs Resubmitting
Jorge Niedbalski (community) Approve
OpenStack Charmers Pending
Hua Zhang Pending
James Page Pending
Review via email: mp+240720@code.launchpad.net

This proposal supersedes a proposal from 2014-09-18.

Description of the change

This merge proposal is prepared to enable N1KV plugin to install with charm logic for nova-cloud-controller.
Similar to ovs and nvp, n1kv (Nexus 1000V) is another layer 2 virtual switch provided by Cisco Nexus 1000V engineering team, which is a host side VM switching fabric building block we call it VEM (Virtual Ethernet Switch). 1+ VEM work in tandem with a VSM (Virtual Switch Module) to form a virtual chassis in a data center.
Please also refer to the VEM/VSM charm and Cisco Nexus1000V related document for its detail.

config.yaml
- added n1kv as a possible value for quantum-plugin
- added n1kv-vsm-username, n1kv-vsm-password, n1kv-vsm-ip to communicate with its supervisor module with (VSM)

hooks/charmhelpers/contrib/openstack/context.py
- Added n1kv related dictionary for context look-up

hooks/charmhelpers/contrib/openstack/neutron.py
- Added n1kv related plugin logic data formation

hooks/nova_cc_hooks.py
- Added copy logic to copy Cisco n1kv template to /root

templates/havana/cisco_plugins.ini
- New file for Cisco Plugin related parameters

templates/havana/neutron.conf
- Added customized system parameters for N1KV plugin to run with

templates/havana/cisco_plugin.ini
- Adding support for PostgreSQL for cisco_plugin.ini

Please refer to old merge proposal if needed:
https://code.launchpad.net/~springfield-team/charms/precise/nova-cloud-controller/trunk/+merge/218172

To post a comment you must log in.
Revision history for this message
Shiv Prasad Rao (shivrao) wrote : Posted in a previous version of this proposal

I have submitted changes required for charm-helpers as part of another commit to lp:charm-helpers
https://code.launchpad.net/~springfield-team/charm-helpers/trunk/+merge/234402

Revision history for this message
Hua Zhang (zhhuabj) wrote : Posted in a previous version of this proposal

some inline comments, thanks.

review: Needs Fixing
Revision history for this message
Shiv Prasad Rao (shivrao) wrote : Posted in a previous version of this proposal

Accepted the review comments.
Synced with latest revision

Revision history for this message
Marga Millet (millet) wrote : Posted in a previous version of this proposal

Shiv, there's a typo in the description of the n1kv-restrict-policy-profiles parameter.

Thanks.

Revision history for this message
Hua Zhang (zhhuabj) wrote : Posted in a previous version of this proposal

looks good for me, thanks for addressing the comments.

review: Approve
Revision history for this message
James Page (james-page) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
James Page (james-page) wrote : Posted in a previous version of this proposal

Please set back to 'Needs review' once updated.

Thanks!

Revision history for this message
Shiv Prasad Rao (shivrao) wrote : Posted in a previous version of this proposal

Addressed review comments.

1.
I will remove all changes made to render the openrc file. These changes were made to generate the openrc file so that vxlan gateway charm could use it to upload the iso to glance.
As this approach was not acceptable during the vxlan-gateway charm review, we will do with manually uploading the iso to glance (for now atleast).

2. Trimmed down the comments in the cisco_plugins.ini file.

review: Needs Resubmitting
Revision history for this message
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#462 nova-cloud-controller-next for shivrao mp235182
charm_unit_test

This build:
http://10.98.191.181:8080/job/charm_unit_test/462/

MP URL:
https://code.launchpad.net/~springfield-team/charms/trusty/nova-cloud-controller/next/+merge/235182

Proposed branch:
lp:~springfield-team/charms/trusty/nova-cloud-controller/next

Results summary:
    UNIT OK: believed to pass, but you should confirm results

UNIT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_unit_test/unit-test.462:
Ensure services with incomplete interfaces are stopped ... ok
Ensure services with complete interfaces are not stopped ... ok
Ensure that if disabled, service guards nothing ... ok
test_ssh_authorized_key_doesnt_exist (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_authorized_key_exists (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_compute_remove (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_directory_for_unit (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_known_host_key (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
Simulate a call to do_openstack_upgrade() for grizzly->icehouse ... ok
Verify get_step_upgrade_source() for grizzly->icehouse ... ok
Simulate a call to do_openstack_upgrade() for havana->icehouse ... ok
Simulate a call to do_openstack_upgrade() for havana->icehouse api ... ok
Verify get_step_upgrade_source() for havana->icehouse ... ok

Name Stmts Miss Cover Missing
-----------------------------------------------------
hooks/nova_cc_context 139 100 28% 21-28, 39-41, 47-61, 68-86, 98-151, 162-177, 185-186, 190, 194-196, 201, 204-218, 224-238, 255-258, 263-265
hooks/nova_cc_hooks 424 151 64% 131-134, 147-148, 172, 182-190, 221, 226-231, 242, 319-322, 330-333, 339-342, 352-368, 377-379, 389-403, 407-416, 502, 512, 516-517, 570, 576-586, 591-602, 612-622, 627-666, 676-691, 699-703, 716, 726-735, 759, 764-772, 820-823
hooks/nova_cc_utils 442 111 75% 292-297, 308-311, 321-322, 378, 380, 424-426, 430, 444-452, 459-464, 468-482, 588-590, 595-598, 603, 607, 631-632, 646-648, 669-670, 676-699, 703-709, 713-719, 725, 731, 738, 749-753, 838, 898-904, 908-910, 914-917, 921-933
-----------------------------------------------------
TOTAL 1005 362 64%
----------------------------------------------------------------------
Ran 90 tests in 10.250s

OK

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

Revision history for this message
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#656 nova-cloud-controller-next for shivrao mp235182
charm_lint_check

This build:
http://10.98.191.181:8080/job/charm_lint_check/656/

MP URL:
https://code.launchpad.net/~springfield-team/charms/trusty/nova-cloud-controller/next/+merge/235182

Proposed branch:
lp:~springfield-team/charms/trusty/nova-cloud-controller/next

Results summary:
    LINT OK: believed to pass, but you should confirm results

LINT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.656:
I: relation cloud-controller has no hooks
I: config.yaml: option ssl_key has no default value
I: config.yaml: option nvp-tz-uuid has no default value
I: config.yaml: option vip has no default value
I: config.yaml: option nvp-controllers has no default value
I: config.yaml: option console-access-protocol has no default value
I: config.yaml: option ssl_ca has no default value
I: config.yaml: option n1kv-config-flags has no default value
I: config.yaml: option os-public-network has no default value
W: config.yaml: option n1kv-vsm-ip does not have the keys: default
I: config.yaml: option haproxy-server-timeout has no default value
I: config.yaml: option os-admin-network has no default value
I: config.yaml: option haproxy-client-timeout has no default value
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

Revision history for this message
Jorge Niedbalski (niedbalski) :
review: Approve
Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
charm_lint_check #923 nova-cloud-controller-next for niedbalski mp240720
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option os-admin-network has no default value
  I: config.yaml: option haproxy-client-timeout has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option nvp-l3-uuid has no default value
  I: config.yaml: option os-internal-network has no default value

Full lint test output: http://paste.ubuntu.com/8835784/
Build: http://10.98.191.181:8080/job/charm_lint_check/923/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
charm_unit_test #758 nova-cloud-controller-next for niedbalski mp240720
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/nova_cc_hooks 424 151 64% 131-134, 147-148, 172, 182-190, 221, 226-231, 242, 319-322, 330-333, 339-342, 352-368, 377-379, 389-403, 407-416, 502, 512, 516-517, 570, 576-586, 591-602, 612-622, 627-666, 676-691, 699-703, 716, 726-735, 759, 764-772, 820-823
  hooks/nova_cc_utils 442 111 75% 292-297, 308-311, 321-322, 378, 380, 424-426, 430, 444-452, 459-464, 468-482, 588-590, 595-598, 603, 607, 631-632, 646-648, 669-670, 676-699, 703-709, 713-719, 725, 731, 738, 749-753, 838, 898-904, 908-910, 914-917, 921-933
  TOTAL 1005 362 64%
  Ran 90 tests in 8.235s
  OK

Full unit test output: http://paste.ubuntu.com/8835786/
Build: http://10.98.191.181:8080/job/charm_unit_test/758/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
charm_amulet_test #341 nova-cloud-controller-next for niedbalski mp240720
    AMULET OK: passed

AMULET Results (max last 5 lines):
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv07"
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  WARNING cannot delete security group "juju-osci-sv07". Used by another environment?
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  juju-test INFO : Results: 3 passed, 0 failed, 0 errored

Full amulet test output: http://paste.ubuntu.com/8836007/
Build: http://10.98.191.181:8080/job/charm_amulet_test/341/

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Lost mostly good. Few inline comments.

review: Needs Fixing
108. By Shiv Prasad Rao

Addressing review comments

1. Added delimiter for cisco options in config.yaml
2. Removed cisco_plugins.ini for havana. Added conditional block in icehouse template

Revision history for this message
Shiv Prasad Rao (shivrao) wrote :

Addressed Review comments.
Added delimiter in config.yaml

Added code block for != havana as we dont support releases before that. Anyways, the config should not cause the plugin to error out.

Thanks for the review.

review: Needs Resubmitting
Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
charm_lint_check #929 nova-cloud-controller-next for niedbalski mp240720
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option os-admin-network has no default value
  I: config.yaml: option haproxy-client-timeout has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option nvp-l3-uuid has no default value
  I: config.yaml: option os-internal-network has no default value

Full lint test output: http://paste.ubuntu.com/8841281/
Build: http://10.98.191.181:8080/job/charm_lint_check/929/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
charm_unit_test #764 nova-cloud-controller-next for niedbalski mp240720
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/nova_cc_hooks 424 151 64% 131-134, 147-148, 172, 182-190, 221, 226-231, 242, 319-322, 330-333, 339-342, 352-368, 377-379, 389-403, 407-416, 502, 512, 516-517, 570, 576-586, 591-602, 612-622, 627-666, 676-691, 699-703, 716, 726-735, 759, 764-772, 820-823
  hooks/nova_cc_utils 442 111 75% 292-297, 308-311, 321-322, 378, 380, 424-426, 430, 444-452, 459-464, 468-482, 588-590, 595-598, 603, 607, 631-632, 646-648, 669-670, 676-699, 703-709, 713-719, 725, 731, 738, 749-753, 838, 898-904, 908-910, 914-917, 921-933
  TOTAL 1005 362 64%
  Ran 90 tests in 8.767s
  OK

Full unit test output: http://paste.ubuntu.com/8841284/
Build: http://10.98.191.181:8080/job/charm_unit_test/764/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
charm_amulet_test #347 nova-cloud-controller-next for niedbalski mp240720
    AMULET OK: passed

AMULET Results (max last 5 lines):
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv07"
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  WARNING cannot delete security group "juju-osci-sv07". Used by another environment?
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  juju-test INFO : Results: 3 passed, 0 failed, 0 errored

Full amulet test output: http://paste.ubuntu.com/8841503/
Build: http://10.98.191.181:8080/job/charm_amulet_test/347/

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Ok first an apology. I was incorrect to say that we could meld the cisco_plugins.ini files for havana and Icehouse since if you run Icehouse the template engine will not look further than templates/havana so your last commit was not required (and would break havana n1kv). Now, upon further inspection and discussion there are a few other issues here:

1. neutron-server support in the nova-cloud-controller charm is being deprecated and has been shifted to the neutron-api charm (lp:~openstack-charmers/charms/trusty/neutron-api/next). So we cannot accept new neutron features/functionality for this charm (neutron-api charm already has some features that do not exist here e.g. neutron l2 population support).

2. Also, this patch is adding support for Havana and Icehouse but Havana is no longer supported in the charms (same as earlier versions) - see https://wiki.ubuntu.com/ServerTeam/CloudArchive for more info on what releases are supported. So this patch will need to be constrained to Icehouse and Juno.

So apologies for not pointing this out earlier but I'll have to reject this patch and request it be moved to neutron-api. It would also be nice to have a test deployer (e.g. added to https://code.launchpad.net/~openstack-charm-testers) to give me some idea of how you propose to deploy n1kv so I can try it out (without cisco hardware it should still be possible to deploy this and check that config files have the correct settings etc).

review: Needs Fixing
Revision history for this message
Edward Hope-Morley (hopem) wrote :

I have migrated this patchset to the new neutron-api charm:

https://code.launchpad.net/~springfield-team/charms/trusty/neutron-api/n1kv/+merge/242158

I will deprecate this MP but keep for posterity until we merge the new patchset.

Unmerged revisions

108. By Shiv Prasad Rao

Addressing review comments

1. Added delimiter for cisco options in config.yaml
2. Removed cisco_plugins.ini for havana. Added conditional block in icehouse template

107. By Shiv Prasad Rao

typo

106. By Shiv Prasad Rao

Sync with revision 112

105. By Shiv Prasad Rao

Addressed Review comments:
1.Removed openrc generation
2.Trimmed down comments from cisco_plugins.ini

104. By Shiv Prasad Rao

Fixing a typo

103. By Shiv Prasad Rao

Upstream 102

102. By Shiv Prasad Rao

Addressing review comments

101. By Shiv Prasad Rao

Adding support for Cisco N1kV

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2014-10-22 21:09:02 +0000
3+++ config.yaml 2014-11-05 20:35:35 +0000
4@@ -292,3 +292,27 @@
5 order for this charm to function correctly, the privacy extension must be
6 disabled and a non-temporary address must be configured/available on
7 your network interface.
8+# Cisco N1KV options start
9+ n1kv-vsm-username:
10+ type: string
11+ default: admin
12+ description: Username to connect to Cisco Nexus1000v VSM
13+ n1kv-vsm-password:
14+ type: string
15+ default: abc123
16+ description: Password to connect to Cisco Nexus1000v VSM
17+ n1kv-vsm-ip:
18+ type: string
19+ description: IP address to connect to Cisco Nexus1000v VSM
20+ n1kv-restrict-policy-profiles:
21+ type: boolean
22+ default: false
23+ description: |
24+ All tenants will be able to access all policy profiles if false.
25+ If set to true, tenants can access only those policy profiles which are
26+ explicitly assigned to them by admin.
27+ n1kv-config-flags:
28+ default:
29+ type: string
30+ description: Comma separated list of key=value config flags to be set in cisco_plugins.ini
31+# Cisco N1KV options end
32
33=== modified file 'hooks/charmhelpers/contrib/openstack/context.py'
34--- hooks/charmhelpers/contrib/openstack/context.py 2014-10-13 16:18:58 +0000
35+++ hooks/charmhelpers/contrib/openstack/context.py 2014-11-05 20:35:35 +0000
36@@ -700,6 +700,7 @@
37 self.network_manager)
38 n1kv_config = neutron_plugin_attribute(self.plugin, 'config',
39 self.network_manager)
40+ n1kv_user_config_flags = config('n1kv-config-flags')
41 n1kv_ctxt = {
42 'core_plugin': driver,
43 'neutron_plugin': 'n1kv',
44@@ -710,9 +711,12 @@
45 'vsm_username': config('n1kv-vsm-username'),
46 'vsm_password': config('n1kv-vsm-password'),
47 'restrict_policy_profiles': config(
48- 'n1kv_restrict_policy_profiles'),
49+ 'n1kv-restrict-policy-profiles'),
50 }
51-
52+ if n1kv_user_config_flags:
53+ flags = config_flags_parser(n1kv_user_config_flags)
54+ n1kv_ctxt['n1kv_user_config_flags'] = flags
55+
56 return n1kv_ctxt
57
58 def neutron_ctxt(self):
59
60=== modified file 'templates/havana/neutron.conf'
61--- templates/havana/neutron.conf 2014-04-16 08:25:14 +0000
62+++ templates/havana/neutron.conf 2014-11-05 20:35:35 +0000
63@@ -27,6 +27,11 @@
64
65 {% include "parts/rabbitmq" %}
66
67+{% if neutron_plugin and neutron_plugin == 'n1kv' -%}
68+api_extensions_path = /usr/share/pyshared/neutron/plugins/cisco/extensions
69+network_auto_schedule = False
70+{% endif %}
71+
72 [quotas]
73 quota_driver = neutron.db.quota_db.DbQuotaDriver
74 {% if neutron_security_groups -%}
75
76=== added file 'templates/icehouse/cisco_plugins.ini'
77--- templates/icehouse/cisco_plugins.ini 1970-01-01 00:00:00 +0000
78+++ templates/icehouse/cisco_plugins.ini 2014-11-05 20:35:35 +0000
79@@ -0,0 +1,43 @@
80+###############################################################################
81+# [ WARNING ]
82+# Configuration file maintained by Juju. Local changes may be overwritten.
83+###############################################################################
84+[cisco_plugins]
85+
86+[cisco]
87+
88+[cisco_n1k]
89+integration_bridge = br-int
90+default_policy_profile = default-pp
91+network_node_policy_profile = default-pp
92+{% if openstack_release != 'havana' -%}
93+http_timeout = 120
94+# (BoolOpt) Specify whether plugin should attempt to synchronize with the VSM
95+# when neutron is started.
96+# Default value: False, indicating no full sync will be performed.
97+#
98+enable_sync_on_start = False
99+{% endif -%}
100+restrict_policy_profiles = {{ restrict_policy_profiles }}
101+{% if n1kv_user_config_flags -%}
102+{% for key, value in n1kv_user_config_flags.iteritems() -%}
103+{{ key }} = {{ value }}
104+{% endfor -%}
105+{% endif -%}
106+
107+{% include "parts/section-database" %}
108+
109+[CISCO_PLUGINS]
110+vswitch_plugin = neutron.plugins.cisco.n1kv.n1kv_neutron_plugin.N1kvNeutronPluginV2
111+
112+[N1KV:{{ vsm_ip }}]
113+password = {{ vsm_password }}
114+username = {{ vsm_username }}
115+
116+[securitygroup]
117+{% if neutron_security_groups -%}
118+firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
119+enable_security_group = True
120+{% else -%}
121+firewall_driver = neutron.agent.firewall.NoopFirewallDriver
122+{% endif -%}
123
124=== modified file 'templates/icehouse/neutron.conf'
125--- templates/icehouse/neutron.conf 2014-09-17 08:37:24 +0000
126+++ templates/icehouse/neutron.conf 2014-11-05 20:35:35 +0000
127@@ -31,6 +31,10 @@
128
129 {% include "parts/rabbitmq" %}
130
131+{% if neutron_plugin and neutron_plugin == 'n1kv' -%}
132+network_auto_schedule = False
133+{% endif %}
134+
135 notify_nova_on_port_status_changes = True
136 notify_nova_on_port_data_changes = True
137 nova_url = {{ nova_url }}
138
139=== modified file 'templates/icehouse/nova.conf'
140--- templates/icehouse/nova.conf 2014-10-07 11:37:20 +0000
141+++ templates/icehouse/nova.conf 2014-11-05 20:35:35 +0000
142@@ -76,6 +76,15 @@
143 {% endif -%}
144 {% endif -%}
145
146+{% if neutron_plugin and neutron_plugin == 'n1kv' -%}
147+libvirt_user_virtio_for_bridges = True
148+security_group_api = {{ network_manager }}
149+nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
150+{% if external_network -%}
151+default_floating_pool = {{ external_network }}
152+{% endif -%}
153+{% endif -%}
154+
155 {% if network_manager_config -%}
156 {% for key, value in network_manager_config.iteritems() -%}
157 {{ key }} = {{ value }}

Subscribers

People subscribed via source and target branches